feat(#112): reprise après refus — dossier complet, email resoumission

- GET/PATCH reprise-dossier enrichis (parents, enfants, motivation, fiche AM)
- Front: lien mail, modale identify login, wizards préremplis, PATCH complet
- Email accusé resoumission aux parents avec n° de dossier
- Fixes préremplissage AM (dates, places, ValueKey étape 2)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-16 19:19:55 +02:00
co-authored by Cursor
parent c226c2fcdf
commit b99745e0fe
36 changed files with 2460 additions and 85 deletions
+17 -1
View File
@@ -1,4 +1,5 @@
import 'dart:math' as math;
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
@@ -20,7 +21,7 @@ bool _hasChildPhoto(ChildData c) {
return registrationPhotoSlotHasImage(
imageBytes: c.imageBytes,
imageFile: c.imageFile,
imagePathOrAsset: null,
imagePathOrAsset: c.existingPhotoUrl,
);
}
@@ -33,6 +34,20 @@ Widget _buildChildPhotoImage(ChildData c, {required BoxFit fit}) {
if (f != null) {
return kIsWeb ? Image.network(f.path, fit: fit) : Image.file(f, fit: fit);
}
final url = c.existingPhotoUrl?.trim();
if (url != null && url.isNotEmpty) {
if (url.startsWith('http://') || url.startsWith('https://')) {
return Image.network(url, fit: fit);
}
if (!kIsWeb) {
try {
final file = File(url);
if (file.existsSync()) {
return Image.file(file, fit: fit);
}
} catch (_) {}
}
}
return Image.asset('assets/images/photo.png', fit: BoxFit.contain);
}
@@ -221,6 +236,7 @@ class _ChildCardWidgetState extends State<ChildCardWidget> {
scaleFactor: scaleFactor,
imageBytes: widget.childData.imageBytes,
imageFile: widget.childData.imageFile,
imagePathOrAsset: widget.childData.existingPhotoUrl,
onTapPick: !config.isReadonly ? widget.onPickImage : null,
onClear: !config.isReadonly ? widget.onClearImage : null,
baseShadowColor: baseCardColorForShadow,