feat(#173): ajouter la teinte aqua aux cartes (V + H)

Enums, mappings formulaires / bulles / enfants, assets inclus.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-01 17:10:41 +02:00
co-authored by Cursor
parent da12418aa0
commit 6683139429
12 changed files with 26 additions and 6 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ Avec données peuplées, sur au moins 2 supports :
- Parent : `frontend/lib/screens/home/parent_screen/ParentDashboardScreen.dart` + `dashbord_parent/`
- AM : `frontend/lib/screens/am/am_dashboard_screen.dart` (placeholder)
- Cartes couleurs : `frontend/assets/cards/` (7 teintes max)
- Cartes couleurs : `frontend/assets/cards/` (8 teintes max)
## 9. Ordre de build suggéré
Binary file not shown.

After

Width:  |  Height:  |  Size: 741 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 KiB

+4 -2
View File
@@ -7,7 +7,8 @@ enum CardColorVertical {
lime('assets/cards/card_lime.png'),
lavender('assets/cards/card_lavender.png'),
green('assets/cards/card_green.png'),
blue('assets/cards/card_blue.png');
blue('assets/cards/card_blue.png'),
aqua('assets/cards/card_aqua.png');
final String path;
const CardColorVertical(this.path);
@@ -20,7 +21,8 @@ enum CardColorHorizontal {
lime('assets/cards/card_lime_h.png'),
lavender('assets/cards/card_lavender_h.png'),
green('assets/cards/card_green_h.png'),
blue('assets/cards/card_blue_h.png');
blue('assets/cards/card_blue_h.png'),
aqua('assets/cards/card_aqua_h.png');
final String path;
const CardColorHorizontal(this.path);
+2
View File
@@ -155,6 +155,8 @@ class CarteBulle {
return CardColorHorizontal.green.path;
case 'blue':
return CardColorHorizontal.blue.path;
case 'aqua':
return CardColorHorizontal.aqua.path;
default:
return CardColorHorizontal.peach.path;
}
@@ -41,6 +41,7 @@ class _ParentRegisterStep3ScreenState extends State<ParentRegisterStep3Screen> {
CardColorVertical.red,
CardColorVertical.green,
CardColorVertical.blue,
CardColorVertical.aqua,
];
// Garder une trace des couleurs déjà utilisées
+1
View File
@@ -17,6 +17,7 @@ class RepriseMapper {
CardColorVertical.red,
CardColorVertical.green,
CardColorVertical.blue,
CardColorVertical.aqua,
];
static ParentData parentFromDossier(ParentDossier p) {
@@ -185,6 +185,8 @@ class BaseFormScreen extends StatelessWidget {
return CardColorVertical.pink.path;
case CardColorHorizontal.red:
return CardColorVertical.red.path;
case CardColorHorizontal.aqua:
return CardColorVertical.aqua.path;
}
}
+8 -2
View File
@@ -205,9 +205,14 @@ class _ChildCardWidgetState extends State<ChildCardWidget> {
);
}
final Color baseCardColorForShadow = widget.childData.cardColor == CardColorVertical.lavender
final Color baseCardColorForShadow =
widget.childData.cardColor == CardColorVertical.lavender
? Colors.purple.shade200
: (widget.childData.cardColor == CardColorVertical.pink ? Colors.pink.shade200 : Colors.grey.shade200);
: (widget.childData.cardColor == CardColorVertical.pink
? Colors.pink.shade200
: (widget.childData.cardColor == CardColorVertical.aqua
? Colors.teal.shade200
: Colors.grey.shade200));
final double photoSide = 200.0 * (config.isMobile ? 0.8 : 1.0);
final double editableCardWidth = config.isMobile
? double.infinity
@@ -340,6 +345,7 @@ class _ChildCardWidgetState extends State<ChildCardWidget> {
// Mapping manuel simple
if (widget.childData.cardColor.path.contains('lavender')) horizontalCardAsset = CardColorHorizontal.lavender.path;
else if (widget.childData.cardColor.path.contains('aqua')) horizontalCardAsset = CardColorHorizontal.aqua.path;
else if (widget.childData.cardColor.path.contains('blue')) horizontalCardAsset = CardColorHorizontal.blue.path;
else if (widget.childData.cardColor.path.contains('green')) horizontalCardAsset = CardColorHorizontal.green.path;
else if (widget.childData.cardColor.path.contains('lime')) horizontalCardAsset = CardColorHorizontal.lime.path;
@@ -1302,6 +1302,8 @@ class _PersonalInfoFormScreenState extends State<PersonalInfoFormScreen> {
return CardColorVertical.pink.path;
case CardColorHorizontal.red:
return CardColorVertical.red.path;
case CardColorHorizontal.aqua:
return CardColorVertical.aqua.path;
}
}
}
@@ -642,6 +642,8 @@ class _PresentationFormScreenState extends State<PresentationFormScreen> {
return CardColorVertical.pink.path;
case CardColorHorizontal.red:
return CardColorVertical.red.path;
case CardColorHorizontal.aqua:
return CardColorVertical.aqua.path;
}
}
}
@@ -1196,6 +1196,8 @@ class _ProfessionalInfoFormScreenState extends State<ProfessionalInfoFormScreen>
return CardColorVertical.pink.path;
case CardColorHorizontal.red:
return CardColorVertical.red.path;
case CardColorHorizontal.aqua:
return CardColorVertical.aqua.path;
}
}
}