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
38 changes: 19 additions & 19 deletions @apps/backend/src/seeders/curriculumInjector.seeder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ export default function curriculumInjectorSeeder(em: EntityManager) {
id: "e2e-c1",
userId: "e2e-login-user",
title: "CV Complet - Amaury Deflorenne",
createdAt: new Date("2025-06-01"),
updatedAt: new Date("2025-06-01"),
createdAt: new Date("01/06/2025"),
updatedAt: new Date("01/06/2025"),
}) as CurriculumEntityType;

const c1Perso = createSection(
Expand Down Expand Up @@ -107,7 +107,7 @@ export default function curriculumInjectorSeeder(em: EntityManager) {
firstName: "Amaury",
lastName: "Deflorenne",
email: "amaury@gmail.com",
phone: "0601020304",
phone: "+32601020304",
address: "123 rue de la paix, 75000 Paris",
});
createItem(em, "e2e-c1-s2-profil-i1", c1Profil, 0, {
Expand All @@ -118,7 +118,7 @@ export default function curriculumInjectorSeeder(em: EntityManager) {
employer: "Triptyk",
position: "Développeur Fullstack",
city: "Lyon",
startDate: "2022-03-01",
startDate: "01/03/2022",
endDate: "",
description:
"Développement d'applications web avec Ember.js et Node.js. Mise en place d'architectures microservices.",
Expand All @@ -127,60 +127,60 @@ export default function curriculumInjectorSeeder(em: EntityManager) {
employer: "WebAgency",
position: "Développeur Frontend",
city: "Paris",
startDate: "2020-06-01",
endDate: "2022-02-28",
startDate: "01/06/2020",
endDate: "28/02/2022",
description:
"Intégration et développement d'interfaces React. Optimisation des performances frontend.",
});
createItem(em, "e2e-c1-s3-exp-i3", c1Exp, 2, {
employer: "StartupX",
position: "Stagiaire Développeur",
city: "Lyon",
startDate: "2019-01-01",
endDate: "2019-12-31",
startDate: "01/01/2019",
endDate: "31/12/2019",
description:
"Stage de fin d'études axé sur le développement d'une application mobile en React Native.",
});
createItem(em, "e2e-c1-s3-exp-i4", c1Exp, 3, {
employer: "Freelance",
position: "Développeur Web",
city: "Lyon",
startDate: "2018-01-01",
endDate: "2018-12-31",
startDate: "01/01/2018",
endDate: "31/12/2018",
description:
"Réalisation de plusieurs projets web pour des clients locaux, principalement en JavaScript.",
});
createItem(em, "e2e-c1-s3-exp-i5", c1Exp, 4, {
employer: "Université de Lyon",
position: "Assistant de Recherche",
city: "Lyon",
startDate: "2017-01-01",
endDate: "2017-12-31",
startDate: "01/01/2017",
endDate: "31/12/2017",
description:
"Participation à un projet de recherche sur les systèmes distribués. Publication d'un article dans une conférence internationale.",
});
createItem(em, "e2e-c1-s4-form-i1", c1Form, 0, {
school: "Université de Lyon",
degree: "Master Informatique",
field: "Génie Logiciel",
startDate: "2018-09-01",
endDate: "2020-06-30",
startDate: "01/09/2018",
endDate: "30/06/2020",
description: "Spécialisation en architecture logicielle et développement web.",
});
createItem(em, "e2e-c1-s4-form-i2", c1Form, 1, {
school: "Université de Paris",
degree: "Licence Informatique",
field: "Informatique",
startDate: "2015-09-01",
endDate: "2018-06-30",
startDate: "01/09/2015",
endDate: "30/06/2018",
description: "Formation généraliste en informatique.",
});
createItem(em, "e2e-c1-s4-form-i3", c1Form, 2, {
school: "Lycée Jean Moulin",
degree: "Baccalauréat Scientifique",
field: "Sciences de l'ingénieur",
startDate: "2012-09-01",
endDate: "2015-06-30",
startDate: "01/09/2012",
endDate: "30/06/2015",
description: "Mention Bien.",
});
createItem(em, "e2e-c1-s5-comp-i1", c1Comp, 0, { competence: "TypeScript", level: "Expert" });
Expand All @@ -194,7 +194,7 @@ export default function curriculumInjectorSeeder(em: EntityManager) {
name: "Jean Dupont",
entreprise: "Triptyk",
email: "jean.dupont@triptyk.eu",
phone: "0612345678",
phone: "+32612345678",
city: "Lyon",
});
}
10 changes: 10 additions & 0 deletions @apps/backend/src/seeders/development.seeder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ export class DatabaseSeeder extends Seeder {
firstName: "Amaury",
lastName: "Deflorenne",
password: hashedPassword,
role: "admin",
});

em.create(UserEntity, {
id: "e2e-login-user-2",
email: "jean@triptyk.eu",
firstName: "Jean",
lastName: "Bourgies",
password: hashedPassword,
role: "user",
});

curriculumInjectorSeeder(em);
Expand Down
4 changes: 4 additions & 0 deletions @apps/backend/src/seeders/e2e.seeder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export class E2ESeeder extends Seeder {
firstName: "Amaury",
lastName: "Deflorenne",
password: hashedPassword,
role: "admin",
});

// Mock users that match the MSW mock data
Expand All @@ -25,6 +26,7 @@ export class E2ESeeder extends Seeder {
firstName: "John",
lastName: "Doe",
password: hashedPassword,
role: "user",
});

em.create(UserEntity, {
Expand All @@ -33,6 +35,7 @@ export class E2ESeeder extends Seeder {
firstName: "Jane",
lastName: "Smith",
password: hashedPassword,
role: "user",
});

em.create(UserEntity, {
Expand All @@ -41,6 +44,7 @@ export class E2ESeeder extends Seeder {
firstName: "Bob Johnson",
lastName: "Johnson",
password: hashedPassword,
role: "user",
});
}
}
24 changes: 5 additions & 19 deletions @apps/backend/src/templates/template1/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@

@page {
size: A4 portrait;
margin: 0; /* On gère les marges en CSS pour le fond perdu */
margin: 0;
}

html {
/* L'astuce cruciale : Le fond est dessiné sur toute la hauteur du doc */
background: linear-gradient(to right, #1a2e4a 0%, #1a2e4a 72mm, #ffffff 72mm, #ffffff 100%);
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
Expand All @@ -26,8 +25,8 @@ body {
font-size: 10pt;
line-height: 1.5;
color: #2d2d2d;
background: transparent; /* Laisse voir le fond du html */
padding: 15mm 0; /* Simule les marges haut/bas sur chaque page */
background: transparent;
padding: 15mm 0;
}

/* ── Structure ────────────────────────────────────────── */
Expand All @@ -41,15 +40,15 @@ body {
/* ── Sidebar ──────────────────────────────────────────── */
.cv__sidebar {
color: #ecf0f1;
padding: 0 7mm 10mm 7mm; /* Marge haut gérée par le body */
padding: 0 7mm 10mm 7mm;
display: flex;
flex-direction: column;
gap: 8mm;
}

/* ── Main ─────────────────────────────────────────────── */
.cv__main {
padding: 0 10mm 10mm 8mm; /* Marge haut gérée par le body */
padding: 0 10mm 10mm 8mm;
display: flex;
flex-direction: column;
gap: 7mm;
Expand Down Expand Up @@ -219,16 +218,3 @@ body {
padding: 1mm 2.5mm;
border-radius: 1mm;
}

/* ── Ajustements spécifiques pour l'écran (Preview) ─── */
@media screen {
body {
background: #e0e0e0;
padding: 20px;
}
.cv {
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
min-height: 297mm;
background: white; /* Pour la préview écran */
}
}
13 changes: 0 additions & 13 deletions @apps/backend/src/templates/template2/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -218,16 +218,3 @@ body {
padding: 1mm 2.5mm;
border-radius: 1mm;
}

/* ── Ajustements spécifiques pour l'écran (Preview) ─── */
@media screen {
body {
background: #e8e0f0;
padding: 20px;
}
.cv {
box-shadow: 0 10px 30px rgba(45, 27, 78, 0.25);
min-height: 297mm;
background: white;
}
}
1 change: 1 addition & 0 deletions @apps/backend/tests/utils/user.seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export class DatabaseSeeder extends Seeder {
firstName: "Amaury",
lastName: "Deflorenne",
password: hashedPassword,
role: "admin",
});
}
}
45 changes: 24 additions & 21 deletions @apps/front/app/templates/dashboard.gts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default class DashboardTemplate extends Component {
}

get menuItems(): SidebarItem[] {
return [
const base: SidebarItem[] = [
{
type: 'link',
label: this.intl.t('dashboard.sidebar.dashboard'),
Expand All @@ -61,26 +61,6 @@ export default class DashboardTemplate extends Component {
</svg>
</template> as TOC<{ Element: SVGSVGElement }>,
},
{
type: 'link',
label: this.intl.t('dashboard.sidebar.users'),
route: 'dashboard.users',
icon: <template>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
class="inline-block size-4 stroke-current"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"
/>
</svg>
</template> as TOC<{ Element: SVGSVGElement }>,
},
{
type: 'link',
label: this.intl.t('dashboard.sidebar.curriculums'),
Expand Down Expand Up @@ -109,6 +89,29 @@ export default class DashboardTemplate extends Component {
</template> as TOC<{ Element: SVGSVGElement }>,
},
];
if (this.currentUser.user?.role === 'admin') {
base.push({
type: 'link',
label: this.intl.t('dashboard.sidebar.users'),
route: 'dashboard.users',
icon: <template>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
class="inline-block size-4 stroke-current"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"
/>
</svg>
</template> as TOC<{ Element: SVGSVGElement }>,
});
}
return base;
}

get userForNav() {
Expand Down
8 changes: 8 additions & 0 deletions @apps/front/translations/curriculums/en-us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,16 @@ moreActions:
download: 'Download'
rename: 'Rename'
validation:
selectModel:
required: 'A model must be selected'
minimumLength: 'A model must be selected'
maximumLength: 'A model must be selected'
titleRequired: 'Title is required'
minimumTitleLength: 'Title must be at least 1 character long'
maximumTitleLength: 'Title must be at most 255 characters long'
maximumLength: 'Maximum length is 255 characters'
invalidPhoneNumber: 'Invalid phone number'
invalidEmail: 'Invalid email address'
create:
createSuccess: 'Curriculum vitae created successfully'
edit:
Expand All @@ -26,3 +33,4 @@ edit:
noTitle: 'Untitled'
selectTemplate: 'Select a template'
chooseFile: 'Choose a file'
saveItem: 'Save'
8 changes: 8 additions & 0 deletions @apps/front/translations/curriculums/fr-fr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,16 @@ moreActions:
download: 'Télécharger'
rename: 'Renommer'
validation:
selectModel:
required: 'Un modèle doit être sélectionné'
minimumLength: 'Un modèle doit être sélectionné'
maximumLength: 'Un modèle doit être sélectionné'
titleRequired: 'Le titre est requis'
minimumTitleLength: 'Le titre doit comporter au moins 1 caractère'
maximumTitleLength: 'Le titre doit comporter au maximum 255 caractères'
maximumLength: 'La longueur maximale est de 255 caractères'
invalidPhoneNumber: 'Numéro de téléphone invalide'
invalidEmail: 'Adresse e-mail invalide'
create:
createSuccess: 'Le curriculum vitae a été créé avec succès'
edit:
Expand All @@ -26,3 +33,4 @@ edit:
noTitle: 'Sans titre'
selectTemplate: 'Sélectionnez un modèle'
chooseFile: 'Choisir un fichier'
saveItem: 'Enregistrer'
3 changes: 3 additions & 0 deletions @apps/front/translations/users/en-us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ table:
firstName: 'First Name'
lastName: 'Last Name'
email: 'Email'
role: 'Role'
actions:
addUser: 'Add User'
edit: 'Edit'
Expand All @@ -26,13 +27,15 @@ forms:
lastName: 'Last Name'
password: 'Password'
email: 'Email'
role: 'Role'
validation:
firstNameRequired: 'First name is required'
lastNameRequired: 'Last name is required'
invalidEmail: 'Invalid email address'
passwordRequired: 'Password is required'
passwordTooShort: 'Min 8 characters'
minLength: 'At least 2 characters'
invalidRole: 'Invalid role'
actions:
submit: 'Submit'
back: 'Back to users'
Expand Down
Loading
Loading