Commit graph

7 commits

Author SHA1 Message Date
38b5f2a0a7
Fix React CSS property conflict: use border instead of borderColor
- Replaced borderColor with full border property in dateButtonSelected
- Replaced borderColor with full border property in slotButtonSelected
- Prevents React warning about mixing shorthand and non-shorthand properties
- Fixes console error when clicking elements on booking page
2025-12-21 18:08:49 +01:00
b9f605d7b3
Extract common errorBanner style to shared styles
- Added errorBanner to sharedStyles for consistent error display
- Removed duplicate errorBanner definitions from all pages
- Updated appointments, booking, admin/appointments, and admin/availability pages
- Reduced code duplication while maintaining component-specific styles
2025-12-21 18:01:30 +01:00
5c396e62ec
Extract duplicate date range helpers to shared utility
- Created getDateRange() function in utils/date.ts
- Replaced getBookableDates() and getDateRange() duplicates
- Both booking and availability pages now use shared function
- Function accepts minAdvanceDays and maxAdvanceDays as parameters
2025-12-21 17:54:49 +01:00
02212ba478
Make error handling consistent across frontend
- Standardized all error handling to use ternary pattern
- Changed if/else blocks to ternary operators for consistency
- Updated booking, appointments, and admin appointments pages
2025-12-21 17:50:52 +01:00
6ff3c0a133
Extract duplicate date formatting functions to shared utilities
- Created frontend/app/utils/date.ts with formatDate, formatTime, formatDateTime, formatDisplayDate
- Created frontend/e2e/helpers/date.ts with formatDateLocal, getTomorrowDateStr
- Updated all frontend pages and e2e tests to use shared utilities
- Removed duplicate date formatting code from 6 files
2025-12-21 17:48:17 +01:00
63cf46c230
Fix: Prevent cancellation of past appointments
Add check to both user and admin cancel endpoints to reject
cancellation of appointments whose slot_start is in the past.
This matches the spec requirement that cancellations can only
happen 'before the appointment'.

Added tests for both user and admin cancel endpoints.

Also includes frontend styling updates.
2025-12-21 17:27:23 +01:00
8ff03a8ec3
Phase 4: Booking UI for regular users with date selection, slot booking, and e2e tests 2025-12-21 00:15:29 +01:00