feat(#206): backend cartes rose soin_enfant (3 sous-types, instant T, correction 24h)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-08 16:46:54 +02:00
co-authored by Cursor
parent a36e9ef176
commit 8af579be53
8 changed files with 262 additions and 26 deletions
@@ -196,7 +196,7 @@ export class EvenementsAgendaService {
}
private statutInitial(type: TypeEvenementAgendaType): StatutEvenementAgendaType {
if (type === TypeEvenementAgendaType.ABSENCE_ENFANT) {
if (type === TypeEvenementAgendaType.ABSENCE_ENFANT || type === TypeEvenementAgendaType.SOIN_ENFANT) {
return StatutEvenementAgendaType.ACCEPTE;
}
return StatutEvenementAgendaType.EN_ATTENTE;
@@ -233,10 +233,11 @@ export class EvenementsAgendaService {
if (role === RoleType.ASSISTANTE_MATERNELLE) {
if (
type !== TypeEvenementAgendaType.CONGE_AM &&
type !== TypeEvenementAgendaType.ARRET_MALADIE_AM
type !== TypeEvenementAgendaType.ARRET_MALADIE_AM &&
type !== TypeEvenementAgendaType.SOIN_ENFANT
) {
throw new ForbiddenException(
'Une AM ne peut créer que congé ou arrêt maladie',
'Une AM ne peut créer que congé, arrêt maladie ou soin enfant',
);
}
return;