Stu Mason
Stu Mason

Activity

StuMason/cleanconnect
TidyLinker.com
TypeScript
Pull Request Opened

PR #60 opened: Add direct booking feature

Summary

  • Clients can book a cleaner directly from their profile page, bypassing the post-and-wait-for-quotes flow
  • Reuses existing JobPosting + Quote infrastructure with a new direct source type and cleaner_id FK
  • Cleaners see a booking request card with accept/decline buttons on their job detail page
  • Direct booking badges shown across client and cleaner job listings

Changes

  • Migration: source (string, default 'posted') and cleaner_id (nullable FK) on job_postings
  • Enum: JobPostingSource (Posted/Direct)
  • Actions: CreateDirectBooking, AcceptDirectBooking, DeclineDirectBooking
  • Events: DirectBookingRequested, DirectBookingAccepted, DirectBookingDeclined
  • Controllers & Routes: Client store, Cleaner accept/decline
  • Form Request: Full validation including duplicate booking prevention
  • DTOs: Added source, cleaner_name, is_direct_booking fields
  • Frontend: Booking dialog on cleaner profile, accept/decline UI, "Direct Booking" / "Booking Request" badges
  • Notifications: Wired up existing stubs with correct URLs

Test plan

  • 25 feature tests (create: 14, accept: 6, decline: 5)
  • 12 browser tests (client booking flow, cleaner accept/decline, client views)
  • 3 new smoke tests (cleaner profile, client direct booking detail, cleaner direct booking detail)
  • All 37 direct booking tests pass (114 assertions)
  • Full suite: 1037 passed, 1 pre-existing browser flake (cleaner dashboard)
  • No JS errors or console errors on any direct booking page
  • Pint clean, npm build clean
+1959
additions
-61
deletions
39
files changed