Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
173 changes: 25 additions & 148 deletions @apps/backend/src/seeders/curriculumInjector.seeder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,16 @@ function createSection(
template: SectionTemplatesEntityType,
title: string,
position: number,
isActive: boolean,
) {
return em.create<SectionEntityType>("Sections", { id, curriculum, template, title, position });
return em.create<SectionEntityType>("Sections", {
id,
curriculum,
template,
title,
position,
isActive,
});
}

function createItem(
Expand Down Expand Up @@ -77,14 +85,23 @@ export default function curriculumInjectorSeeder(em: EntityManager) {
tPerso!,
"Informations personnelles",
0,
true,
);
const c1Profil = createSection(em, "e2e-c1-s2-profil", cv1, tProfil!, "Profil", 1);
const c1Exp = createSection(em, "e2e-c1-s3-exp", cv1, tExperiences!, "Expériences", 2);
const c1Form = createSection(em, "e2e-c1-s4-form", cv1, tFormation!, "Formations", 3);
const c1Comp = createSection(em, "e2e-c1-s5-comp", cv1, tCompetences!, "Compétences", 4);
const c1Langue = createSection(em, "e2e-c1-s6-langue", cv1, tLangue!, "Langues", 5);
const c1Centres = createSection(em, "e2e-c1-s7-centres", cv1, tCentres!, "Centres d'intérêt", 6);
const c1Refs = createSection(em, "e2e-c1-s8-refs", cv1, tReferences!, "Références", 7);
const c1Profil = createSection(em, "e2e-c1-s2-profil", cv1, tProfil!, "Profil", 1, true);
const c1Exp = createSection(em, "e2e-c1-s3-exp", cv1, tExperiences!, "Expériences", 2, true);
const c1Form = createSection(em, "e2e-c1-s4-form", cv1, tFormation!, "Formations", 3, true);
const c1Comp = createSection(em, "e2e-c1-s5-comp", cv1, tCompetences!, "Compétences", 4, true);
const c1Langue = createSection(em, "e2e-c1-s6-langue", cv1, tLangue!, "Langues", 5, true);
const c1Centres = createSection(
em,
"e2e-c1-s7-centres",
cv1,
tCentres!,
"Centres d'intérêt",
6,
true,
);
const c1Refs = createSection(em, "e2e-c1-s8-refs", cv1, tReferences!, "Références", 7, true);

createItem(em, "e2e-c1-s1-perso-i1", c1Perso, 0, {
firstName: "Amaury",
Expand Down Expand Up @@ -180,144 +197,4 @@ export default function curriculumInjectorSeeder(em: EntityManager) {
phone: "0612345678",
city: "Lyon",
});

// ── CV 2 : CV junior (moins de sections) ─────────────
const cv2 = em.create(CurriculumEntity, {
id: "e2e-c2",
userId: "e2e-login-user",
title: "CV Junior - Sophie Martin",
createdAt: new Date("2025-09-15"),
updatedAt: new Date("2025-09-15"),
}) as CurriculumEntityType;

const s2Perso = createSection(
em,
"e2e-c2-s1-perso",
cv2,
tPerso!,
"Informations personnelles",
0,
);
const s2Profil = createSection(em, "e2e-c2-s2-profil", cv2, tProfil!, "Profil", 1);
const s2Form = createSection(em, "e2e-c2-s3-form", cv2, tFormation!, "Formations", 2);
const s2Comp = createSection(em, "e2e-c2-s4-comp", cv2, tCompetences!, "Compétences", 3);
const s2Langue = createSection(em, "e2e-c2-s5-langue", cv2, tLangue!, "Langues", 4);

createItem(em, "e2e-c2-s1-perso-i1", s2Perso, 0, {
firstName: "Sophie",
lastName: "Martin",
email: "sophie.martin@outlook.com",
phone: "0698765432",
address: "45 avenue Foch, 69000 Lyon",
});
createItem(em, "e2e-c2-s2-profil-i1", s2Profil, 0, {
description:
"Étudiante en master informatique à la recherche d'une alternance. Motivée, rigoureuse et passionnée par le développement web.",
});
createItem(em, "e2e-c2-s3-form-i1", s2Form, 0, {
school: "INSA Lyon",
degree: "Master Ingénierie Logicielle",
field: "Informatique",
startDate: "2023-09-01",
endDate: "2025-06-30",
description: "Formation en alternance, spécialisation web et cloud.",
});
createItem(em, "e2e-c2-s3-form-i2", s2Form, 1, {
school: "IUT de Lyon",
degree: "BUT Informatique",
field: "Informatique",
startDate: "2020-09-01",
endDate: "2023-06-30",
description: "Formation pratique en développement logiciel.",
});
createItem(em, "e2e-c2-s4-comp-i1", s2Comp, 0, { competence: "React", level: "Intermédiaire" });
createItem(em, "e2e-c2-s4-comp-i2", s2Comp, 1, { competence: "Python", level: "Intermédiaire" });
createItem(em, "e2e-c2-s5-langue-i1", s2Langue, 0, { language: "Français", level: "Natif" });
createItem(em, "e2e-c2-s5-langue-i2", s2Langue, 1, { language: "Anglais", level: "B2" });
createItem(em, "e2e-c2-s5-langue-i3", s2Langue, 2, { language: "Espagnol", level: "B1" });

// ── CV 3 : CV senior (expériences longues) ────────────
const cv3 = em.create(CurriculumEntity, {
id: "e2e-c3",
userId: "e2e-login-user",
title: "CV Senior - Marc Leblanc",
createdAt: new Date("2025-11-01"),
updatedAt: new Date("2025-11-01"),
}) as CurriculumEntityType;
const s3Perso = createSection(
em,
"e2e-c3-s1-perso",
cv3,
tPerso!,
"Informations personnelles",
1,
);
const s3Profil = createSection(em, "e2e-c3-s2-profil", cv3, tProfil!, "Profil", 2);
const s3Exp = createSection(em, "e2e-c3-s3-exp", cv3, tExperiences!, "Expériences", 3);
const s3Form = createSection(em, "e2e-c3-s4-form", cv3, tFormation!, "Formations", 4);
const s3Comp = createSection(em, "e2e-c3-s5-comp", cv3, tCompetences!, "Compétences", 5);
const s3Refs = createSection(em, "e2e-c3-s6-refs", cv3, tReferences!, "Références", 6);

createItem(em, "e2e-c3-s1-perso-i1", s3Perso, 0, {
firstName: "Marc",
lastName: "Leblanc",
email: "marc.leblanc@gmail.com",
phone: "0677889900",
address: "8 place Bellecour, 69002 Lyon",
});
createItem(em, "e2e-c3-s2-profil-i1", s3Profil, 0, {
description:
"Architecte logiciel avec 15 ans d'expérience. Expert en conception de systèmes distribués, microservices et cloud AWS. Passionné par les bonnes pratiques et le mentoring.",
});
createItem(em, "e2e-c3-s3-exp-i1", s3Exp, 0, {
employer: "BNP Paribas",
position: "Architecte Solutions",
city: "Paris",
startDate: "2019-01-01",
endDate: "",
description:
"Conception et supervision de l'architecture SI pour les services de paiement en ligne. Équipe de 12 développeurs.",
});
createItem(em, "e2e-c3-s3-exp-i2", s3Exp, 1, {
employer: "Capgemini",
position: "Tech Lead Java",
city: "Lyon",
startDate: "2014-04-01",
endDate: "2018-12-31",
description:
"Lead technique sur des projets grands comptes. Mise en place CI/CD et pratiques DevOps.",
});
createItem(em, "e2e-c3-s3-exp-i3", s3Exp, 2, {
employer: "Sopra Steria",
position: "Développeur Backend",
city: "Lyon",
startDate: "2010-09-01",
endDate: "2014-03-31",
description: "Développement d'applications Java EE pour le secteur bancaire.",
});
createItem(em, "e2e-c3-s4-form-i1", s3Form, 0, {
school: "École Centrale Paris",
degree: "Diplôme d'ingénieur",
field: "Informatique & Systèmes",
startDate: "2007-09-01",
endDate: "2010-06-30",
description: "Grande école d'ingénieurs, majeure systèmes d'information.",
});
createItem(em, "e2e-c3-s5-comp-i1", s3Comp, 0, { competence: "Java / Spring", level: "Expert" });
createItem(em, "e2e-c3-s5-comp-i2", s3Comp, 1, { competence: "AWS", level: "Expert" });
createItem(em, "e2e-c3-s5-comp-i3", s3Comp, 2, { competence: "Kubernetes", level: "Avancé" });
createItem(em, "e2e-c3-s6-refs-i1", s3Refs, 0, {
name: "Claire Morin",
entreprise: "BNP Paribas",
email: "c.morin@bnp.fr",
phone: "0145678901",
city: "Paris",
});
createItem(em, "e2e-c3-s6-refs-i2", s3Refs, 1, {
name: "Thomas Renard",
entreprise: "Capgemini",
email: "t.renard@capgemini.com",
phone: "0472345678",
city: "Lyon",
});
}
17 changes: 17 additions & 0 deletions @apps/backend/src/templates/template1/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<style>
{{{styles}}}
</style>
</head>

<body>
<div class="cv">
<div class="cv__sidebar">{{#each leftSections}} {{{this.html}}} {{/each}}</div>

<div class="cv__main">{{#each rightSections}} {{{this.html}}} {{/each}}</div>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<section class="cv-section cv-section--centres">
<h2 class="cv-section__title">{{title}}</h2>
<ul class="cv-section__centres-list">
{{#each items}}
<li class="cv-section__centre">{{this.name}}</li>
{{/each}}
</ul>
</section>
16 changes: 16 additions & 0 deletions @apps/backend/src/templates/template1/sections/compétences.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<section class="cv-section cv-section--competences">
<h2 class="cv-section__title">{{title}}</h2>
<ul class="cv-section__competences-list">
{{#each items}}
<li class="cv-section__competence">
<span class="cv-section__competence-name">{{this.competence}}</span>
{{#if this.level}}
<div class="cv-section__competence-bar-wrap">
<div class="cv-section__competence-bar cv-section__competence-bar--{{this.level}}"></div>
</div>
<span class="cv-section__competence-level">{{this.level}}</span>
{{/if}}
</li>
{{/each}}
</ul>
</section>
21 changes: 21 additions & 0 deletions @apps/backend/src/templates/template1/sections/expériences.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<section class="cv-section cv-section--experiences">
<h2 class="cv-section__title">{{title}}</h2>
<ul class="cv-section__list">
{{#each items}}
<li class="cv-section__entry">
<div class="cv-section__entry-header">
<span class="cv-section__entry-degree">{{this.position}}</span>
<span class="cv-section__entry-dates"
>{{this.startDate}} – {{#if this.endDate}}{{this.endDate}}{{else}}Aujourd'hui{{/if}}</span
>
</div>
<div class="cv-section__entry-school">
{{this.employer}}{{#if this.city}} — {{this.city}}{{/if}}
</div>
{{#if this.description}}
<p class="cv-section__entry-desc">{{this.description}}</p>
{{/if}}
</li>
{{/each}}
</ul>
</section>
19 changes: 19 additions & 0 deletions @apps/backend/src/templates/template1/sections/formations.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<section class="cv-section cv-section--formations">
<h2 class="cv-section__title">{{title}}</h2>
<ul class="cv-section__list">
{{#each items}}
<li class="cv-section__entry">
<div class="cv-section__entry-header">
<span class="cv-section__entry-degree">{{this.degree}}</span>
<span class="cv-section__entry-dates">{{this.startDate}} – {{this.endDate}}</span>
</div>
<div class="cv-section__entry-school">
{{this.school}}{{#if this.field}} — {{this.field}}{{/if}}
</div>
{{#if this.description}}
<p class="cv-section__entry-desc">{{this.description}}</p>
{{/if}}
</li>
{{/each}}
</ul>
</section>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<section class="cv-section cv-section--personal">
<div class="cv-section__personal-header">
{{#if item.profilePicture}}
<img class="cv-section__profile-picture" src="{{item.profilePicture}}" alt="Photo de profil" />
{{else}}
<img
class="cv-section__profile-picture"
src="/assets/img/default_avatar.png"
alt="Photo de profil par défaut"
/>
{{/if}}

<div class="cv-section__personal-name">{{item.firstName}} {{item.lastName}}</div>
</div>

<ul class="cv-section__personal-details">
{{#if item.email}}
<li class="cv-section__personal-detail">
<span class="cv-section__personal-detail-label">Email</span>
<span>{{item.email}}</span>
</li>
{{/if}} {{#if item.phone}}
<li class="cv-section__personal-detail">
<span class="cv-section__personal-detail-label">Téléphone</span>
<span>{{item.phone}}</span>
</li>
{{/if}} {{#if item.address}}
<li class="cv-section__personal-detail">
<span class="cv-section__personal-detail-label">Adresse</span>
<span>{{item.address}}</span>
</li>
{{/if}}
</ul>
</section>
13 changes: 13 additions & 0 deletions @apps/backend/src/templates/template1/sections/langues.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<section class="cv-section cv-section--langues">
<h2 class="cv-section__title">{{title}}</h2>
<ul class="cv-section__langues-list">
{{#each items}}
<li class="cv-section__langue">
<span class="cv-section__langue-name">{{this.language}}</span>
{{#if this.level}}
<span class="cv-section__langue-niveau">{{this.level}}</span>
{{/if}}
</li>
{{/each}}
</ul>
</section>
4 changes: 4 additions & 0 deletions @apps/backend/src/templates/template1/sections/profil.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<section class="cv-section cv-section--profil">
<h2 class="cv-section__title">{{title}}</h2>
<p class="cv-section__profil-desc">{{item.description}}</p>
</section>
24 changes: 24 additions & 0 deletions @apps/backend/src/templates/template1/sections/références.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<section class="cv-section cv-section--references">
<h2 class="cv-section__title">{{title}}</h2>
<ul class="cv-section__list">
{{#each items}}
<li class="cv-section__entry cv-section__entry--reference">
<div class="cv-section__entry-header">
<span class="cv-section__entry-degree">{{this.name}}</span>
</div>
{{#if this.entreprise}}
<div class="cv-section__entry-school">
{{this.entreprise}}{{#if this.city}} — {{this.city}}{{/if}}
</div>
{{/if}}
<ul class="cv-section__ref-contacts">
{{#if this.phone}}
<li><span class="cv-section__personal-detail-label">Tél.</span> {{this.phone}}</li>
{{/if}} {{#if this.email}}
<li><span class="cv-section__personal-detail-label">Email</span> {{this.email}}</li>
{{/if}}
</ul>
</li>
{{/each}}
</ul>
</section>
Loading
Loading