fix(#131): polish fiche AM — champs pro, places, vigilance et photo.

Fiche pro entièrement éditable, places déclarées en lecture seule avec alerte rouge, icône vigilance sur la liste AM, et cadrage photo aligné sur le wizard validation.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-06 17:37:21 +02:00
co-authored by Cursor
parent 479a32b4bf
commit 4985726bc6
10 changed files with 315 additions and 113 deletions
+19 -1
View File
@@ -10,7 +10,25 @@ String formatIsoDateFr(String? s, {String ifEmpty = ''}) {
}
}
/// Parties d'âge calendaire entre [birth] et [reference] (date-only).
/// Convertit `dd/MM/yyyy` (ou ISO) en `yyyy-MM-dd` pour l'API.
String? parseFrDateToIso(String text) {
final t = text.trim();
if (t.isEmpty) return null;
try {
return DateFormat('dd/MM/yyyy')
.parseStrict(t)
.toIso8601String()
.split('T')
.first;
} catch (_) {
try {
return DateTime.parse(t).toIso8601String().split('T').first;
} catch (_) {
return null;
}
}
}
({int years, int months, int days}) computeChildAgeParts(
DateTime birth,
DateTime reference,