From 70de02c97c0f81327db5dbdbdbd85961c0d08efc Mon Sep 17 00:00:00 2001 From: fahed Date: Thu, 5 Mar 2026 15:31:23 +0300 Subject: [PATCH] fix: superadmin can now assign brands/modules to themselves The self-edit path only sent name+phone. Superadmins now use the full team update endpoint so brands, modules, and role changes persist. Co-Authored-By: Claude Opus 4.6 --- client/src/pages/Team.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/pages/Team.jsx b/client/src/pages/Team.jsx index 47e7a3a..c6d6317 100644 --- a/client/src/pages/Team.jsx +++ b/client/src/pages/Team.jsx @@ -131,7 +131,7 @@ export default function Team() { const handlePanelSave = async (memberId, data, isEditingSelf) => { try { - if (isEditingSelf) { + if (isEditingSelf && user?.role !== 'superadmin') { await api.patch('/users/me/profile', { name: data.name, phone: data.phone,