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:
1 parent
208f08753e
commit
e9bc80cd95
12 files changed
+668
-10
No files matched your search
@@ -76,6 +76,8 @@ An open shift has a signup form. It asks for one person. Another person can use
|
||||
|
||||
With `MAIL_DRIVER=console`, the development server tries to send queued mail every 30 seconds and prints each accepted message in its terminal. That is not delivery to a real inbox. `sent` means the driver accepted the message. A lost result is marked uncertain and is not sent again. SMTP2GO is the mail provider. Set `MAIL_DRIVER=smtp2go` and `SMTP2GO_API_KEY` to send through it. Postmark and SES remain available.
|
||||
|
||||
Each active coordinator gets an email when someone signs up, cancels, or changes a signup. Signing up includes a walk-in. A change is a switch, a move, or a new time, role, or place. Cancelling a shift sends one message for each person who was signed up. The message names the person, the email address, the phone number, and the shift, and it links to that shift. It does not include the private signup link. The same signup does not send a second copy of the same notice. A coordinator who has been removed, or whose sign-in address was replaced, does not receive a notice that is still waiting. Mail already accepted cannot be recalled.
|
||||
|
||||
Coordinator sign-in is at `/login`. The first time the app starts with an empty coordinators table, it creates one administrator from `BOOTSTRAP_ADMIN_EMAIL`. The name on that account is Administrator. It does not create another account on later starts, and it does not change an account that is already there. More administrators are added from **Administrators** after someone is signed in. Sign-in emails a link that expires in 15 minutes and works once. Opening the link does not sign you in. Use the button on that page. The link is printed in the development server log with the rest of the mail. There is no password.
|
||||
|
||||
After sign-in, `/admin` lists events, including events that are off the public list. A coordinator can add and edit an event, show or hide it, add and edit a one-off shift, read that shift's roster, cancel one signup, or cancel the shift. Cancelling keeps the roster. It does not delete the shift or the signup. A time, role, or location change emails the people who are signed up and replaces their private links. The old link stops working when that email is queued.
|
||||
@@ -104,7 +106,7 @@ A reminder is queued at each saved time before a confirmed signup, while the shi
|
||||
|
||||
**Settings**, on the coordinator page, saves the two reminder times, the reply-to address, the privacy-page wording, and how many months to keep a signup after the shift ends. The defaults are 48 hours, 2 hours, the reply-to address from the server configuration, a blank privacy notice, and 24 months. The two reminder times have to be different whole hours from 1 to 336. The month count is a whole number from 1 to 120. A blank privacy notice leaves the public page saying a notice is not approved yet. Saved wording is shown on `/privacy` as written. Saving it does not by itself make that wording an approved privacy policy. New mail uses the saved reply-to address. Mail already queued keeps the address it was given. The sending address stays in the server configuration.
|
||||
|
||||
**Administrators**, on the coordinator page, lists who can sign in. **Add an administrator** saves a name and email. It does not send email. That person requests a sign-in link at `/login`. Saving an address that was removed earlier gives that person access again and updates the name. **Remove** takes away access, signs that person out, and stops unused sign-in links. It does not send email. The last administrator cannot be removed. Any administrator can add or remove the others, including themselves when someone else still has access.
|
||||
**Administrators**, on the coordinator page, lists who can sign in. **Add an administrator** saves a name and email. It does not send email. That person requests a sign-in link at `/login`. Saving an address that was removed earlier gives that person access again and updates the name. **Remove** takes away access, signs that person out, and stops unused sign-in links. It does not send email. A roster notice that has not been sent yet is not sent to that address. The last administrator cannot be removed. Any administrator can add or remove the others, including themselves when someone else still has access.
|
||||
|
||||
Around 1:00 AM in an event's time zone, the app adds any missing shifts from that event's active weekly templates. It does this once for that local date. If 1:00 happens twice when the clocks change, the second hour does not add them again. If 1:00 does not exist that day, the fill runs once the local clock is past 1:00. A restart later that day still fills the date if it was missed. A date that already has a shift, including a cancelled one, stays as it is. Starting the app, and **Add weekly shifts**, still fill the schedule as well.
|
||||
|
||||
|
||||
Reference in new issue
Block a user