fix(front): SnackBar de confirmation après refus dossier (#110)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
MARTIN Julien 2026-05-13 18:56:31 +02:00
parent 919148fa75
commit b6e83bf9ef
2 changed files with 18 additions and 0 deletions

View File

@ -500,6 +500,14 @@ class _ValidationAmWizardState extends State<ValidationAmWizard> {
try {
await UserService.refuseUser(widget.dossier.user.id, comment: comment);
if (!mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: const Text(
'Refus enregistré. Un e-mail avec le lien de reprise a été envoyé.',
),
duration: const Duration(seconds: 4),
),
);
widget.onSuccess();
} catch (e) {
if (!mounted) return;

View File

@ -733,6 +733,16 @@ class _ValidationFamilyWizardState extends State<ValidationFamilyWizard> {
await UserService.refuseUser(p.id, comment: comment);
}
if (!mounted) return;
final n = pending.length;
final msg = n > 1
? 'Refus enregistré pour $n comptes. Un e-mail de reprise a été envoyé à chacun.'
: 'Refus enregistré. Un e-mail avec le lien de reprise a été envoyé.';
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(msg),
duration: const Duration(seconds: 4),
),
);
widget.onSuccess();
} catch (e) {
if (!mounted) return;