feat(warehouse): Batch 9 — Import Unloaded Queue + bulk destination inspection

- bulkMarkInspected: UNLOADED added to eligible statuses; IMPORT passed items now advance to
  READY_FOR_PICKUP (pickup ready) instead of READY_FOR_LOADING (export unchanged)
- GET /warehouse-inventory/import/unloaded-queue: UNLOADED import items with the inspection-screen
  columns (booking, customer, arrival, container, cargo type, weight, train schedule, inspection
  status, pickup option, last-mile, current status); route-derived import filter
- Dedicated ImportUnloadedQueueTab replaces the Batch 8 workbench reuse: full spec columns,
  Select All / Unselect All / selected count / Mark Selected as Inspected, plus per-row
  Inspect / Report (InspectionReportModal) for damage / image / weight-loss detail
- Verified: import item UNLOADED → bulk inspect → READY_FOR_PICKUP (PASSED), drops out of queue

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Hagernesh
2026-06-21 14:15:22 +00:00
parent 8b28a7c430
commit 040ba6d495
7 changed files with 285 additions and 21 deletions

View File

@@ -249,6 +249,15 @@ export function useImportTrainItems(scheduleId?: string) {
export const useAutoUnloadArrivedBookings = () =>
useInventoryMutation((scheduleId: string) => warehouseService.autoUnloadArrivedBookings(scheduleId));
/** IMPORT inventory in the Unloaded Queue (UNLOADED / destination inspection). Read-only. */
export function useImportUnloadedQueue(enabled = true) {
return useQuery({
queryKey: ['warehouse-inventory', 'import-unloaded-queue'],
queryFn: () => warehouseService.importUnloadedQueue().then((r) => r.data),
enabled,
});
}
// ── Loading (Batch 3) ────────────────────────────────────────────────────────
export function useLoadableWagons(enabled = true) {