fix(front): SnackBar de confirmation après refus dossier (#110)
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
919148fa75
commit
b6e83bf9ef
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user