feat: PM panel under ERP shell + project-supervisor role
- /panel/pm: the PM app (served on the same origin under /pm) is embedded as a full-height iframe; supervisors are funneled there from every route, ERP MobileTabBar hidden on that route - Panels menu: «مدیریت پروژه (PM)» is an internal route (admin/pm/supervisor only — procurement managers do not see it); PM link is no longer external - New system role 'supervisor' (user_role enum): label in users router, allowed in UserRoleUpdate schema, deny-by-default on all ERP routers; admin panel can grant/revoke it alongside procurement manager - Removed the obsolete VITE_PM_URL build plumbing (same-origin now)
This commit is contained in:
@@ -41,6 +41,8 @@ USER_ROLE_LABELS = {
|
||||
"pm": "مدیر پروژه",
|
||||
"procurement_manager": "مدیر تدارکات",
|
||||
"admin": "ادمین",
|
||||
# کاربر فقطِ پنل مدیریت پروژه (PM) — به انبار/تدارکات دسترسی ندارد
|
||||
"supervisor": "سرپرست پروژه",
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@ class UserCreate(APIModel):
|
||||
class UserRoleUpdate(APIModel):
|
||||
"""role=None revokes the role (and any project assignment)."""
|
||||
|
||||
role: Literal["pm", "procurement_manager", "admin"] | None = None
|
||||
role: Literal["pm", "procurement_manager", "admin", "supervisor"] | None = None
|
||||
|
||||
|
||||
class UserProjectUpdate(APIModel):
|
||||
|
||||
Reference in New Issue
Block a user