mirror of
https://github.com/bitbaum/vitareba.git
synced 2026-12-05 07:28:27 +01:00
Two UX gaps where patients had no signal that something happened: - Document upload: admin POSTs to /api/documents → patient now gets "New document shared: <title>" email linking to /documents - Programme assignment: admin PATCHes programme → patient gets enrolment email with programme name, phase label, and phase description; fires only on first insert, not on subsequent updates Both sends are fire-and-forget (.catch logged) so API response is never blocked. Adds newDocumentEmail + programmeAssignedEmail templates with escaping and 8 new tests (360 total, 0 failures). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>