feat(#170): sélecteur couple enfant-parent(s) pour AM

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-24 12:19:26 +02:00
co-authored by Cursor
parent 34a516d509
commit 4261667198
2 changed files with 126 additions and 18 deletions
@@ -135,6 +135,16 @@ class _CoupleCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
// Parent mode: enfant | AM
// AM mode: enfant | parent(s)
final isParentMode = mode == CoupleBandeauMode.parent;
final fallbackRoleIcon = isParentMode ? Icons.volunteer_activism : Icons.person_outline;
final fallbackRoleName = isParentMode ? 'Nounou' : 'Parent';
// TODO: In AM mode, we should ideally display "parent1+parent2 empilés" or centered.
// For now, CoupleGarde only gives us `am` (which in AM mode might just represent one parent, or the system needs to feed both parents here).
// Assuming backend will populate `am` field with the parent data when called by AM.
return Container(
height: 90,
decoration: BoxDecoration(
@@ -175,14 +185,8 @@ class _CoupleCard extends StatelessWidget {
photoUrl: couple.am.photoUrl,
name: (couple.am.prenom != null && couple.am.prenom!.isNotEmpty)
? couple.am.prenom!
: couple.am.displayName(
fallback: mode == CoupleBandeauMode.parent
? 'Nounou'
: 'Parent',
),
fallbackIcon: mode == CoupleBandeauMode.parent
? Icons.volunteer_activism
: Icons.person_outline,
: couple.am.displayName(fallback: fallbackRoleName),
fallbackIcon: fallbackRoleIcon,
),
),
),