diff --git a/frontend/public/js/app.js b/frontend/public/js/app.js index 2341cda..05025d3 100644 --- a/frontend/public/js/app.js +++ b/frontend/public/js/app.js @@ -837,6 +837,14 @@ if (edit) await api(`/users/${user.id}`, { method: 'PUT', body }); else await api('/users', { method: 'POST', body }); 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é'); await refreshUsers(); } catch (err) { toast(err.message, 'error'); }