fix(portal): wire Rebook Now button + date validation (GRO-265, GRO-266) #162

Merged
groombook-engineer[bot] merged 4 commits from fix/gro-265-rebook-now-button-v2 into main 2026-03-29 15:14:44 +00:00

4 Commits

Author SHA1 Message Date
groombook-ci[bot] 36bae675a7 fix(portal): wire Rebook Now button + clean .js artifacts (GRO-265)
Cherry-picked from contaminated PR #160:
- ReportCards.tsx: Rebook Now button navigates to /admin/book with pet info
- Book.tsx: pre-fill form from URL params (GRO-255)
- Book.tsx: inline date validation (GRO-266)

Also removes compiled .js artifacts (Book.js, ReportCards.js)
that were incorrectly committed.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-29 14:48:34 +00:00
groombook-ci[bot] 0af31d1854 fix(book): add inline validation for date input format (GRO-266)
Date picker now shows a clear error when the value doesn't match
YYYY-MM-DD, instead of silently failing with a browser console warning.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-29 14:48:18 +00:00
groombook-ci[bot] 1d2dfd0f7f fix(book): pre-fill form from URL params to ensure React state is set
Add useSearchParams to read URL parameters (e.g., ?clientName=Jane)
and sync them to the BookingBody state on mount via useEffect.
This ensures validation checks React state, not empty initial state.

Fixes GRO-255

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-29 14:48:18 +00:00
groombook-ci[bot] fc17106f10 fix(portal): wire Rebook Now button to navigate to booking wizard (GRO-265)
The "Rebook Now" button on the Report Card detail view had no click
handler. Now navigates to /admin/book with pet info pre-filled via URL
params (petName, serviceName). Button text changed from "Book Now" to
"Rebook Now" per the bug report.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-29 14:48:18 +00:00