mirror of
https://github.com/R0m1k3/Presencia.git
synced 2026-10-11 17:27:42 +02:00
Afficher l'utilisateur tout juste créé même si un filtre était actif
Le filtre société et la recherche sont partagés avec l'écran Plannings : une valeur restée en place masquait le compte créé, alors que le toast annonçait « Utilisateur enregistré ». Après une création, on remet les filtres à zéro pour que le nouveau compte soit visible. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D5Bdayziw6tybgqETZoNSt
This commit is contained in:
1 file changed
+8
@@ -837,6 +837,14 @@
|
|||||||
if (edit) await api(`/users/${user.id}`, { method: 'PUT', body });
|
if (edit) await api(`/users/${user.id}`, { method: 'PUT', body });
|
||||||
else await api('/users', { method: 'POST', body });
|
else await api('/users', { method: 'POST', body });
|
||||||
closeDialog();
|
closeDialog();
|
||||||
|
if (!edit) {
|
||||||
|
// The company filter and search are shared with "Plannings": a leftover
|
||||||
|
// value would hide the account just created, as if it had not been saved.
|
||||||
|
state.filterCompany = 'all';
|
||||||
|
state.search = '';
|
||||||
|
$('us-co').value = 'all';
|
||||||
|
$('us-q').value = '';
|
||||||
|
}
|
||||||
toast('Utilisateur enregistré');
|
toast('Utilisateur enregistré');
|
||||||
await refreshUsers();
|
await refreshUsers();
|
||||||
} catch (err) { toast(err.message, 'error'); }
|
} catch (err) { toast(err.message, 'error'); }
|
||||||
|
|||||||
Reference in new issue
Block a user