mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-08 19:28:17 +00:00
Implement clearance-first booking flow and completion process for customs contracts
This commit is contained in:
@@ -141,6 +141,22 @@ export class BookingNotifierService {
|
||||
this.inApp(b, 'Payment window expired', msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Every train on the booking's chosen day filled up (or no further train runs)
|
||||
* before the waiting list reached this booking — it expired unplaced. HIGH so
|
||||
* the customer hears about it by email/SMS and rebooks another day.
|
||||
*/
|
||||
expiredNoCapacity(b: Booking): void {
|
||||
const msg =
|
||||
`Booking ${b.reference ?? b.id} could not be placed: every train for your selected day ` +
|
||||
`is full and no other train is scheduled that day. The booking has expired — ` +
|
||||
`please rebook for another day. No re-approval is needed.`;
|
||||
void this.notifyContact(b, msg, 'EXPIRED (NO CAPACITY)');
|
||||
this.inApp(b, 'No capacity — booking expired', msg, {
|
||||
priority: NotificationPriority.HIGH,
|
||||
});
|
||||
}
|
||||
|
||||
scheduleFull(b: Booking): void {
|
||||
this.logger.warn(
|
||||
`SCHEDULE FULL — ${this.ref(b)} could not be placed; change schedule, pick another day, or cancel.`,
|
||||
|
||||
Reference in New Issue
Block a user