Commit Graph

8 Commits (604d4c724485ca8b5498b10ce6632a368c228d5d)

Author SHA1 Message Date
Pau Costa Ferrer 604d4c7244 Allow admins and supervisors to book or update reservations for other users
- Add role-based restrictions for booking or updating reservations on behalf of others (Admins/Supervisors only).
- Extend reservation DTOs (`CreateReservationDto`, `UpdateReservationDto`) to include `userId` and `note` fields.
- Update Prisma schema to allow nullable `userId` and add support for reservation notes.
- Enhance API logic to validate permissions and handle ownership changes for reservations.
- Improve UI for booking flow; introduce "Book for" options, user search, and reservation notes.
- Localize new strings in `en.json` and `es-ES.json`.
2026-03-28 18:26:47 +01:00
Pau Costa Ferrer 0b6a043f19 Prevent past bookings and updates across web and API
- Add validation logic to block creating or updating reservations in the past.
- Update date pickers to enforce minimum selectable date as today.
- Extend i18n files (`en.json`, `es-ES.json`) with new error messages.
- Refine UI to disable interaction with past time slots and display appropriate messages.
2026-03-28 18:19:57 +01:00
Pau Costa Ferrer fa93fc0ac6 Improve real-time space status handling and date-based resets
- Add logic to clear real-time updates when the selected date changes.
- Enhance space status updates to consider reservation time ranges for relevance.
- Update relevant Svelte components (`SpaceCard`, `FloorplanViewer`) to handle date-sensitive real-time updates.
- Update API to include reservation details in `space_status_changed` events for improved update precision.
2026-03-28 18:12:17 +01:00
Pau Costa Ferrer e80984faa1 Add user profile management with avatar upload and update support
- Create `+page.svelte` for managing user profiles, including name, avatar, and password updates.
- Add `Avatar.svelte` component for rendering user avatars with Gravatar and fallback initials support.
- Implement backend APIs for fetching and updating user profiles (`/users/profile`).
- Add support for avatar uploads with file validation (max size: 5MB).
- Update `FloorplanViewer.svelte` to display user names and avatars in reservations.
- Introduce utilities for Gravatar URLs and user avatar management (`getGravatarUrl`, `getInitials`).
2026-03-28 17:22:57 +01:00
Pau Costa Ferrer 453fe68e42 Enhance real-time space status updates and handling
- Improve WebSocket connection reliability with updated transport options.
- Introduce logic to prioritize real-time updates over initial data for live views.
- Add logging for better debugging of WebSocket events and data propagation.
- Update UI components (`SpaceCard`, `FloorplanViewer`) to avoid overwrites from stale data.
- Refactor date handling for consistent behavior across components.
2026-03-28 16:27:23 +01:00
Pau Costa Ferrer 165cd76b6f 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.
2026-03-28 16:16:27 +01:00
Pau Costa Ferrer 45e42c3d37 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`).
2026-03-28 15:33:34 +01:00
Pau Costa Ferrer 3b09daeb04 Add real-time space status updates and reservation management
- Integrate WebSocket functionality using `socket.io` for floor-specific updates.
- Implement `ReservationsModule` with CRUD for managing reservations (API).
- Create `LoggerMiddleware` for consistent HTTP request logging.
- Update `SpacesService` to include real-time reservation status checks.
- Add `SpaceCard.svelte` component to reflect live space status (Web).
- Enable environmental base API URL configuration for flexible deployments.
2026-03-28 00:50:51 +01:00