add cancellation for booking

This commit is contained in:
Marshal
2026-08-06 20:05:13 +00:00
parent 8e75ebf5dc
commit 9a50df2be3
9 changed files with 262 additions and 7 deletions

View File

@@ -1335,6 +1335,19 @@ export class BookingsController {
return this.transitionService.enrichBookingResponse(booking);
}
@Post(":id/customer-cancel")
@ApiOperation({
summary:
"Customer cancels their own booking before payment — no cancellation fee",
})
async customerCancel(
@Param("id", ParseUUIDPipe) id: string,
@Body() dto: RejectBookingDto,
) {
const booking = await this.transitionService.customerCancel(id, dto.reason);
return this.transitionService.enrichBookingResponse(booking);
}
@Post(":id/cancel-hold")
@ApiOperation({
summary: