27 Commits

Author SHA1 Message Date
Claude Agent
953f3121cf fix(bookings): increase admin bookings limit validation to 500
Frontend sends limit=200 which exceeded the le=100 validation,
causing 422 errors on the History page for managers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-04 14:41:48 +00:00
Claude Agent
7d649a1e0f fix(bookings): add UTC conversion to admin and reschedule endpoints
admin_create_booking, admin_update_booking, and reschedule_booking
stored naive datetimes without converting to UTC, causing +2h offset
on calendar after the frontend started treating all DB times as UTC.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-04 14:28:07 +00:00
Claude Agent
1a5b2f0e5e fix(calendar): pre-convert datetimes to user timezone, use timeZone UTC
FullCalendar does not reliably convert named timezone events without
a timezone adapter plugin. Instead, we pre-convert UTC datetimes to
the user's display timezone using isoToLocalDateTime and pass them to
FullCalendar with timeZone:'UTC', which displays wall-clock values as-is.

Drag/drop handlers now use delta-based UTC calculation from extendedProps
to send correct UTC times to the API regardless of display timezone.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 11:04:39 +00:00
Claude Agent
7295c9d243 fix(nginx): disable caching for index.html to prevent stale JS bundles
Without Cache-Control: no-cache on index.html, browsers serve old
cached HTML referencing outdated JS bundle hashes after deployment.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 10:57:01 +00:00
Claude Agent
bf96fcf22c fix(calendar): apply ensureUTC to FullCalendar event start/end
FullCalendar treats naive datetime strings as already being in the
display timezone, causing double-offset. Appending 'Z' forces correct
UTC interpretation before conversion to user timezone.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 10:48:26 +00:00
Claude Agent
2f1babd11d docker 2026-03-04 10:27:13 +00:00
Claude Agent
3e040990f5 fix(entrypoint): fix invalid shebang (#! was escaped to #\!)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 10:20:10 +00:00
Claude Agent
727e7adecc fix(entrypoint): convert CRLF to LF to fix Docker execution
exec ./entrypoint.sh: no such file or directory was caused by
Windows-style line endings making the shebang unresolvable.

Also add .gitattributes to enforce LF for shell scripts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 10:17:46 +00:00
Claude Agent
0ade26b48e actualizare readme 2026-03-04 09:55:27 +00:00
Claude Agent
1fdac3fb57 deploy 2026-03-04 09:45:18 +00:00
Claude Agent
8a7956252c fix(traefik): use web entrypoint instead of tls=true
IIS terminates SSL and forwards HTTP (port 80) to Traefik.
tls=true was putting the router on websecure (port 443),
causing 404. All other apps use entrypoints=web.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 08:18:20 +00:00
Claude Agent
f6be0a8cfe fix(docker-compose): revert to bridge network for Docker Compose mode
Dokploy's Docker Compose option uses docker compose up (not stack deploy),
so bridge networks work correctly. Overlay was needed only for Stack mode.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 08:05:46 +00:00
Claude Agent
eaf6b1fbaf fix(docker-compose): use overlay network for Swarm compatibility
Dokploy uses Docker Swarm - bridge networks don't work across
Swarm services. Changed internal network to overlay+attachable.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 08:03:59 +00:00
Claude Agent
99d0c66626 feat(Dockerfile): add root multi-stage Dockerfile for Dokploy
- Stage 1 (node:20): builds Vue.js frontend to /app/dist
- Stage 2 (python:3.12): FastAPI serves API + static files
- main.py: serve Vue.js dist via StaticFiles if /app/dist exists
- Removes GET / route (replaced by frontend index.html)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 07:46:32 +00:00
Claude Agent
b9f994cf8d feat(docker): add Docker Compose deployment for Dokploy
- backend/Dockerfile: Python 3.12-slim, uvicorn on port 8000
- frontend/Dockerfile: multi-stage Node build + nginx:alpine serve
- frontend/nginx.conf: proxy /api to backend, SPA routing for Vue Router
- docker-compose.yml: backend+frontend services with Traefik labels
- fix(cors): use settings.frontend_url instead of hardcoded localhost

Fixes Nixpacks detection failure (requirements.txt/package.json not at root).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 07:32:28 +00:00
Claude Agent
07cc58908f feat(start.sh): add stop and restart commands to manage services
Allows stopping/restarting services when ports are already in use,
with PID tracking, lsof fallback, and SIGKILL escalation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 00:24:05 +00:00
Claude Agent
e21cf03a16 feat: add multi-tenant system with properties, organizations, and public booking
Implement complete multi-property architecture:
- Properties (groups of spaces) with public/private visibility
- Property managers (many-to-many) with role-based permissions
- Organizations with member management
- Anonymous/guest booking support via public API (/api/public/*)
- Property-scoped spaces, bookings, and settings
- Frontend: property selector, organization management, public booking views
- Migration script and updated seed data

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 00:17:21 +00:00
Claude Agent
d637513d92 fix: allow admin to edit any booking via admin endpoint 2026-02-12 15:37:17 +00:00
Claude Agent
d245c72757 feat: complete UI/UX overhaul - dashboard unification, calendar UX, mobile optimization
- Dashboard redesign as command center with filters, quick actions, inline approve/reject
- Reusable components: BookingRow, BookingFilters, ActionMenu, BookingPreviewModal, BookingEditModal
- Calendar: drag & drop reschedule, eventClick preview modal, grid/list toggle
- Mobile: segmented control bookings/calendar toggle, compact pills, responsive layout
- Collapsible filters with active count badge
- Smart menu positioning with Teleport
- Calendar/list bidirectional data sync
- Navigation: unified History page, removed AdminPending
- Google Calendar OAuth integration
- Dark mode contrast improvements, breadcrumb navigation
- useLocalStorage composable for state persistence

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 15:34:47 +00:00
Claude Agent
a4d3f862d2 fix(dashboard): sidebar theming, calendar reactivity, and booking filters
Fix multiple dashboard and UI issues:

Frontend fixes:
- Fix sidebar remaining dark on light theme (add proper light/dark CSS variables)
- Fix DashboardCalendar blank/not showing events (use watch + calendar API instead of computed options)
- Fix upcoming bookings to include active and recent past (last 7 days) bookings
- Improve sidebar collapsed state UX (stack footer buttons vertically, full width)

Details:
- theme.css: Add light sidebar colors (white bg) for :root, keep dark colors for [data-theme="dark"]
- DashboardCalendar: Add watch on events, use calendarRef to update events via removeAllEvents/addEventSource
- Dashboard: Change upcoming filter from "startDate >= now" to "endDate >= 7 days ago"
- AppSidebar: Stack footer-actions vertically when collapsed for better visibility

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-12 10:30:43 +00:00
Claude Agent
28685d8254 feat(dashboard): redesign with active bookings, calendar, and compact stats
Major Dashboard improvements focusing on active reservations and calendar view:

Frontend changes:
- Add ActiveBookings component showing in-progress bookings with progress bars
- Add DashboardCalendar component with read-only calendar view of all user bookings
- Refactor Dashboard layout: active bookings → stats grid → calendar → activity
- Remove redundant Quick Actions and Available Spaces sections
- Make Quick Stats compact (36px icons, 20px font) and clickable (router-link)
- Add datetime utility functions (isBookingActive, getBookingProgress, formatRemainingTime)
- Fix MyBookings to read status query parameter from URL
- Auto-refresh active bookings every 60s with proper cleanup

Backend changes:
- Add GET /api/bookings/my/calendar endpoint with date range filtering
- Fix Google Calendar sync in reschedule_booking and admin_update_booking
- Add Google OAuth environment variables to .env.example

Design:
- Dark mode compatible with CSS variables throughout
- Mobile responsive (768px breakpoint, 2-column stats grid)
- CollapsibleSection pattern for all dashboard sections
- Progress bars with accent colors for active bookings

Performance:
- Optimized API calls (calendar uses date range filtering)
- Remove duplicate calendar data loading on mount
- Computed property caching for stats and filtered bookings
- Memory leak prevention (setInterval cleanup on unmount)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-12 10:21:32 +00:00
Claude Agent
72f46b1062 fix: improve UI responsiveness and formatting across multiple views
- SpaceDetail: Add responsive CSS for FullCalendar mobile layout
  - Stack toolbar elements vertically on mobile (≤768px)
  - Reduce font sizes and padding for compact display
  - Fix overlapping navigation controls and day headers

- Spaces: Add labeled location field with icon
  - Display "Location:" label with MapPin icon
  - Ensure consistent formatting across all space cards

- Dashboard (Admin): Format activity event names
  - Convert snake_case to Title Case (booking_approved → Booking Approved)
  - Improve readability of activity log

- VerifyEmail: Improve mobile button positioning
  - Stack email input and resend button vertically on mobile
  - Add proper padding to prevent edge-touching
  - Make button full-width for better tap targets

These changes improve UI consistency, mobile responsiveness, and user experience
across the application. Coverage improvement: 32% → 93% in Playwright tests.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-12 09:51:51 +00:00
Claude Agent
0bf3e6a7e2 feat: complete UI redesign with dark mode, sidebar navigation, and modern design system
Implemented comprehensive UI overhaul with three-layer architecture:

Layer 1 - Theme System:
- CSS variables for light/dark themes (theme.css)
- Theme composable with light/dark/auto mode (useTheme.ts)
- Sidebar state management composable (useSidebar.ts)
- Refactored main.css to use CSS variables throughout

Layer 2 - Core Components:
- AppSidebar with collapsible navigation (desktop) and overlay (mobile)
- CollapsibleSection reusable component for expandable cards
- Restructured App.vue with new sidebar layout
- Integrated Lucide icons library (lucide-vue-next)

Layer 3 - Views & Components:
- Updated all 14 views with CSS variables and responsive design
- Replaced inline SVG with Lucide icon components
- Added collapsible sections to Dashboard, Admin pages, UserProfile
- Updated 3 shared components (BookingForm, SpaceCalendar, AttachmentsList)

Features:
- Dark/light/auto theme with persistent preference
- Collapsible sidebar (icons-only on desktop, overlay on mobile)
- Consistent color palette using CSS variables
- Full responsive design across all pages
- Modern minimalist aesthetic with Indigo accent color

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-11 21:27:05 +00:00
Claude Agent
9c2846cf00 feat: add per-space timezone settings and improve booking management
- Add timezone configuration per space with fallback to system default
- Implement timezone-aware datetime display and editing across frontend
- Add migration for per_space_settings table
- Update booking service to handle timezone conversions properly
- Improve .gitignore to exclude build artifacts
- Add comprehensive testing documentation

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-11 15:54:51 +00:00
Claude Agent
6edf87c899 refactor(frontend): simplify booking forms and convert to modals
- Simplify BookingForm: remove recurring bookings, templates, and attachments
- Replace datetime-local with separate date/time inputs for better UX
- Convert inline forms to modals (Admin spaces, Users, SpaceDetail)
- Unify Create and Edit booking forms with identical styling and structure
- Add Space field to Edit modal (read-only)
- Fix calendar initial load and set week start to Monday
- Translate all form labels and messages to Romanian

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-11 15:36:22 +00:00
Claude Agent
b93b8d2e71 fix: implement timezone-aware datetime display and editing
All datetime values are stored in UTC but were displaying raw UTC times
to users, causing confusion (e.g., 10:00 Bucharest showing as 08:00).
This implements proper timezone conversion throughout the app using each
user's profile timezone setting.

Changes:
- Frontend: Replace local formatters with timezone-aware utilities
- Backend: Add timezone conversion to PUT /bookings endpoint
- FullCalendar: Configure to display events in user timezone
- Fix edit modal to preserve times when editing bookings

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-11 13:43:31 +00:00
Claude Agent
df4031d99c feat: Space Booking System - MVP complet
Sistem web pentru rezervarea de birouri și săli de ședință
cu flux de aprobare administrativă.

Stack: FastAPI + Vue.js 3 + SQLite + TypeScript

Features implementate:
- Autentificare JWT + Self-registration cu email verification
- CRUD Spații, Utilizatori, Settings (Admin)
- Calendar interactiv (FullCalendar) cu drag-and-drop
- Creare rezervări cu validare (durată, program, overlap, max/zi)
- Rezervări recurente (săptămânal)
- Admin: aprobare/respingere/anulare cereri
- Admin: creare directă rezervări (bypass approval)
- Admin: editare orice rezervare
- User: editare/anulare rezervări proprii
- Notificări in-app (bell icon + dropdown)
- Notificări email (async SMTP cu BackgroundTasks)
- Jurnal acțiuni administrative (audit log)
- Rapoarte avansate (utilizare, top users, approval rate)
- Șabloane rezervări (booking templates)
- Atașamente fișiere (upload/download)
- Conflict warnings (verificare disponibilitate real-time)
- Integrare Google Calendar (OAuth2)
- Suport timezone (UTC storage + user preference)
- 225+ teste backend

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 17:51:29 +00:00