fix(#144): persister le consentement photo des enfants

- DTO inscription enfant : champ consent_photo
- Inscription + reprise parent : sauvegarde bool + date
- Front payload : envoi consent_photo
- PATCH /enfants : horodatage du consentement

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-17 12:36:05 +02:00
co-authored by Cursor
parent b4b546044d
commit 77d952a6f7
5 changed files with 27 additions and 4 deletions
@@ -167,6 +167,7 @@ class ParentRegistrationPayload {
final map = <String, dynamic>{
'genre': apiGenres.contains(c.genre) ? c.genre : 'Autre',
'grossesse_multiple': c.multipleBirth,
'consent_photo': c.photoConsent,
};
final prenom = c.firstName.trim();
+2 -2
View File
@@ -44,8 +44,8 @@ class RepriseMapper {
lastName: e.lastName ?? '',
dob: dob,
genre: e.gender ?? '',
// Inscription initiale exigeait la coche pour envoyer la photo ; le back
// ne persistait pas toujours consent_photo — on pré-coche si photo en base.
// Legacy : dossiers inscrits avant #144 avaient consent_photo=false malgré une photo.
// On pré-coche encore si photo en base pour ne pas bloquer la reprise.
photoConsent: e.consentPhoto || hasPhoto,
multipleBirth: e.estMultiple,
isUnbornChild: isUnborn,