Enable per-truck editing of warehouse gate arrival/departure times
(arrivedAt/departedAt) via modal on Import Trucks page. Accessible via
row action menu for EDR-haulage trucks. Includes backend endpoint
POST /last-mile/:id/warehouse-gate-times and frontend modal with
DateTimePicker inputs.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Two active Sebeta yards (LEGACY_DEST/'Sebeta' and SEBETA/'sebeta')
split rates and routes across different yard ids, so route-scoped rate
lookups missed. Migration repoints every yard reference to the survivor,
retires the duplicate, and adds partial unique indexes on active label
and code. Service now rejects case-insensitive duplicate labels on
create/update - the old guard only compared generated codes, which
missed labels whose existing code differs (LEGACY_DEST).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contract pricing matched base container/bulk rates by type+currency
with no origin/destination filter, so a lane with no configured rate
silently froze another lane's price into the contract snapshot
(CTR-2026-00065: DCT-Sebeta contract froze DCT-GMP rates) and bookings
then billed off it. Now scoped to the contract's first route and a
missing lane rate hard-blocks pricing with a 422, matching the
customs-clearance and booking-side behaviour.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Show per-truck warehouse gate arrival (arrivedAt) and departure
(departedAt) timestamps on the Import Trucks page, enabling staff to see
when each truck entered and exited the warehouse. Times displayed in local
format; EDR and customer trucks both supported.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
findByIdWithFullGraph loaded containerItems but not
containerItems.bookingContainer, so item.bookingContainer was always
undefined and the 40ft/20ft/total tallies on the Import/Export
Marshalling Document silently read as 0. Load containerType on both the
item and its bookingContainer, and resolve size from whichever is set.
Export and import marshalling documents now include:
- Company name column per cargo allocation row
- Executive summary with container counts (40ft, 20ft, total)
- Total weight already shown, now grouped with container data
Both export and import load list templates enhanced with same structure
for consistency. Container size calculated from booking container data.
- Introduced ContractCourtBadge to display the responsible party for contract actions.
- Updated ContractStatusBadge to include new court badge.
- Enhanced ClearanceDocumentsPage with additional filters for trade direction, freight type, and ownership.
- Modified ContractRequestDetailPage and ContractRequestsPage to utilize ContractCourtBadge.
Booking detail now has a Trucks tab displaying every EDR or customer truck
assigned to a booking's last mile. Each row shows warehouse-gate times
(arrival/departure) and destination-detention times (arrival/return), with
detention costs and inspection status. Detention rows only for EDR trucks;
customer self-haul shows —. Reuses existing TruckDetentionModal and
FeePreviewModal for edit/view actions.
Backend: arrivalTrucksForBooking() adds lastMileId per truck (direct chain to
detention preview), containerItems() adds inspection_status column to responses.
No new SQL, no migrations, no new endpoints.
Frontend: BookingTrucksPanel.tsx self-fetches all data via existing warehouse +
last-mile services, renders adaptive table with cargo-cost strip above.
Wired into BookingRequestDetailPage.tsx tab bar.
- FaydaVerifyPanel + /callback popup flow for owner and poa
- general manager is a plain typed role again, offers "same as
verified owner" copy instead of being fayda-verified itself
- company step gates on owner verification (ethiopian) or typed
passport number (foreign); poa step gates on poa verification
- settings tabs (company profile, general manager, poa) updated to
match
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- dars delegation paper mandatory wherever poa state changes (named,
removed, forwarder role applied for/approved), not just onboarding
- ethiopian companies verify owner (and poa, once named) via fayda;
identity, not general manager, is the verified subject
- foreign companies require a typed owner passport number instead,
independent of an optional fayda verification
- fanNumber removed from client-writable dtos; server-derived only
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
esignet userinfo carries no national id number. keep sub/name/email/
phone/address, remove fanClaims config and the hard-fail gate that
would've blocked every real verification.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>