mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-02 13:53:47 +00:00
Warehouse zone occupancy heatmap
Visualize live per-zone occupancy on the warehouse detail page.
This commit is contained in:
@@ -108,6 +108,20 @@ export const lastMileService = {
|
||||
) => api.post<LastMileRecord>(`${LM.BASE}/${id}/distances`, { distances, remainingPayment }),
|
||||
generateInvoice: (id: string) =>
|
||||
api.post<{ id: string; invoiceNumber?: string } | null>(`${LM.BASE}/${id}/invoice`),
|
||||
/** Record proof of delivery (recipient signature + photos) and complete the leg. */
|
||||
recordProofOfDelivery: (
|
||||
id: string,
|
||||
payload: { recipientName: string; notes?: string; signature?: Blob | null; photos?: File[] },
|
||||
) => {
|
||||
const form = new FormData();
|
||||
form.append("recipientName", payload.recipientName);
|
||||
if (payload.notes) form.append("notes", payload.notes);
|
||||
if (payload.signature) form.append("signature", payload.signature, "signature.png");
|
||||
(payload.photos ?? []).forEach((photo) => form.append("photos", photo));
|
||||
return api.post<LastMileRecord>(LM.PROOF_OF_DELIVERY(id), form, {
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
});
|
||||
},
|
||||
/** Generate a truck-detention invoice (per truck per day after the grace window). */
|
||||
generateTruckDetentionInvoice: (id: string) =>
|
||||
api.post<{ id: string; invoiceNumber?: string } | null>(
|
||||
|
||||
@@ -4,6 +4,7 @@ import { api as apiClient } from '../auth/http';
|
||||
|
||||
import { URL_CONSTANTS } from '@/constants/URLS';
|
||||
import type {
|
||||
ZoneOccupancy,
|
||||
AllocationCriteria,
|
||||
AllocationPreviewResult,
|
||||
AllocationRule,
|
||||
@@ -365,6 +366,10 @@ export const warehouseService = {
|
||||
// ── Batch 4.5: Arrival / Unload / Load automation ──────────────────────────
|
||||
arrivalQueue: () =>
|
||||
apiClient.get<ArrivalQueueItem[]>(URL_CONSTANTS.WAREHOUSE_INVENTORY.ARRIVAL_QUEUE),
|
||||
zoneOccupancy: (yardId?: string) =>
|
||||
apiClient.get<ZoneOccupancy[]>(
|
||||
URL_CONSTANTS.WAREHOUSE_INVENTORY.ZONE_OCCUPANCY(yardId),
|
||||
),
|
||||
autoUnloadArrived: () =>
|
||||
apiClient.post<AutoUnloadResult>(URL_CONSTANTS.WAREHOUSE_INVENTORY.AUTO_UNLOAD_ARRIVED),
|
||||
autoLoadReady: () =>
|
||||
|
||||
Reference in New Issue
Block a user