mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-28 18:20:57 +00:00
add goverment booking
This commit is contained in:
@@ -19,6 +19,7 @@ import {
|
||||
import { AcceptIntercityBookingsDto } from "./dto/accept-intercity-bookings.dto";
|
||||
import { AssignBookingsDto } from "./dto/assign-bookings.dto";
|
||||
import { AssignUnassignedBookingDto } from "./dto/assign-unassigned-booking.dto";
|
||||
import { SwitchGovernmentBookingDto } from "./dto/switch-government-booking.dto";
|
||||
import { CreateContainerTrainScheduleDto } from "./dto/create-container-train-schedule.dto";
|
||||
import { GetEligibleBookingsDto } from "./dto/get-eligible-bookings.dto";
|
||||
import { GetEligibleBulkBookingsDto } from "./dto/get-eligible-bulk-bookings.dto";
|
||||
@@ -408,6 +409,25 @@ export class TrainSchedulingController {
|
||||
);
|
||||
}
|
||||
|
||||
@Post("schedules/:id/switch-government-booking")
|
||||
@TrainSchedulingUpdate()
|
||||
@ApiOperation({
|
||||
summary:
|
||||
"Switch out commercial bookings to allocate a government booking in their place",
|
||||
})
|
||||
switchGovernmentBooking(
|
||||
@Param("id", ParseUUIDPipe) id: string,
|
||||
@Body() dto: SwitchGovernmentBookingDto,
|
||||
@CurrentUser() user: AuthUserPayload,
|
||||
) {
|
||||
return this.trainSchedulingService.switchGovernmentBooking(
|
||||
id,
|
||||
dto.governmentBookingId,
|
||||
dto.removeBookingIds,
|
||||
resolveAuthUserId(user),
|
||||
);
|
||||
}
|
||||
|
||||
@Get("schedules/:id/composition-removals")
|
||||
@TrainSchedulingView()
|
||||
@ApiOperation({ summary: "Get removal log for a schedule" })
|
||||
|
||||
Reference in New Issue
Block a user