Warehouse updates
Warehouse_updates includes the warehouse operations improvements for import and export workflows.
Main updates:
- Added Import and Export separation for warehouse receive operations.
- Added Export Receive Queue based on paid booking references.
- Added multi-select support for export paid bookings/items.
- Added Select All and Unselect All behavior for warehouse operation tables.
- Added bulk receive flow for selected export bookings/items.
- Preserved existing warehouse actions after receiving, including View, Movement, Inspect, Store, Reserve, and Dispatch.
- Added Export Ready To Load flow after inspection is passed.
- Added Auto Load button for export items that are already READY_FOR_LOADING.
- Ensured Auto Load only processes eligible export items and does not change train schedule logic.
- Added Import Arrive Queue for arrived import trains.
- Added Auto Unload flow for arrived import train bookings/items.
- Added Import Unloaded Queue with booking, customer, arrival, container, and cargo details.
- Added bulk Mark Selected as Inspected flow while keeping individual Inspect / Report action.
- Added Last Mile action visibility for import bookings/items that requested last-mile service.
- Kept import storage as a manual action only when customer pickup or last-mile does not happen.
- Preserved existing warehouse APIs and reused existing configuration where possible.
Workflow covered:
EXPORT:
Paid booking reference
→ Receive Selected
→ Manual/Bulk Inspection
→ Ready To Load
→ Auto Load
→ Loaded
→ Dispatch Queue
IMPORT:
Arrived train
→ Auto Unload Arrived Bookings
→ Unloaded Queue
→ Manual/Bulk Inspection
→ Pickup Ready
→ Customer Pickup / Last Mile / Store if needed
Important:
- Train schedule logic was not changed.
- Rescheduling logic was not changed.
- Wagon assignment logic was not changed.
- Existing warehouse row actions were preserved.
- READY_FOR_PICKUP transitions now → DELIVERED (customer pickup) OR DISPATCHED (dispatch out) OR
STORED (operator-chosen storage) — pickup and dispatch kept separate. No auto-storage.
- GET /warehouse-inventory/import/pickup-ready-queue: READY_FOR_PICKUP import items (shared query
with the unloaded queue, route-derived import filter)
- WarehouseInventoryTable: PICKUP_READY rows now show explicit Store + Dispatch buttons alongside
the customer-pickup (release/deliver) next action; reuses the existing advance() dispatcher
- Import → Dispatch Queue tab renders pickup-ready items via InventoryWorkbench (all existing
actions + modals intact) with Last Mile shown only when door delivery was requested
- Verified: pickup-ready item → Store → STORED; → Dispatch → DISPATCHED
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- eligibleBookings(direction?) now returns all import+export bookings when direction omitted
(DOMESTIC excluded); per-direction filter preserved for backward compatibility
- GET /warehouse-inventory/eligible-bookings (no query) returns the combined set
- Frontend: single shared useEligibleBookings() query; both Receive tabs filter client-side
by route-derived direction, so only one HTTP request fires
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Creates SEED-B5-EXP-001/002/003 bookings (ADDIS_ABABA→DJIBOUTI, PAID, BULK)
with warehouse inventory at READY_FOR_LOADING + inspectionStatus PASSED so the
Ready To Load tab has visible rows. Idempotent on guard reference check.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- GET /warehouse-inventory/ready-to-load-export: EXPORT+PASSED+READY_FOR_LOADING items
with booking details (customer, container, cargo type, route, inspection status)
- Direction filtering via deriveTradeDirection (route-based, not stored field)
- Frontend ReadyToLoadTab: full table (checkbox, booking ref/id, customer, container,
cargo type, weight, route, inspection status, current status) with selection
- Auto Load Ready Items button reuses existing POST /load-passed-export endpoint
- Replaces "Ready To Load — coming in the next batch" placeholder in Export sub-tabs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- BulkReceiveModal: Receive Selected shows "received at facility" for EXPORT
- Export inspection: POST /warehouse-inventory/bulk-mark-inspected reuses WarehouseInspectionService.create
- EXPORT items advance to READY_FOR_LOADING after inspection PASSED
- InventoryWorkbench: selection state + "Mark Selected as Inspected" bulk button
- WarehouseInventoryTable: optional Checkbox column for bulk selection
- Route-based direction in eligibleBookings, bulkReceive, getBookingDirection
- New BulkInspectDto; service + controller wired
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Backend: GET eligible-bookings?direction, POST receive-bulk, POST load-passed-export
(reuse autoUnload/autoLoad patterns; no train-schedule/wagon logic changed)
- Frontend: ReceiveInventoryModal split into Import/Export tabs with eligible PAID
bookings table, select-all/bulk receive, and Load Passed Export Items button
- Single-booking receive and all existing inventory row actions preserved
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Rename 1790000000000/1 (collided with CreateWarehouseModule / WarehouseBatch2)
to 1791000000000/1 so they sort after the existing warehouse migrations
- Make Batch 5 migration idempotent (createTable ifNotExists + ADD COLUMN IF NOT EXISTS)
so it is safe whether or not it already ran
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>