feat(frontend): unified warehouse UI, calendar fix, partial receipts, RBAC views, admin panel, dev-mode 3-step
- header: icon box + dynamic subheader '[user] | [role] – [project/همه پروژهها]' on every warehouse page; module context kept in the hamburger (items 1-2) - project manager view: office button + inline logout removed; hamburger contains only «خروج از حساب»; sub-views get «بازگشت به داشبورد» (Header backTo/goBack); «افزایش موجود» primary button on the dashboard (item 8) - daily control: cells render the day-of-month (was the Jalali year), month nav uses real Jalali months, header is pure Jalali «امروز ۸ شهریور ۱۴۰۵», today gets a blue accent (item 3) - arrivals: partial (item/qty) receipt — any valid item is enough to submit, ceiling + allocation-sum validation with inline errors, Received/In-Transit badges; ledger shows «رسیده X از Y» / «در راه Z» + «رسید جزیی» badge (item 4) - api client: multipart uploads no longer send Content-Type json (fixes the invoice/proforma 400 «دادهی ارسالشده نامعتبر است»); undefined query params are dropped (fixes empty admin project filter, item 5) - organization: user-creation card removed, role column read-only for procurement manager, Casdoor sync button (item 6) - admin panel (/admin): Casdoor user sync + grant/revoke «مدیر تدارکات»; Developer Mode is a 3-step admin-gated flow on the login page (item 7)
This commit is contained in:
@@ -4,17 +4,16 @@ import { cn } from "../../lib/utils";
|
||||
// ناوبری بالای صفحه در پنل انبار — جایگزین لینکهای منوی همبرگری
|
||||
// (مثل سیستم تدارکات: لینکها در بالای صفحه)
|
||||
//
|
||||
// - variant="pm": همه بخشهای مدیر پروژه + «دفتر تدارکات» و «خروج از حساب»
|
||||
// (منوی همبرگری حذف میشود).
|
||||
// - variant="admin": فقط بخشهای مدیر تدارکات/ادمین — «بازگشت به دفتر» و
|
||||
// «خروج از حساب» در منوی همبرگری میمانند.
|
||||
// - variant="pm" (مدیر پروژه): همه بخشهای مدیر پروژه — بدون «دفتر تدارکات»
|
||||
// (مدیر پروژه به سیستم تدارکات دسترسی ندارد) و بدون دکمهی خروج تکی
|
||||
// (خروج از حساب فقط در منوی همبرگری است).
|
||||
// - variant="admin" (مدیر تدارکات/ادمین): فقط بخشهای مدیر تدارکات —
|
||||
// «بازگشت به دفتر» و «خروج از حساب» در منوی همبرگری میمانند.
|
||||
export function InventoryTopNav({
|
||||
pathname,
|
||||
onLogout,
|
||||
variant = "pm",
|
||||
}: {
|
||||
pathname: string;
|
||||
onLogout: () => void;
|
||||
variant?: "pm" | "admin";
|
||||
}) {
|
||||
const items =
|
||||
@@ -46,16 +45,6 @@ export function InventoryTopNav({
|
||||
{it.label}
|
||||
</Link>
|
||||
))}
|
||||
{variant === "pm" && (
|
||||
<>
|
||||
<Link to="/" className="btn-line-file no-underline">
|
||||
دفتر تدارکات
|
||||
</Link>
|
||||
<button type="button" onClick={onLogout} className="btn-line-file cursor-pointer border-red/30 text-red hover:bg-red/10">
|
||||
خروج از حساب
|
||||
</button>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user