feat(inventory): role-aware header navigation - PM top nav without hamburger, admin top nav plus compact account menu
This commit is contained in:
@@ -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],
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user