Seats holding, booking, blocking inconsistencies resolution

This commit is contained in:
Stephanos A
2026-07-16 19:28:00 +03:00
parent e28372306f
commit e3075d1486
5 changed files with 78 additions and 59 deletions

View File

@@ -211,8 +211,8 @@ This makes it clear which segment of the route each seat is held for, enabling s
@ApiOperation({ summary: "Block a seat (e.g., maintenance, damage)" })
@ApiParam({ name: "seatId", description: "Seat UUID" })
@ApiResponse({ status: 200, description: "Seat blocked" })
blockSeat(@Param("seatId") seatId: string, @Body() body: { reason: string }) {
return this.service.blockSeat(seatId, body.reason);
blockSeat(@Param("seatId") seatId: string, @Body() body: { reason: string; scheduleId?: string }) {
return this.service.blockSeat(seatId, body.reason, body.scheduleId);
}
@Delete(":seatId/block")
@@ -221,8 +221,8 @@ This makes it clear which segment of the route each seat is held for, enabling s
@ApiOperation({ summary: "Unblock a seat" })
@ApiParam({ name: "seatId", description: "Seat UUID" })
@ApiResponse({ status: 200, description: "Seat unblocked" })
unblockSeat(@Param("seatId") seatId: string) {
return this.service.unblockSeat(seatId);
unblockSeat(@Param("seatId") seatId: string, @Query("scheduleId") scheduleId?: string) {
return this.service.unblockSeat(seatId, scheduleId);
}
// ── Maintenance ───────────────────────────────────────────────────────────