fix(#112): afficher photos enfants en reprise + consentement cohérent

Charge existingPhotoUrl dans les cartes enfant (étapes 3 et 5) et pré-coche
le consentement photo lorsqu'une photo est déjà en base.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-16 17:00:15 +02:00
co-authored by Cursor
parent f300505225
commit 9b7231f1da
5 changed files with 36 additions and 7 deletions
+4 -1
View File
@@ -37,12 +37,15 @@ class RepriseMapper {
? isoToDdMmYyyy(e.dueDate)
: isoToDdMmYyyy(e.birthDate);
final photo = e.photoUrl?.trim();
final hasPhoto = photo != null && photo.isNotEmpty;
return ChildData(
firstName: e.firstName ?? '',
lastName: e.lastName ?? '',
dob: dob,
genre: e.gender ?? '',
photoConsent: e.consentPhoto,
// Inscription initiale exigeait la coche pour envoyer la photo ; le back
// ne persistait pas toujours consent_photo — on pré-coche si photo en base.
photoConsent: e.consentPhoto || hasPhoto,
multipleBirth: e.estMultiple,
isUnbornChild: isUnborn,
cardColor: _childCardColors[index % _childCardColors.length],