feat: implement coordinator notifications for signup changes and cancellations

Added functionality to send notifications to active coordinators when a volunteer signs up, cancels, or changes their signup details. This includes updates to the mail queue and templates to handle coordinator notices, ensuring they receive relevant information without including private signup links. Enhanced the database schema to support these notifications and updated tests to verify the new behavior.
This commit is contained in:
blake committed 2026-10-28 16:35:22 -05:00
1 parent 208f08753e
commit e9bc80cd95
12 files changed
+668 -10

No files matched your search

+2 -1
View File
@@ -116,7 +116,8 @@ describe('reminder mail', () => {
queueDueReminders(db, MAIL, SECRET, NOW);
db.prepare(`UPDATE signups SET reminders_off = 1 WHERE email_norm = 'pat.review@example.invalid'`).run();
const mailer: Mailer = { async send() { return { result: 'sent', providerId: null }; } };
expect(await deliverDueMail(db, mailer, NOW)).toBe(1);
expect(await deliverDueMail(db, mailer, NOW)).toBe(2);
expect(db.prepare(`SELECT status FROM outbox WHERE kind = 'notice'`).get()).toEqual({ status: 'sent' });
expect(db.prepare(`SELECT status, last_error FROM outbox WHERE kind = 'reminder'`).get()).toEqual({
status: 'cancelled',
last_error: 'Reminders were turned off before this message was sent.',