feat(#131): grille enfants AM, statuts garde et polish champs admin.
Aligne le front sur les statuts enfant back (garde/sans_garde), refond l’onglet Enfants accueillis en grille 2×2 avec correction des places, et unifie les champs validation éditables/lecture seule. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:p_tits_pas/models/user.dart';
|
||||
import 'package:p_tits_pas/utils/enfant_status_utils.dart';
|
||||
|
||||
/// Réponse unifiée GET /dossiers/:numeroDossier. Ticket #119, #107.
|
||||
class DossierUnifie {
|
||||
@@ -220,7 +221,7 @@ class EnfantDossier {
|
||||
lastName: (json['last_name'] ?? json['nom'])?.toString(),
|
||||
birthDate: json['birth_date']?.toString(),
|
||||
gender: (json['gender'] ?? json['genre'])?.toString(),
|
||||
status: json['status']?.toString(),
|
||||
status: normalizeEnfantStatus(json['status']?.toString()),
|
||||
dueDate: json['due_date']?.toString(),
|
||||
photoUrl: resolvedPhoto,
|
||||
consentPhoto:
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:p_tits_pas/models/user.dart';
|
||||
import 'package:p_tits_pas/utils/enfant_status_utils.dart';
|
||||
|
||||
/// Enfant tel que renvoyé par `GET /enfants` (dashboard admin).
|
||||
class EnfantAdminModel {
|
||||
@@ -54,7 +55,7 @@ class EnfantAdminModel {
|
||||
gender: json['gender'] as String?,
|
||||
birthDate: _dateString(json['birth_date']),
|
||||
dueDate: _dateString(json['due_date']),
|
||||
status: (json['status'] ?? '').toString(),
|
||||
status: normalizeEnfantStatus(json['status']?.toString()),
|
||||
photoUrl: json['photo_url'] as String?,
|
||||
consentPhoto: json['consent_photo'] == true,
|
||||
isMultiple: json['is_multiple'] == true,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:p_tits_pas/models/enfant_admin_model.dart';
|
||||
import 'package:p_tits_pas/utils/enfant_status_utils.dart';
|
||||
|
||||
/// Résumé enfant affiché dans la fiche parent (dashboard admin).
|
||||
class ParentChildSummary {
|
||||
@@ -33,7 +34,9 @@ class ParentChildSummary {
|
||||
id: (json['id'] ?? '').toString(),
|
||||
firstName: (json['first_name'] ?? json['prenom'])?.toString(),
|
||||
lastName: (json['last_name'] ?? json['nom'])?.toString(),
|
||||
status: (json['status'] ?? json['statut'] ?? '').toString(),
|
||||
status: normalizeEnfantStatus(
|
||||
(json['status'] ?? json['statut'])?.toString(),
|
||||
),
|
||||
photoUrl: json['photo_url']?.toString(),
|
||||
birthDate: _dateString(json['birth_date']),
|
||||
dueDate: _dateString(json['due_date']),
|
||||
|
||||
Reference in New Issue
Block a user