PB: 3 new fields on ysterbaard_director_appointments
- proceed_anyway (bool) — true if user proceeded with missing emails
- missing_emails (text) — comma-separated keys
- missing_emails_detail (text) — JSON per-recipient validation
App:
- POST /api/appointments: builds recipient report (initial +
distro); returns 422 + report if proceed_anyway is missing
and any recipient is missing/invalid. preview=1 returns the
report without sending.
- PATCH /api/appointments/[id]: tightened idempotency guard to
also short-circuit on signature_received (not just
mail_sent_to_all). Prevents double-send on double-click.
- DirectorAppointmentTab: two-step modal — "Validate recipients"
surfaces the report (status dots + per-recipient email),
then Send / Proceed anyway / Fix records first. New
"company_email" gap surfaced before any email leaves.
- lib/format.ts: isValidEmail() shared helper.
End-to-end tested: 422 enforces server-side, preview returns
the report, double-PATCH signs only once.
|
||
|---|---|---|
| .. | ||
| voice | ||
| api.ts | ||
| format.ts | ||
| pb.ts | ||
| types.ts | ||
| wizard-types.ts | ||