TidyLinker.com
TypeScript
Pull Request Opened
PR #62 opened: Add cleaner calendar availability system
Summary
- Cleaners can set weekly recurring availability (e.g. Mon-Fri 9am-5pm) with split-day support and preset shortcuts
- Date-specific overrides let cleaners mark days as unavailable or add extra hours, with a colour-coded month calendar view showing available/booked/unavailable days
- Public API endpoints power the direct booking form — unavailable dates are greyed out in the DatePicker and available time slots shown as a dropdown
- Server-side validation in
DirectBookingRequestrejects bookings outside available slots (opt-in: cleaners without availability set up are unrestricted) - Sidebar calendar link activated, getting-started checklist updated with availability step
Test plan
- 14 AvailabilityService unit tests (recurring slots, overrides, booked job subtraction, graceful degradation)
- 14 AvailabilityController tests (auth, CRUD, overlap validation, empty array clears)
- 7 API endpoint tests (forDate, forMonth, past/future dates, overrides respected)
- 4 DirectBooking availability validation tests (rejected/allowed scenarios)
- 4 browser tests (empty state, preset save, calendar view, override display)
- 1 smoke test addition (
/cleaner/availability) - Visit
/cleaner/availabilityas cleaner — set schedule, verify calendar - Open booking dialog on cleaner profile as client — verify date/time restriction
+2925
additions
-15
deletions
33
files changed