flea/gro-2213-portal-preferredtime
The Book New wizard held raw ISO slot strings (e.g.
"2026-06-09T10:00:00.000Z") from /api/book/availability and rendered them
verbatim on the slot buttons, the Review "Date & Time" line, and the success
screen, and POSTed them straight as preferredTime. The api inserts that into
the Postgres `time` column, so a full ISO datetime is `invalid input syntax
for type time` → unhandled 500, breaking portal booking (GRO-2211).
- Add shared UTC helpers formatSlotLabel(slot) and slotToTime(slot) so the
display label and the submitted time derive from the same canonical UTC ISO
slot and never desync. Both format/extract in UTC (slots are UTC business
hours); guards tolerate already-formatted labels and HH:MM:SS values.
- BookNew: render formatSlotLabel(time) on slot buttons, the Review line, and
the confirmation; submit preferredTime: slotToTime(selectedTime) → HH:MM:SS.
- Export BookingFlow for testing.
- Tests: helper unit tests + a Book New funnel integration test asserting the
rendered slot label is "10:00 AM" (never raw ISO) and the waitlist POST body
preferredTime matches /^\d{2}:\d{2}:\d{2}$/.
GRO-2213
Co-Authored-By: Paperclip <noreply@paperclip.ing>
web
GroomBook web app (extracted from groombook/app monorepo)
Description
Languages
TypeScript
99.5%
CSS
0.3%