separte handover edr lastmile and customer last mile flow
Self-haul: handover auto-generated on first truck arrival.
Signed when customer approves delivery
Fixes
Import train dispatch no longer blocked by loading confirmation (committed 0a170182).
Marshalling / handover / GRN docs no longer masquerade as "Release Order" (decoupled from the release fallback).
Weighing modal now fetches trucks from both last-mile + customer portal, shows "Truck is not assigned yet".
Name fields (warehouse/fee/allocation) → letters-only.
11 build errors = stale package dist → rebuilt @edr/types + @edr/api-common.
jose missing dep → installed.
Features built
Multi-truck self-haul assignment — 1–2 containers/truck, per-truck arrival; entities + migration + service + controller + portal card. Exit paper carries truck info; freight-order PDF lists every truck.
Import vs export split — import: no container pre-select, staff weigh + register load on leaving (departTruck, gross weight, gate-out, locks), exit paper per container; export: pre-selected containers, receive-only.
Per-container GRN + received_to_port — on booking_container_units; auto-marked on receive (export delivery), staff-confirmed GRN (per batch / per booking), staff-only.
Online demurrage/storage pay in customer portal — Telebirr/Waafi pay button on warehouse invoices.
Container-number picker on truck assignment (surfaced booking container numbers).
Review follow-ups on the window-close-hour feature:
- Reject windowCloseHour < windowOpenHour when saving global rules. The
reopen engine (nextCycleOpensAt) assumes the daily desk runs within one
EAT day; an overnight range would misroute a ready-time inside the span
to the next morning. openHour === closeHour stays valid (24-hour desk).
- Derive the board projection's runaway cap from the real first-open →
departure span over the minimum per-cycle advance, so a legitimate
long-lead config is never silently truncated (was a flat 200).
- Document the open <= close precondition on nextCycleOpensAt and clarify
the ready-before-open comment.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Loading (loaded-on-train step + per-booking loading status) no longer gates
dispatch/departure of a Djibouti import train. Per-booking loading status stays
tracking-only; a scheduled train dispatches once gatepass is granted, without
waiting on loading confirmation.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Removed the gate pass granting functionality from the BookingClearanceService and ContractClearanceService, replacing it with a new method to retrieve gate pass status from train schedules.
- Updated the ContractsController to eliminate endpoints related to gate pass granting.
- Refactored the UI components (ExportClearanceStepper and PhasedClearanceActionPanel) to reflect the new gate pass securing process, linking to the train scheduling interface instead.
- Cleaned up related constants and query hooks, removing unused code and references to the gate pass functionality.
- Adjusted types in the contracts to accommodate changes in the gate pass handling logic.