forked from Code-4-Community/scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 0
[SSF-159] - Automated Emails 1 Implementation #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
55495f7
Got initial implementation working
dburkhart07 e97b10f
Final commit before writing tests
dburkhart07 9b6d63e
Cleaned up check for usage of send email flag
dburkhart07 578e4a5
Added confirmed application submission for FMs and pantries
dburkhart07 0c3f597
Merged main
dburkhart07 4b8e380
Fixed tests
dburkhart07 4ad7344
Final commit
dburkhart07 f24b9f7
Fixed CI
dburkhart07 e6be3ca
Comments
dburkhart07 c59b5e4
Fixed merge conflicts
dburkhart07 c2620f7
Rewrote user tests
dburkhart07 30973e7
Unique error throwing
dburkhart07 0bb8aa4
Fixed email flow for volunteer creation
dburkhart07 0de7773
Fixed user service flow
dburkhart07 b12d212
Comments and merged main
dburkhart07 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| export type EmailTemplate = { | ||
| subject: string; | ||
| bodyHTML: string; | ||
| additionalContent?: string; | ||
| }; | ||
|
|
||
| export const EMAIL_REDIRECT_URL = 'localhost:4200'; | ||
| // TODO: Change this before production to be the actual ssf email | ||
| export const SSF_PARTNER_EMAIL = 'example@gmail.com'; | ||
|
|
||
| export const emailTemplates = { | ||
| pantryFmApplicationApproved: (params: { name: string }): EmailTemplate => ({ | ||
| subject: 'Your Securing Safe Food Account Has Been Approved', | ||
| bodyHTML: ` | ||
| <p>Hi ${params.name},</p> | ||
| <p> | ||
| We're excited to let you know that your Securing Safe Food account has been | ||
| approved and is now active. You can now log in using the credentials created | ||
| during registration to begin submitting requests, managing donations, and | ||
| coordinating with our network. | ||
| </p> | ||
| <p> | ||
| If you have any questions as you get started or need help navigating the | ||
| platform, please do not hesitate to reach out — we are happy to help! | ||
| </p> | ||
| <p> | ||
| We are grateful to have you as part of the SSF community and look forward | ||
| to working together to expand access to allergen-safe food. | ||
| </p> | ||
| <p>Best regards,<br />The Securing Safe Food Team</p> | ||
| `, | ||
| }), | ||
|
|
||
| volunteerAccountCreated: (): EmailTemplate => ({ | ||
| subject: 'Welcome to Securing Safe Food: Your Volunteer Account Is Ready', | ||
| bodyHTML: ` | ||
| <p>Welcome to Securing Safe Food!</p> | ||
| <p> | ||
| Your volunteer account has been successfully created and you can now log in | ||
| to begin supporting pantry coordination, order matching, and delivery logistics. | ||
| </p> | ||
| <p> | ||
| Once logged in, you'll be able to view your assignments, track active requests, | ||
| and collaborate with partner organizations. | ||
| </p> | ||
| <p> | ||
| Thank you for being part of our mission. Your time and effort directly help | ||
| increase access to safe food for individuals with dietary restrictions. | ||
| </p> | ||
| <p>Best regards,<br />The Securing Safe Food Team</p> | ||
| <p> | ||
| To log in to your account, please click the following link: <a href="${EMAIL_REDIRECT_URL}/login">${EMAIL_REDIRECT_URL}/login</a> | ||
| </p> | ||
| `, | ||
| }), | ||
|
|
||
| pantryFmApplicationSubmittedToAdmin: (): EmailTemplate => ({ | ||
| subject: 'New Partner Application Submitted', | ||
| bodyHTML: ` | ||
| <p>Hi,</p> | ||
| <p> | ||
| A new partner application has been submitted through the SSF platform. | ||
| Please log in to the dashboard to review and take action. | ||
| </p> | ||
| <p>Best regards,<br />The Securing Safe Food Team</p> | ||
| <p> | ||
| To review this application, please enter the admin pantry approval dashboard: <a href="${EMAIL_REDIRECT_URL}/approve-pantries">${EMAIL_REDIRECT_URL}/approve-pantries</a> | ||
| </p> | ||
| `, | ||
| }), | ||
|
|
||
| pantryFmApplicationSubmittedToUser: (params: { | ||
| name: string; | ||
| }): EmailTemplate => ({ | ||
| subject: 'Your Application Has Been Submitted', | ||
| bodyHTML: ` | ||
| <p>Hi ${params.name},</p> | ||
| <p> | ||
| Thank you for your interest in partnering with Securing Safe Food! | ||
| Your application has been successfully submitted and is currently under review. We will notify you via email once a decision has been made. | ||
| </p> | ||
| <p>Best regards,<br />The Securing Safe Food Team</p> | ||
| `, | ||
| }), | ||
|
|
||
| pantrySubmitsFoodRequest: (params: { | ||
| pantryName: string; | ||
| }): EmailTemplate => ({ | ||
| subject: `${params.pantryName} Request Requires Your Review`, | ||
| bodyHTML: ` | ||
| <p>Hi,</p> | ||
| <p> | ||
| A new food request has been submitted by ${params.pantryName}. | ||
| Please log on to the SSF platform to review these request details and begin coordination when ready. | ||
| </p> | ||
| <p> | ||
| Thank you for your continued support of our network and mission! | ||
| <p>Best regards,<br />The Securing Safe Food Team</p> | ||
| `, | ||
| }), | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.