feat(#140): fiches admin famille — IdentityBlock, parsing enfants et avatars web
Extrait IdentityBlock réutilisable, aligne les modales parent/enfant sur le style validation, corrige le parsing parentChildren et les URLs /uploads en Flutter web. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -89,8 +89,10 @@ class EnfantParentLink {
|
||||
EnfantParentLink({required this.parentId, this.parentName});
|
||||
|
||||
factory EnfantParentLink.fromJson(Map<String, dynamic> json) {
|
||||
final parent = json['parent'];
|
||||
final parentId =
|
||||
(json['parentId'] ?? json['id_parent'] ?? '').toString();
|
||||
String? name;
|
||||
final parent = json['parent'];
|
||||
if (parent is Map<String, dynamic>) {
|
||||
final user = parent['user'];
|
||||
if (user is Map<String, dynamic>) {
|
||||
@@ -99,7 +101,7 @@ class EnfantParentLink {
|
||||
}
|
||||
}
|
||||
return EnfantParentLink(
|
||||
parentId: (json['parentId'] ?? json['id_parent'] ?? '').toString(),
|
||||
parentId: parentId,
|
||||
parentName: name,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user