fix: superadmin can now assign brands/modules to themselves
All checks were successful
Deploy / deploy (push) Successful in 11s

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 <noreply@anthropic.com>
This commit is contained in:
fahed
2026-03-05 15:31:23 +03:00
parent 93956ff117
commit 70de02c97c

View File

@@ -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,