mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 13:01:00 +00:00
The doctor-report contract has always described the practice / clinic name as a stored preference, and `/api/auth/me` has returned `User.lastReportPracticeName` since it shipped, but nothing ever wrote the column. Every report asked for the clinic name again. The export route now persists the sanitised name after the requested artefact has actually been produced, so a generation that throws cannot overwrite the remembered value with a half-typed one. Clearing the field persists null, which keeps the cover line cleared next time. The export panel seeds its input from the auth payload during render, gated per user id, so a late resolve never clobbers a field the user is already typing into, and a finished export invalidates the cached payload so a remount reads the new value.