chore: câblage des absences/retard dans le suivi pédagogique

This commit is contained in:
N3WT DE COMPET
2025-05-25 19:18:17 +02:00
parent fd6348fd6b
commit 98763dc90a
4 changed files with 193 additions and 31 deletions

View File

@ -345,6 +345,7 @@ export default function Page() {
reason: reason,
moment: absenceData.moment,
establishment: selectedEstablishmentId,
commentaire: absenceData.commentaire,
};
if (absenceData.id) {
@ -574,7 +575,7 @@ export default function Page() {
Motif d'absence
</span>
</div>
<div className="grid grid-cols-1 md:grid-cols-3 gap-2 items-center">
<div className="grid grid-cols-1 md:grid-cols-4 gap-2 items-center">
{/* Select Absence/Retard */}
<SelectChoice
name={`type-${row.id}`}
@ -619,6 +620,23 @@ export default function Page() {
)}
/>
{/* Nouveau champ commentaire */}
<input
type="text"
className="border rounded px-2 py-1 text-sm w-full"
placeholder="Commentaire"
value={formAbsences[row.id]?.commentaire || ''}
onChange={(e) =>
setFormAbsences((prev) => ({
...prev,
[row.id]: {
...prev[row.id],
commentaire: e.target.value,
},
}))
}
/>
{/* Checkbox Justifié */}
<div className="flex items-center gap-2 justify-center">
<CheckBox