fix(GRO-2236): portal Book New service cards show price + duration #57

Merged
Scrubs McBarkley merged 1 commits from flea/gro-2236-portal-service-cards into dev 2026-06-08 23:30:31 +00:00

1 Commits

Author SHA1 Message Date
Flea Flicker f1fe45fd6a fix(GRO-2236): map portal service basePriceCents/durationMinutes so Book New cards show price + duration
CI / Test (pull_request) Successful in 23s
CI / Lint & Typecheck (pull_request) Successful in 31s
CI / Build & Push Docker Image (pull_request) Successful in 46s
The Book New 'Select Services' cards read svc.price (dollars) and
svc.duration, but GET /api/portal/services projects the canonical DB
columns basePriceCents/durationMinutes. The mismatch rendered every card
as $undefined price and an empty 'min'.

Normalize the services payload at fetch time (basePriceCents -> price in
dollars, durationMinutes -> duration), tolerating an already-normalized
shape. Render price/duration via a formatServicePrice helper that returns
null when absent, so the card gracefully hides the field instead of
printing $undefined.

Adds unit tests for normalizeService and formatServicePrice.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 23:28:36 +00:00