mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 12:18:11 +00:00
Implement clearance-first booking flow and completion process for customs contracts
This commit is contained in:
@@ -357,6 +357,10 @@ export class BookingWindowService implements OnModuleInit {
|
||||
this.logger.log(
|
||||
`[WINDOW] ${schedule.id} conclude → train FULL — window DONE, finalizing`,
|
||||
);
|
||||
// This train is done. If no other train on the route-day can still take
|
||||
// the waiting list, those bookings have nowhere to go — expire + notify
|
||||
// them now instead of leaving them FULLY_EXECUTED forever.
|
||||
await this.bookingBatchService.expireLeftoverDayPool(schedule.id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -390,6 +394,9 @@ export class BookingWindowService implements OnModuleInit {
|
||||
`[WINDOW] ${schedule.id} conclude → not full but no cycle fits before ` +
|
||||
`departure — window DONE`,
|
||||
);
|
||||
// No further cycle on this train. Same sweep as the FULL branch: if no
|
||||
// sibling train can still take the day's waiting list, expire + notify.
|
||||
await this.bookingBatchService.expireLeftoverDayPool(schedule.id);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user