diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 71b2c2b..6734f12 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -101,7 +101,6 @@ function RequireAuth({ children }: { children: React.ReactNode }) { return ; } } - } return <>{children}; } diff --git a/frontend/src/pages/Auth/LoginPage.tsx b/frontend/src/pages/Auth/LoginPage.tsx index 1e9c4a8..9d34963 100644 --- a/frontend/src/pages/Auth/LoginPage.tsx +++ b/frontend/src/pages/Auth/LoginPage.tsx @@ -95,7 +95,7 @@ export function LoginPage() { // سرپرست پروژه → پنل مدیریت پروژه (PM)؛ مدیر پروژه → پنل انبار؛ بقیه → دفتر if (user.role === "supervisor") navigate("/panel/pm"); else navigate(user.role === "pm" ? "/inventory" : "/"); - } (revert: restore production to the state before 730d0bd (PM/RBAC work moved to 'pm')) + } } catch (err) { toast.error(err instanceof Error ? err.message : "خطا در ورود"); } finally { diff --git a/frontend/src/pages/Inventory/ArrivalsPage.tsx b/frontend/src/pages/Inventory/ArrivalsPage.tsx index f31e938..57a3e27 100644 --- a/frontend/src/pages/Inventory/ArrivalsPage.tsx +++ b/frontend/src/pages/Inventory/ArrivalsPage.tsx @@ -268,8 +268,6 @@ export function ArrivalsPage() { } }; - if (!isAdmin && !isPM) { - if (!canAccess) { return ( diff --git a/frontend/src/pages/Inventory/ChangeInventoryPage.tsx b/frontend/src/pages/Inventory/ChangeInventoryPage.tsx index 43578f2..47f1bfb 100644 --- a/frontend/src/pages/Inventory/ChangeInventoryPage.tsx +++ b/frontend/src/pages/Inventory/ChangeInventoryPage.tsx @@ -573,7 +573,6 @@ export function ChangeInventoryPage() { if (type === "PROJECT_TRANSFER") { return !!(whId && toProjectId && matTxt.trim() && unitTxt.trim() && parseNum(qty) > 0); } - } if (type === "TRANSFER") return !!(fromId && toId && matTxt.trim() && rows.some((r) => parseNum(r.qty) > 0)); if (type === "RETURN") return !!(whId && matTxt.trim() && rows.some((r) => parseNum(r.qty) > 0)); if (type === "FOUND") {