fix vehicle

This commit is contained in:
natib21
2026-06-19 06:56:07 +00:00
parent f1c2943854
commit b4ed7d492d
13 changed files with 281 additions and 14 deletions

View File

@@ -12,6 +12,8 @@ import type {
LoadInventoryPayload,
MoveInventoryPayload,
ReceiveInventoryPayload,
ReleaseOrderPayload,
DeliverInventoryPayload,
ReserveInventoryPayload,
SaveWarehousePayload,
SaveYardPayload,
@@ -172,6 +174,18 @@ export const useMoveInventory = () =>
warehouseService.move(args.id, args.payload),
);
// ── Import branch (READY_FOR_PICKUP → DELIVERED) ───────────────────────────
export const useMarkReadyForPickup = () =>
useInventoryMutation((id: string) => warehouseService.markReadyForPickup(id));
export const useReleaseInventory = () =>
useInventoryMutation((args: { id: string; payload: ReleaseOrderPayload }) =>
warehouseService.release(args.id, args.payload),
);
export const useDeliverInventory = () =>
useInventoryMutation((args: { id: string; payload: DeliverInventoryPayload }) =>
warehouseService.deliver(args.id, args.payload),
);
// ── Loading (Batch 3) ────────────────────────────────────────────────────────
export function useLoadableWagons(enabled = true) {