mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 09:58:12 +00:00
Implement client-side validation for container and bul
This commit is contained in:
@@ -322,6 +322,20 @@ export class BookingWindowService implements OnModuleInit {
|
||||
return true;
|
||||
}
|
||||
|
||||
// `paymentPhaseEndsAt` is stamped when the phase starts; each reservation's own
|
||||
// deadline is set milliseconds later, per booking, so the phase always expires
|
||||
// a fraction before the reservations it opened. Concluding here would end the
|
||||
// cycle while customers still had time to pay, and the settle that finally
|
||||
// expires them (next tick) would have no cycle left to promote the waiting
|
||||
// list into. Hold in PAYMENT until every reservation has actually resolved.
|
||||
if (await this.bookingBatchService.hasLiveReservations(schedule.id)) {
|
||||
this.logger.log(
|
||||
`[WINDOW] ${schedule.id} PAYMENT phase past its deadline but reservations ` +
|
||||
`are still within their pay windows — holding the cycle open`,
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
await this.concludeCycle(schedule, cfg, now);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user