From 45e42c3d3746f46c92bf4eb801a2cbab00e3d766 Mon Sep 17 00:00:00 2001 From: Pau Costa Date: Sat, 28 Mar 2026 15:33:34 +0100 Subject: [PATCH] Add booking modal and enhance reservation handling - Create `BookingModal.svelte` for booking spaces with custom time slots or full-day durations. - Add API endpoint to fetch reservations by space ID and date. - Update `SpacesService` with enhanced validation rules and conflict checks for reservations. - Extend WebSocket updates to include reservation data for real-time synchronization. - Enable date-based filtering and status handling in UI components (`SpaceCard.svelte`, `FloorplanViewer.svelte`). --- .idea/workspace.xml | 26 +- apps/api/src/events/events.gateway.ts | 3 +- .../reservations/reservations.controller.ts | 6 + .../src/reservations/reservations.service.ts | 88 +++++- apps/api/src/spaces/spaces.controller.ts | 6 +- apps/api/src/spaces/spaces.service.ts | 15 +- .../src/lib/components/BookingModal.svelte | 265 ++++++++++++++++++ .../src/lib/components/FloorplanViewer.svelte | 85 +++++- apps/web/src/lib/components/SpaceCard.svelte | 9 +- .../dashboard/building/[id]/+page.svelte | 35 ++- .../routes/dashboard/floor/[id]/+page.svelte | 48 +++- 11 files changed, 537 insertions(+), 49 deletions(-) create mode 100644 apps/web/src/lib/components/BookingModal.svelte diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 529fe68..847b8ff 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,11 +4,16 @@