feat(seed): seed upcoming appointments across statuses for UAT portal customer (GRO-2311) #201
Reference in New Issue
Block a user
Delete Branch "flea/gro-2311-seed-portal-statusbadge-appts"
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?
feat(seed): upcoming appointments across statuses for UAT portal customer
Implements Option A (CTO-approved) on GRO-2313 (parent GRO-2311; surfaced in GRO-1811 StatusBadge UAT).
Adds
seedUatCustomerPortalAppointmentstopackages/db/src/seed.ts(the root seed used by thereset-demo-datareset/seed image) so the portal customeruat-customer@groombook.devgets a deterministic spread of appointments and the customer-portalStatusBadgepalette can be live-observed, not just code-verified against the bundle.What it seeds (reachable
appointment_statusstates only)a0000001-…-0002confirmeda0000001-…-0003scheduleda0000001-…-0004cancelleda0000001-…-0005no_showno_showlabel** The styled
no_show→no-showbadge-key fix is the clean-bug half of GRO-2319 (web). The existing GRO-2100completedappointment is left untouched (AC #4), so Completed is also covered.Why not
pending/waitlistedappointment_statusis{scheduled, confirmed, in_progress, completed, cancelled, no_show}and the portal<StatusBadge>rendersappointment.statusverbatim —pending/waitlistedare not valid statuses and cannot be seeded. That render-semantics change is the product-gated half of GRO-2319 (needs CMPO sign-off). AC tightened accordingly.Idempotency
Fixed UUIDs +
onConflictDoNothing(target: id)→ the hourly reset CronJob (TRUNCATE + re-seed) and non-truncating dev re-seeds never dup-key (theservices_pkeyclass, GRO-2033). Uses the already-linked Pup Alpha, so GRO-1987 TC-UAT-3 (403 on the unlinked Pup Beta) is unaffected.Verification
pnpm --filter @groombook/db typecheck✅eslint packages/db/src/seed.ts— no new errors (one pre-existingprefer-constat the GRO-2225 cohort, untouched).cc @cpfarhood