feat: pet health alerts field and delete actions (closes #2) #25

Merged
ghost merged 1 commits from feat/pet-health-alerts-and-delete into main 2026-03-17 19:40:29 +00:00
ghost commented 2026-03-17 19:39:02 +00:00 (Migrated from github.com)

Summary

Completes the Pet & Client Records CRUD UI (GitHub issue #2, Paperclip GRO-7).

  • Health alerts field on pets — new health_alerts DB column (migration 0001), surfaced in API Zod schema, shared types, and the pet card + edit form. Displayed as a red badge so groomers immediately notice allergies and medical conditions.
  • Delete pet — each pet card now has a Delete button with a confirmation dialog. Calls DELETE /api/pets/:id.
  • Delete client — client detail panel now has a Delete client button with a cascade warning. Calls DELETE /api/clients/:id (cascade removes pets via DB FK).

Test plan

  • Create a client and add a pet with health alerts — verify red alert badge shows in the card
  • Edit the pet — health alerts field pre-populated and saves correctly
  • Delete a pet — confirmation required, pet removed from list
  • Delete a client — confirmation required, client removed, detail panel clears
  • Run DB migration against a fresh Postgres instance — ALTER TABLE pets ADD COLUMN health_alerts text applies cleanly

🤖 Generated with Claude Code

## Summary Completes the Pet & Client Records CRUD UI (GitHub issue #2, Paperclip GRO-7). - **Health alerts field on pets** — new `health_alerts` DB column (migration 0001), surfaced in API Zod schema, shared types, and the pet card + edit form. Displayed as a red badge so groomers immediately notice allergies and medical conditions. - **Delete pet** — each pet card now has a Delete button with a confirmation dialog. Calls `DELETE /api/pets/:id`. - **Delete client** — client detail panel now has a Delete client button with a cascade warning. Calls `DELETE /api/clients/:id` (cascade removes pets via DB FK). ## Test plan - [ ] Create a client and add a pet with health alerts — verify red alert badge shows in the card - [ ] Edit the pet — health alerts field pre-populated and saves correctly - [ ] Delete a pet — confirmation required, pet removed from list - [ ] Delete a client — confirmation required, client removed, detail panel clears - [ ] Run DB migration against a fresh Postgres instance — `ALTER TABLE pets ADD COLUMN health_alerts text` applies cleanly 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This repo is archived. You cannot comment on pull requests.