fix(portal): show Weight/DoB + Size Category in pet read view (GRO-2207) #54

Merged
Lint Roller merged 1 commits from fix/gro-2207-portal-pet-readview-fields into dev 2026-06-08 17:31:45 +00:00

1 Commits

Author SHA1 Message Date
Flea Flicker 0000ca8010 fix(portal): show Weight/DoB + Size Category in pet read view (GRO-2207)
CI / Test (pull_request) Successful in 20s
CI / Lint & Typecheck (pull_request) Successful in 26s
CI / Build & Push Docker Image (pull_request) Successful in 44s
Portal GET /api/portal/pets serializes weightKg→weight and dateOfBirth→
birthDate. The portal read view read the staff-shaped keys, so populated
pets rendered 'Unknown'. Size Category (petSizeCategory) was never shown
in any read tab.

- packages/types: add portal-shaped weight?/birthDate? alongside the
  existing staff-side weightKg/dateOfBirth (no rename — staff Clients
  pages still use weightKg/dateOfBirth).
- PetProfiles: header + Basic Info InfoRows read portal keys with a
  fallback to staff keys; add a Size Category InfoRow with a
  formatSizeCategory helper (extra_large → 'Extra Large').
- PetForm: pre-fill weight from portal weight key with weightKg fallback.
- Tests: PetProfiles.test.tsx (read view + formatter) and a PetForm
  pre-fill case.

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