mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 05:18:11 +00:00
Nationality, guest booking, waafi adapter, overall booking flow updates
This commit is contained in:
@@ -11,7 +11,15 @@ export class SeatsController {
|
||||
|
||||
// ── Seat Map ──────────────────────────────────────────────────────────────
|
||||
@Get('seatmap/:scheduleId')
|
||||
@ApiOperation({ summary: 'Get seat map for a schedule' })
|
||||
@ApiOperation({
|
||||
summary: 'Get seat map with real-time availability by class',
|
||||
description: `Returns seat map for a schedule with availability by seat class:
|
||||
- Economy Regular
|
||||
- Economy Bed
|
||||
- VIP Bed
|
||||
|
||||
Shows seat status: AVAILABLE, BOOKED, HELD, BLOCKED`
|
||||
})
|
||||
@ApiParam({ name: 'scheduleId', description: 'TrainSchedule UUID' })
|
||||
@ApiQuery({ name: 'coachId', required: false, description: 'Filter by coach UUID' })
|
||||
@ApiResponse({ status: 200, description: 'Returns coaches with seats and seat class info' })
|
||||
@@ -20,8 +28,17 @@ export class SeatsController {
|
||||
// ── Hold / Release ────────────────────────────────────────────────────────
|
||||
@Post('hold')
|
||||
@UseGuards(JwtGuard) @ApiBearerAuth('JWT-auth')
|
||||
@ApiOperation({ summary: 'Hold seats for 15 minutes' })
|
||||
@ApiResponse({ status: 201, description: 'Seats held successfully' })
|
||||
@ApiOperation({
|
||||
summary: 'Hold seats for 15 minutes before booking',
|
||||
description: `Temporarily reserves seats for a passenger to complete booking.
|
||||
|
||||
**Features:**
|
||||
- 15-minute hold duration
|
||||
- Auto-release after expiry
|
||||
- Prevents double booking
|
||||
- Required before creating booking`
|
||||
})
|
||||
@ApiResponse({ status: 201, description: 'Seats held successfully with holdId' })
|
||||
@ApiResponse({ status: 409, description: 'One or more seats unavailable' })
|
||||
holdSeats(@Body() dto: HoldSeatsDto) { return this.service.holdSeats(dto); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user