mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-08 04:15:43 +00:00
pERTRUCK EXIT
This commit is contained in:
@@ -71,14 +71,14 @@ const cleanParams = (params: object) =>
|
||||
export const warehouseService = {
|
||||
/** Customer self-haul trucks assigned to a booking (portal multi-truck). */
|
||||
getCustomerTrucks: async (bookingId: string): Promise<Freight.ICustomerTruck[]> => {
|
||||
const { data } = await apiClient.get(`/api/bookings/${bookingId}/customer-trucks`);
|
||||
const { data } = await apiClient.get(`/bookings/${bookingId}/customer-trucks`);
|
||||
return data?.data ?? data ?? [];
|
||||
},
|
||||
|
||||
/** Booking container numbers not yet loaded onto any truck. */
|
||||
getLoadableContainers: async (bookingId: string): Promise<string[]> => {
|
||||
const { data } = await apiClient.get(
|
||||
`/api/bookings/${bookingId}/customer-trucks/loadable-containers`,
|
||||
`/bookings/${bookingId}/customer-trucks/loadable-containers`,
|
||||
);
|
||||
return data?.data ?? data ?? [];
|
||||
},
|
||||
@@ -90,7 +90,7 @@ export const warehouseService = {
|
||||
containerNumbers: string[],
|
||||
): Promise<Freight.ICustomerTruck[]> => {
|
||||
const { data } = await apiClient.post(
|
||||
`/api/bookings/${bookingId}/customer-trucks/${assignmentId}/load`,
|
||||
`/bookings/${bookingId}/customer-trucks/${assignmentId}/load`,
|
||||
{ containerNumbers },
|
||||
);
|
||||
return data?.data ?? data ?? [];
|
||||
@@ -176,6 +176,11 @@ export const warehouseService = {
|
||||
apiClient.get<Blob>(URL_CONSTANTS.WAREHOUSE_INVENTORY.HANDOVER_DOCUMENT(id), {
|
||||
responseType: 'blob',
|
||||
}),
|
||||
/** Per-truck exit paper PDF (containers loaded on one customer truck). */
|
||||
downloadTruckExitPaper: (assignmentId: string) =>
|
||||
apiClient.get<Blob>(`/warehouse-inventory/customer-truck-exit-paper/${assignmentId}`, {
|
||||
responseType: 'blob',
|
||||
}),
|
||||
deliver: (id: string, payload: DeliverInventoryPayload) =>
|
||||
apiClient.post<WarehouseInventoryItem>(URL_CONSTANTS.WAREHOUSE_INVENTORY.DELIVER(id), payload),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user