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
@@ -9,6 +9,7 @@ import '../../models/card_assets.dart';
import '../../config/display_config.dart';
import '../../services/auth_service.dart';
import '../../services/reprise_session.dart';
import '../../utils/reprise_payload.dart';
import '../../widgets/hover_relief_widget.dart';
import '../../widgets/image_button.dart';
import '../../widgets/custom_navigation_button.dart';
@@ -59,14 +60,11 @@ class _AmRegisterStep4ScreenState extends State<AmRegisterStep4Screen> {
try {
if (RepriseSession.isActive) {
await AuthService.resoumettreReprise(
token: RepriseSession.token!,
prenom: registrationData.firstName,
nom: registrationData.lastName,
telephone: registrationData.phone,
adresse: registrationData.streetAddress,
ville: registrationData.city,
codePostal: registrationData.postalCode,
photoUrl: RepriseSession.photoUrl,
await ReprisePayload.amPatch(
registrationData,
RepriseSession.token!,
existingPhotoUrl: RepriseSession.photoUrlForApi,
),
);
RepriseSession.clear();
if (!mounted) return;