feat(#140): dashboard admin ch.6 — fiche parent, enfants, affiliation

Back: PATCH /parents/:id/fiche, attach/detach enfant, GET /enfants enrichi.
Front: modale parent éditable, onglet Enfants, fiche enfant, UserService.

Couvre doc 28 §6.1–6.2 ; tickets liés #115 #116 #130 #131 #137 #138.
Hors scope: fiche AM (#131), création admin (#129).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-17 00:35:00 +02:00
co-authored by Cursor
parent df776d8200
commit 1dddc67933
20 changed files with 1818 additions and 68 deletions
@@ -0,0 +1,31 @@
/// Résumé enfant affiché dans la fiche parent (dashboard admin).
class ParentChildSummary {
final String id;
final String? firstName;
final String? lastName;
final String status;
ParentChildSummary({
required this.id,
this.firstName,
this.lastName,
required this.status,
});
String get fullName {
final fn = (firstName ?? '').trim();
final ln = (lastName ?? '').trim();
if (fn.isEmpty && ln.isEmpty) return 'Enfant';
if (ln.isEmpty) return fn;
return '$fn $ln';
}
factory ParentChildSummary.fromJson(Map<String, dynamic> json) {
return ParentChildSummary(
id: (json['id'] ?? '').toString(),
firstName: json['first_name'] as String?,
lastName: json['last_name'] as String?,
status: (json['status'] ?? '').toString(),
);
}
}