Warehouse zone occupancy heatmap

Visualize live per-zone occupancy on the warehouse detail page.
This commit is contained in:
Hagernesh
2026-07-13 11:38:23 +00:00
parent 1034756bab
commit 4e8d35a7fb
18 changed files with 550 additions and 1 deletions

View File

@@ -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({