mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-03 07:23:40 +00:00
Warehouse zone occupancy heatmap
Visualize live per-zone occupancy on the warehouse detail page.
This commit is contained in:
@@ -136,6 +136,14 @@ export function useAllWarehouseZones() {
|
||||
});
|
||||
}
|
||||
|
||||
/** Live per-zone occupancy for the heatmap (optionally scoped to one yard). */
|
||||
export function useZoneOccupancy(yardId?: string) {
|
||||
return useQuery({
|
||||
queryKey: ['warehouse-zones', 'occupancy', yardId ?? 'all'],
|
||||
queryFn: () => warehouseService.zoneOccupancy(yardId).then((r) => r.data),
|
||||
});
|
||||
}
|
||||
|
||||
export function useCreateZone() {
|
||||
const qc = useQueryClient();
|
||||
return useMutation({
|
||||
|
||||
Reference in New Issue
Block a user