-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(emails): CHIP SPA Withdraw Package emails for CMS/State (#870)
* fix: update `email-dev` command * chore: update type for `PackageDetails` * feat: add `WithdrawPackage` to `Events` * chore: remove string from unnecessary curly braces * chore: rename folder and create new withdraw request emails for state/CMS * chore: rename `widthdraw` to `withdraw` * chore: add attachments for `withdraw-package` * feat: add previews for CMS/State `withdraw-package` * chore: JSX removed from template literal * feat: update ChipSpaCMS email to have a spam notice * feat: create additional notice for further questions * chore: move notice to email body * chore: change ! to .
- Loading branch information
1 parent
36cb06f
commit 38f6a16
Showing
4 changed files
with
61 additions
and
85 deletions.
There are no files selected for viewing
This file contains 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
32 changes: 32 additions & 0 deletions
32
lib/libs/email/content/withdrawPackage/emailTemplates/Waiver1915bCMS.tsx
This file contains 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,32 @@ | ||
import { CommonEmailVariables, Events } from "shared-types"; | ||
import { SpamWarning, PackageDetails, BasicFooter } from "../../email-components"; | ||
import { BaseEmailTemplate } from "../../email-templates"; | ||
|
||
export const WaiverCMSEmail = ({ | ||
variables, | ||
}: { | ||
variables: Events["WithdrawPackage"] & CommonEmailVariables; | ||
}) => { | ||
const previewText = `Withdrawal of ${variables.authority} ${variables.id}`; | ||
const heading = | ||
"The OneMAC Submission Portal received a request to withdraw the package below. The package will no longer be considered for CMS review:"; | ||
return ( | ||
<BaseEmailTemplate | ||
previewText={previewText} | ||
heading={heading} | ||
applicationEndpointUrl={variables.applicationEndpointUrl} | ||
footerContent={<BasicFooter />} | ||
> | ||
<PackageDetails | ||
details={{ | ||
"State or territory": variables.territory, | ||
Name: variables.submitterName, | ||
"Email Address": variables.submitterEmail, | ||
"Waiver Number": variables.id, | ||
Summary: variables.additionalInformation, | ||
}} | ||
/> | ||
<SpamWarning /> | ||
</BaseEmailTemplate> | ||
); | ||
}; |
This file contains 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
44 changes: 21 additions & 23 deletions
44
lib/libs/email/content/withdrawRai/emailTemplates/AppKCMS.tsx
This file contains 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 |
---|---|---|
@@ -1,30 +1,28 @@ | ||
import { CommonEmailVariables, Events, RelatedEventType } from "shared-types"; | ||
import { Attachments, PackageDetails, BasicFooter, SpamWarning } from "../../email-components"; | ||
import { BaseEmailTemplate } from "../../email-templates"; | ||
import { CommonEmailVariables } from "shared-types"; | ||
import { RaiWithdraw } from "shared-types"; | ||
import { Html, Container } from "@react-email/components"; | ||
import { WithdrawRAI, PackageDetails, BasicFooter } from "../../email-components"; | ||
|
||
export const AppKCMSEmail = (props: { | ||
variables: Events["RespondToRai"] & CommonEmailVariables; | ||
relatedEvent: RelatedEventType; | ||
variables: RaiWithdraw & CommonEmailVariables; | ||
relatedEvent: any; | ||
}) => { | ||
const { variables, relatedEvent } = { ...props }; | ||
return ( | ||
<BaseEmailTemplate | ||
previewText="Withdraw Formal RAI Response for Waiver Package" | ||
heading={`The OneMAC Submission Portal received a request to withdraw the Formal RAI Response. You are receiving this email notification as the Formal RAI for ${variables.id} was withdrawn by ${variables.submitterName} ${variables.submitterEmail}.`} | ||
applicationEndpointUrl={variables.applicationEndpointUrl} | ||
footerContent={<BasicFooter />} | ||
> | ||
<PackageDetails | ||
details={{ | ||
"State or territory": variables.territory, | ||
Name: relatedEvent.submitterName, | ||
"Email Address": relatedEvent.submitterEmail, | ||
"Waiver Number": variables.id, | ||
Summary: variables.additionalInformation, | ||
}} | ||
/> | ||
<Attachments attachments={variables.attachments} /> | ||
<SpamWarning /> | ||
</BaseEmailTemplate> | ||
<Html lang="en" dir="ltr"> | ||
<Container> | ||
<WithdrawRAI {...variables} /> | ||
<PackageDetails | ||
details={{ | ||
"State or territory": variables.territory, | ||
Name: relatedEvent.submitterName, | ||
"Email Address": relatedEvent.submitterEmail, | ||
"Waiver Number": variables.id, | ||
Summary: variables.additionalInformation, | ||
}} | ||
/> | ||
<BasicFooter /> | ||
</Container> | ||
</Html> | ||
); | ||
}; |