update user page and logo to be link also update profile page

This commit is contained in:
m7amedez5511
2026-08-17 16:24:58 +03:00
parent 17dc53fcfe
commit 55b03ad6f4
12 changed files with 453 additions and 211 deletions

View File

@@ -65,6 +65,11 @@ export default function UsersPage() {
{/* Create / Edit modal */}
{formTarget !== false && (
<UserFormModal
// CHANGE: added key — forces a full remount when switching between
// "new" and different edit targets, so useForm's defaultValues
// (roleId/branchId included) always reflect the correct user
// instead of possibly reusing stale state from a previous instance.
key={formTarget === null ? "new" : formTarget.id}
editUser={formTarget}
roles={roles}
branches={branches}