mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 18:48:11 +00:00
enhance contract clearance and train scheduling logic; add filters for clearance documents and improve booking validation
This commit is contained in:
@@ -149,8 +149,12 @@ export function ExportClearanceStepper({
|
||||
const entityId = contractId ?? bookingId ?? "";
|
||||
// The booking that carries the post-booking steps (gate pass, T1, invoice).
|
||||
const actionBookingId = clearance.linkedBookingId ?? bookingId ?? null;
|
||||
// Per-booking GENERAL clearance runs on a bare instance that only becomes a
|
||||
// real booking once GL completes it — the caller's bookingCreated prop carries
|
||||
// that signal, so a booking-keyed view must NOT count as "created" by itself
|
||||
// (it would lock GL Ethiopia out of the declaration step right after the RO).
|
||||
const effectiveBookingCreated =
|
||||
bookingCreated || Boolean(clearance.linkedBookingId) || isBooking;
|
||||
bookingCreated || Boolean(clearance.linkedBookingId);
|
||||
|
||||
const activeStep = useMemo(
|
||||
() => computeExportActiveStep(clearance, bookingMilestones, effectiveBookingCreated),
|
||||
|
||||
Reference in New Issue
Block a user