feat(inventory): role-aware header navigation - PM top nav without hamburger, admin top nav plus compact account menu

This commit is contained in:
ali_mohaghegh
2026-08-27 15:04:25 +03:30
parent 5e690a7fc8
commit eb2a50eee1
5 changed files with 164 additions and 37 deletions
@@ -64,7 +64,10 @@ export function useInventoryData(): InventoryData {
}, [load]);
const scopedWarehouses = useMemo(
() => (user?.role === "admin" ? warehouses : warehouses.filter((w) => String(w.project_id) === String(user?.project_id || ""))),
() =>
user?.role === "admin" || user?.role === "procurement_manager"
? warehouses
: warehouses.filter((w) => String(w.project_id) === String(user?.project_id || "")),
[warehouses, user?.role, user?.project_id],
);