feat(#112): aligner reprise front sur dossier complet GET/PATCH

Préremplit parents, enfants, motivation et fiche AM depuis reprise-dossier
et envoie le body PATCH complet (co-parent, enfants par id, champs pro AM).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-16 16:46:51 +02:00
co-authored by Cursor
parent 25c10c885a
commit f300505225
11 changed files with 439 additions and 92 deletions
@@ -149,6 +149,20 @@ class ParentRegistrationPayload {
return body;
}
/// Enfant pour PATCH reprise (inclut `id` si connu).
static Map<String, dynamic> childToRepriseJson(
ChildData c,
int index,
String parentNom,
) {
final map = _childToJson(c, index, parentNom);
final id = c.repriseChildId?.trim();
if (id != null && id.isNotEmpty) {
map['id'] = id;
}
return map;
}
static Map<String, dynamic> _childToJson(ChildData c, int index, String parentNom) {
final map = <String, dynamic>{
'genre': apiGenres.contains(c.genre) ? c.genre : 'Autre',