Wagon loading happens in the train flow and dispatch at the train level, which
already advances inventory - the per-row buttons duplicated that and confused
operators.
- WarehouseInventoryTable (import dispatch queue + warehouse pages): suppress
the 'load'/'dispatch' next-action buttons and drop the extra per-row Dispatch
on READY_FOR_PICKUP rows (Store stays)
- Export Dispatch Queue: drop the per-row Dispatch button and its Actions
column; the bulk Dispatch All / Dispatch Selected controls remain
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Approve delivery now tracks the handover lifecycle exactly: the button appears
(detail page + portal dashboard) the moment a handover is generated and
disappears when the customer signs. The bookings list attaches the
handoverAwaitingSignature flag via one batched query per page; status
heuristics (COMPLETED / TRUCK_ASSIGNED+arrived) are gone.
- generate the arrival handover for ANY self-haul truck: portal-assigned OR
walk-in registered at the gate (isSelfHaulBooking: assigned_at set, or no
EDR last-mile leg). Same rule now guards the exit paper.
- remind every 5 minutes (in-app + SMS + email) until the handover is signed
(@Cron in HandoverService; one reminder per booking per tick)
- Truck Leaving no longer opens blank: the import queue mapper now carries
inv.notes, so the saved arrival renders read-only with only gate-out time
and gross weight editable
- container bookings get "Weigh truck? Yes/No": No skips tare/gross and the
container weight match (weighingSkipped on ReleaseOrderDto, decision made at
arrival sticks for the exit via the Weighing: SKIPPED note). Bulk always
weighs, unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Blob downloads set responseType: 'blob', so axios delivers the JSON error body
as a Blob. extractErrorMessage() reads `.message` off it, finds nothing, and
falls back to "Request failed with status code 400" - hiding every real reason
("Handover must be signed...", "...must be fully paid before terminal release").
Only ContainerItemsModal used the async Blob decoder. Switch the remaining nine
blob-download catches to extractDownloadErrorMessage():
InventoryWorkbench release paper, handover
WarehouseInventoryTable GRN
ReceiveInventoryModal GRN (x2), handover, exit paper
FeePreviewModal release paper
TruckDispatchModal truck exit paper
Mutation-error catches are untouched - their bodies are already parsed JSON.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
READY_FOR_PICKUP allows STORED (park an import item back into storage), but
STORED allowed only RESERVED / READY_FOR_LOADING - so readyForPickup() hit
assertTransition(STORED, READY_FOR_PICKUP) and threw. The item could never
return to pickup, and getNextInventoryAction returned null for an import STORED
item, leaving the row with no action at all.
- allow STORED -> READY_FOR_PICKUP
- an inspected import STORED item now advances to ready-for-pickup
readyForPickup() still rejects non-IMPORT inventory, so the new edge cannot be
reached from the export flow.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Updated the logic in to ensure that a booking only earns its gate pass once the freight charges are settled.
- Added logging for bookings that have not settled freight payment when securing gate passes.
- Modified seeders to ensure that bookings have associated company profiles to prevent data inconsistencies.
- Updated freight permissions to include new clearance actions for bookings.
- Enhanced the UI to reflect changes in the clearance process, including new shipment request pages and improved status handling in the clearance action panel.
- Adjusted the contract clearance list to accommodate both customs contracts and shipment bookings.
- Improved the handling of GENERAL contracts in various components to ensure proper booking flow and visibility.
- Removed maxWagonsPerTrain from WagonType entity and related DTOs.
- Updated containerWagonsForLines function to calculate required wagons based on container lines more accurately.
- Added unit tests for containerWagonsForLines to ensure correct calculations.
- Adjusted related services and scripts to reflect the removal of maxWagonsPerTrain.
- Enhanced booking and contract components to use new status labels for better user experience.
- Implemented validation for unique container numbers in shipment forms.
Customer reviews the generated handover before signing:
- add booking-scoped handover-document endpoint (portal only has bookingId)
- ApproveDeliveryModal renders the handover PDF, then applies the customer's
saved signature on approve and returns the signed PDF
- ApproveDeliveryButton opens the modal instead of one-click silent signing
Handover generation + sign notification (in-app + SMS + email) and the
"Approve delivery" visibility on an awaiting-signature handover were committed
earlier; this wires the review-and-sign step.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>