mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 17:38:12 +00:00
Warehouse
This commit is contained in:
@@ -15,6 +15,15 @@ export interface Cargo {
|
||||
status: 'PENDING' | 'LOADED' | 'IN_TRANSIT' | 'DELIVERED' | 'UNLOADED';
|
||||
loadedAt?: string;
|
||||
unloadedAt?: string;
|
||||
receiverName?: string | null;
|
||||
deliveredAt?: string | null;
|
||||
deliveryRemarks?: string | null;
|
||||
}
|
||||
|
||||
export interface DeliverCargoPayload {
|
||||
receiverName?: string;
|
||||
pickupDate?: string;
|
||||
deliveryRemarks?: string;
|
||||
}
|
||||
|
||||
export const cargoService = {
|
||||
@@ -26,6 +35,7 @@ export const cargoService = {
|
||||
delete: (id: string) => apiClient.delete(`/cargoes/${id}`),
|
||||
load: (cargoId: string, quantity: number, weight: number, volume?: number) =>
|
||||
apiClient.post(`/cargoes/${cargoId}/load`, { quantity, weight, volume }),
|
||||
deliver: (cargoId: string) => apiClient.post(`/cargoes/${cargoId}/deliver`),
|
||||
deliver: (cargoId: string, payload?: DeliverCargoPayload) =>
|
||||
apiClient.post(`/cargoes/${cargoId}/deliver`, payload ?? {}),
|
||||
unload: (cargoId: string) => apiClient.post(`/cargoes/${cargoId}/unload`),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user