feat(#131): fiches parent/AM éditable, placement AM↔enfant, statuts garde/sans_garde
Squash merge develop → master. - Fiche parent éditable (co-parent, PATCH fiche, GET /parents) - Fiche AM 3 onglets (PATCH fiche, rattacher/détacher enfants) - Table enfants_assistantes_maternelles + enum garde/sans_garde - Migration SQL + BDD.sql canonique - Correctifs recette : @Get() parents, DTO fiche AM, fix NIR Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -176,7 +176,7 @@ describe('AuthService (#118 create-password API)', () => {
|
||||
parentsServiceMock.getDossierFamilleByNumero.mockResolvedValue({
|
||||
numero_dossier: '2026-000021',
|
||||
parents: [{ user_id: 'p1', email: 'claire@test.fr', statut: StatutUtilisateurType.REFUSE }],
|
||||
enfants: [{ id: 'e1', first_name: 'Emma', status: 'actif' }],
|
||||
enfants: [{ id: 'e1', first_name: 'Emma', status: 'sans_garde' }],
|
||||
texte_motivation: 'Motivation test',
|
||||
});
|
||||
|
||||
|
||||
@@ -551,7 +551,7 @@ export class AuthService {
|
||||
? new Date(enfantDto.date_previsionnelle_naissance)
|
||||
: undefined;
|
||||
enfant.photo_url = urlPhoto || undefined;
|
||||
enfant.status = enfantDto.date_naissance ? StatutEnfantType.ACTIF : StatutEnfantType.A_NAITRE;
|
||||
enfant.status = enfantDto.date_naissance ? StatutEnfantType.SANS_GARDE : StatutEnfantType.A_NAITRE;
|
||||
enfant.consent_photo = false;
|
||||
enfant.is_multiple = enfantDto.grossesse_multiple || false;
|
||||
|
||||
@@ -1063,7 +1063,7 @@ export class AuthService {
|
||||
if (enfantDto.genre !== undefined) enfant.gender = enfantDto.genre;
|
||||
if (enfantDto.date_naissance !== undefined) {
|
||||
enfant.birth_date = new Date(enfantDto.date_naissance);
|
||||
enfant.status = StatutEnfantType.ACTIF;
|
||||
enfant.status = StatutEnfantType.SANS_GARDE;
|
||||
}
|
||||
if (enfantDto.date_previsionnelle_naissance !== undefined) {
|
||||
enfant.due_date = new Date(enfantDto.date_previsionnelle_naissance);
|
||||
|
||||
Reference in New Issue
Block a user