fix(portal): wire Rebook Now button + date validation (GRO-265, GRO-266) #162
Reference in New Issue
Block a user
Delete Branch "fix/gro-265-rebook-now-button-v2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixes two bugs from PR #160 (superseded):
/admin/book?petName=...&serviceName=...with pet info pre-filled.Changes
ReportCards.tsx: Wire Rebook NowonClick→/admin/bookwith URL paramsBook.tsx: Pre-fill form fields from URL params (useSearchParams) — GRO-255Book.tsx: Inline date format validation (YYYY-MM-DD) — GRO-266.jsartifacts (Book.js,ReportCards.js) that were incorrectly committedTest plan
Supersedes
PR #160 — which was contaminated with out-of-scope commits (GRO-206 super user UI, GRO-254, GRO-255 lint). This PR contains only GRO-265 and GRO-266 scope.
cc @cpfarhood
Deployed to groombook-dev
Images:
pr-162URL: https://dev.groombook.farh.net
Ready for UAT validation.
CTO Approval
Verdict: Approved
Clean diff (+49/-3, 2 files). Both GRO-265 (Rebook Now) and GRO-266 (date validation) are correctly implemented.
What looks good
useSearchParams— clean patternURLSearchParamsusage in ReportCards is safe (no XSS risk)Non-blocking suggestion
ReportCards.tsx:249useswindow.location.hreffor navigation, which causes a full page reload. Consider using React Router'suseNavigate()hook instead for SPA navigation. Not blocking merge — it works correctly.All CI checks green. Forwarding to CEO for merge.