Commit Graph

13 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 93bd2808ac Add seed service to initialize default admin and organization
- Implement `SeedService` to create a default admin account and organization on app startup.
- Update `PrismaModule` to include `SeedService` as a provider.
- Remove seeded credentials display from login page.
- Refactor existing seed script for consistency with the new service.
2026-03-28 18:07:22 +01:00
Pau Costa Ferrer e03335be67 Add rotation support for spaces in floorplan editor
- Extend `Space` model and Prisma schema to include `rotation` property.
- Update API services and DTOs to handle rotation data.
- Add UI controls in `FloorplanEditor.svelte` for rotating spaces.
- Refactor space rendering logic in both editor and viewer to support rotation.
2026-03-28 17:47:32 +01:00
Pau Costa Ferrer 71404d0ed8 Add i18n support with English and Spanish translations
- Introduce `svelte-i18n` for internationalization.
- Add English (`en.json`) and Spanish (`es-ES.json`) locale files.
- Implement `setupI18n` function for initializing and managing locales.
- Update project dependencies to include `svelte-i18n`.
2026-03-28 17:34:13 +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 2bab9da7c8 Add assets module with file upload and retrieval support
- Introduce `AssetsModule` with APIs for uploading and retrieving organization logos, building images, and floor plans.
- Implement file validation for type and size (10MB max).
- Add `resolveAssetUrl` utility for generating absolute asset URLs.
- Enhance admin UI components to support image file uploads and previews.
- Update Prisma schema to associate assets with organizations, buildings, and floors.
- Modify existing update logic to clear references when external URLs are used.
2026-03-28 17:10:22 +01:00
Pau Costa Ferrer b618c10cdd Add organization management with logo support
- Implement organization settings page (`+page.svelte`) for updating organization name and logo.
- Create backend APIs for retrieving and updating organization details with role-based access control.
- Add `OrganizationsModule`, `OrganizationsService`, and DTOs for input validation in NestJS.
- Update Prisma schema to include `logoUrl` field for organizations.
- Enhance navigation to dynamically display organization logo and name.
2026-03-28 16:40:24 +01:00
Pau Costa Ferrer 1b3c3044ca Add building and floor management with admin editor modal
- Implement `BuildingEditorModal.svelte` for creating, editing, and deleting buildings and floors.
- Add `CreateBuildingDto`, `UpdateBuildingDto`, `CreateFloorDto`, and `UpdateFloorDto` for validation.
- Extend `SpacesService` and `SpacesController` with endpoints for building and floor CRUD operations.
- Update Prisma schema to include building descriptions and image URLs, and floor names.
- Enhance dashboard with building management functionality for admin users.
2026-03-28 16:22:36 +01:00
Pau Costa Ferrer 89fdbf6617 Add support for space resizing and enhanced layout management
- Update `SpacesService` to handle width and height properties for spaces.
- Introduce `UpdateSpaceDto` for improved validation in batch update operations.
- Extend `FloorplanEditor.svelte` and `FloorplanViewer.svelte` to support dynamic container scaling and space resizing.
- Modify Prisma schema to include `width` and `height` fields for spaces.
- Enhance floorplan rendering to maintain proportional layout during editing and viewing.
2026-03-28 15:53:33 +01:00
Pau Costa Ferrer 7683066ceb Add floorplan editor for admin layout management
- Implement `FloorplanEditor.svelte` component for adding, editing, and positioning spaces.
- Add backend support for floorplan image upload and batch updating space positions.
- Update Prisma schema to include `planImageUrl` for floors.
- Enable API proxy in Vite configuration for straightforward local development.
- Refactor API calls to use a centralized `apiFetch` utility with token handling.
2026-03-28 15:15:28 +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
Pau Costa Ferrer 8dc99bc1a4 Implement authentication, organization management, and floor layout features
- Add API authentication with JWT strategy using NestJS.
- Configure Prisma schema for organizations, users, buildings, floors, and spaces.
- Seed initial database with test data and relationships.
- Build SvelteKit web pages for dashboard and floor layout with secured routing and organization hierarchy display.
- Remove deprecated `AppService` from API.
2026-03-28 00:36:05 +01:00
Pau Costa Ferrer 1faa0d5c8f Initialize Hot Desking app with web and API services
- Set up SvelteKit for the web interface with Tailwind CSS.
- Build the API using NestJS with Prisma ORM for database interaction.
- Add environment variable management and docker-compose for PostgreSQL and PgAdmin instances.
- Create shared data models for consistent typing across services.
- Establish basic routing and layouts for web and API services.
2026-03-28 00:06:57 +01:00