From 707e40e840d6f8df3b4dffaff86f5cfe12800b0a Mon Sep 17 00:00:00 2001 From: MMD Date: Thu, 8 Oct 2026 11:13:53 +0330 Subject: [PATCH] fix(org): show the project-membership editor for supervisor/pm roles without panels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Supervisors are scoped by project membership (and are blocked at login without one), but the editor was hidden unless the user had a panel — a coordinator could never be given a project. Backend always allowed it. --- frontend/src/pages/Organization/OrganizationPage.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/Organization/OrganizationPage.tsx b/frontend/src/pages/Organization/OrganizationPage.tsx index 81db82e..6277576 100644 --- a/frontend/src/pages/Organization/OrganizationPage.tsx +++ b/frontend/src/pages/Organization/OrganizationPage.tsx @@ -212,6 +212,9 @@ export function OrganizationPage() { {users.map((u) => { const isAdmin = u.role === "admin"; const hasPanel = Boolean(u.panels?.procurement || u.panels?.inventory || u.panels?.pm); + // سرپرست/مدیر پروژه بدون پنل هم عضویت پروژهای میخواهد — + // ورود سرپرست بدون پروژه مسدود است، پس ویرایشگر باید باز باشد + const canAssignProjects = hasPanel || u.role === "supervisor" || u.role === "pm"; return ( @@ -320,7 +323,7 @@ export function OrganizationPage() { {isAdmin ? ( دسترسی خودکار به تمام پروژه‌ها - ) : hasPanel ? ( + ) : canAssignProjects ? (
({ id: p.id, name: p.name }))}