mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-08 19:28:17 +00:00
Tour package booking, app release, new endpoints, more updates and fixes
This commit is contained in:
@@ -28,6 +28,25 @@ import { IamGuard } from "../../common/iam-adapter";
|
||||
export class SeatsController {
|
||||
constructor(private service: SeatsService) {}
|
||||
|
||||
// ── Coach Availability ────────────────────────────────────────────────────
|
||||
@Get('coaches/:scheduleId')
|
||||
@SetMetadata('isPublic', true)
|
||||
@ApiOperation({
|
||||
summary: 'List coaches with remaining seat counts for a schedule',
|
||||
description: 'Returns each coach assigned to the schedule with total, available, held, and booked seat counts. Optionally scoped to a specific origin→destination leg.',
|
||||
})
|
||||
@ApiParam({ name: 'scheduleId', description: 'TrainSchedule UUID' })
|
||||
@ApiQuery({ name: 'originStationId', required: false, description: 'Scope availability to this origin station' })
|
||||
@ApiQuery({ name: 'destinationStationId', required: false, description: 'Scope availability to this destination station' })
|
||||
@ApiResponse({ status: 200, description: 'Coaches with seat availability counts' })
|
||||
getCoachesWithAvailability(
|
||||
@Param('scheduleId') scheduleId: string,
|
||||
@Query('originStationId') originStationId?: string,
|
||||
@Query('destinationStationId') destinationStationId?: string,
|
||||
) {
|
||||
return this.service.getCoachesWithAvailability(scheduleId, originStationId, destinationStationId);
|
||||
}
|
||||
|
||||
// ── Seat Map ──────────────────────────────────────────────────────────────
|
||||
@Get("seatmap/:scheduleId")
|
||||
@SetMetadata('isPublic', true)
|
||||
|
||||
Reference in New Issue
Block a user