mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-28 04:20:55 +00:00
Merge pull request #1097 from Tria-plc/freight_feature/usermanagement
Freight feature/usermanagement
This commit is contained in:
@@ -856,6 +856,32 @@ export class TrainSchedulingController {
|
||||
return { ok: true };
|
||||
}
|
||||
|
||||
@Get("bookings/:bookingId/allocation-candidates")
|
||||
@TrainSchedulingView()
|
||||
@ApiOperation({
|
||||
summary:
|
||||
"Trains a paid-unallocated booking fits, split same-day vs other days",
|
||||
})
|
||||
getAllocationCandidates(
|
||||
@Param("bookingId", ParseUUIDPipe) bookingId: string,
|
||||
) {
|
||||
return this.bookingBatchService.allocationCandidates(bookingId);
|
||||
}
|
||||
|
||||
@Post("bookings/:bookingId/allocate")
|
||||
@TrainSchedulingUpdate()
|
||||
@ApiOperation({
|
||||
summary:
|
||||
"Staff: place a paid booking onto a fitting train (notifies customer on date change)",
|
||||
})
|
||||
async allocatePaidBooking(
|
||||
@Param("bookingId", ParseUUIDPipe) bookingId: string,
|
||||
@Body("trainScheduleId", ParseUUIDPipe) trainScheduleId: string,
|
||||
) {
|
||||
await this.bookingBatchService.allocatePaid(bookingId, trainScheduleId);
|
||||
return { ok: true };
|
||||
}
|
||||
|
||||
@Get("schedules/:id/checkpoints")
|
||||
@TrainSchedulingView()
|
||||
@ApiOperation({
|
||||
|
||||
Reference in New Issue
Block a user