From 165cd76b6f81a090911de94ba731bcd5df5d91fb Mon Sep 17 00:00:00 2001 From: Pau Costa Date: Sat, 28 Mar 2026 16:16:27 +0100 Subject: [PATCH] Add "My Bookings" page and enable reservation updates and cancellations - Implement `+page.svelte` for managing user reservations with real-time updates. - Add API endpoints for updating and canceling reservations with enhanced validation and authorization. - Introduce `UpdateReservationDto` for refined reservation update handling. - Update `reservations.service.ts` to handle overlapping checks, time adjustments, and admin actions. - Extend layout to include a link to the "My Bookings" page. - Add `date-fns` library for date formatting. --- .idea/workspace.xml | 25 +- .../dto/update-reservation.dto.ts | 15 ++ .../reservations/reservations.controller.ts | 19 +- .../src/reservations/reservations.service.ts | 155 +++++++++++- apps/web/package.json | 1 + .../src/lib/components/BookingModal.svelte | 120 ++++++++-- apps/web/src/routes/+layout.svelte | 1 + .../routes/dashboard/my-bookings/+page.svelte | 222 ++++++++++++++++++ package-lock.json | 10 + 9 files changed, 529 insertions(+), 39 deletions(-) create mode 100644 apps/api/src/reservations/dto/update-reservation.dto.ts create mode 100644 apps/web/src/routes/dashboard/my-bookings/+page.svelte diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 0065d2f..2904d01 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,10 +4,12 @@