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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user