Checkpoint: Ajout du champ "Fonction" (Directeur, Chef de service, Autre) dans la fiche apprenant : mise à jour du schéma de base de données, ajout dans les formulaires d'inscription et de gestion des apprenants, affichage dans le tableau des apprenants, et intégration dans tous les exports (Excel, PDF, feuille de présence).
This commit is contained in:
@@ -11,6 +11,7 @@ interface InscriptionExport {
|
||||
prenom: string;
|
||||
email: string;
|
||||
codeEtablissement: string;
|
||||
fonction: string;
|
||||
statut: string;
|
||||
dateInscription: Date;
|
||||
}
|
||||
@@ -36,6 +37,7 @@ export function generateExcelExport(
|
||||
'Prénom': i.prenom,
|
||||
'Email': i.email,
|
||||
'Code établissement': i.codeEtablissement,
|
||||
'Fonction': i.fonction === 'directeur' ? 'Directeur' : i.fonction === 'chef_service' ? 'Chef de service' : 'Autre',
|
||||
'Statut': i.statut === 'confirmee' ? 'Confirmée' : i.statut === 'liste_attente' ? 'Liste d\'attente' : 'Annulée',
|
||||
'Date d\'inscription': i.dateInscription.toLocaleDateString('fr-FR'),
|
||||
}));
|
||||
@@ -122,12 +124,13 @@ export function generatePDFExport(
|
||||
i.prenom,
|
||||
i.email,
|
||||
i.codeEtablissement,
|
||||
i.fonction === 'directeur' ? 'Directeur' : i.fonction === 'chef_service' ? 'Chef de service' : 'Autre',
|
||||
i.statut === 'confirmee' ? 'Confirmée' : i.statut === 'liste_attente' ? 'Liste d\'attente' : 'Annulée',
|
||||
]);
|
||||
|
||||
autoTable(doc, {
|
||||
startY: yPos + 10,
|
||||
head: [['Nom', 'Prénom', 'Email', 'Code étab.', 'Statut']],
|
||||
head: [['Nom', 'Prénom', 'Email', 'Code étab.', 'Fonction', 'Statut']],
|
||||
body: tableData,
|
||||
styles: { fontSize: 9 },
|
||||
headStyles: { fillColor: [37, 99, 235] },
|
||||
@@ -173,17 +176,18 @@ export function generateFeuillePresence(
|
||||
i.nom,
|
||||
i.prenom,
|
||||
i.codeEtablissement,
|
||||
i.fonction === 'directeur' ? 'Directeur' : i.fonction === 'chef_service' ? 'Chef de service' : 'Autre',
|
||||
'', // Colonne signature
|
||||
]);
|
||||
|
||||
autoTable(doc, {
|
||||
startY: yPos + 10,
|
||||
head: [['Nom', 'Prénom', 'Code établissement', 'Signature']],
|
||||
head: [['Nom', 'Prénom', 'Code établissement', 'Fonction', 'Signature']],
|
||||
body: tableData,
|
||||
styles: { fontSize: 10, cellPadding: 5 },
|
||||
headStyles: { fillColor: [37, 99, 235] },
|
||||
columnStyles: {
|
||||
3: { cellWidth: 40 }, // Largeur pour la colonne signature
|
||||
4: { cellWidth: 40 }, // Largeur pour la colonne signature
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user