Skip to content

Commit

Permalink
feat: create waiver emails
Browse files Browse the repository at this point in the history
  • Loading branch information
asharonbaltazar committed Dec 3, 2024
1 parent 22ba203 commit 78f313c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 27 deletions.
46 changes: 21 additions & 25 deletions lib/libs/email/content/withdrawPackage/emailTemplates/WaiverCMS.tsx
Original file line number Diff line number Diff line change
@@ -1,32 +1,28 @@
import { CommonEmailVariables, Events } from "shared-types";
import { SpamWarning, PackageDetails, BasicFooter } from "../../email-components";
import { SpamWarning, PackageDetails, BasicFooter, Divider } 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>
);
};
}) => (
<BaseEmailTemplate
previewText={`Waiver Package ${variables.id} Withdraw Request`}
heading="The OneMAC Submission Portal received a request to withdraw the package below. The package will no longer be considered for CMS review:"
applicationEndpointUrl={variables.applicationEndpointUrl}
footerContent={<BasicFooter />}
>
<Divider />
<PackageDetails
details={{
"State or territory": variables.territory,
Name: variables.submitterName,
"Email Address": variables.submitterEmail,
"Waiver Number": variables.id,
Summary: variables.additionalInformation,
}}
/>
<SpamWarning />
</BaseEmailTemplate>
);
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ export const WaiverStateEmail = ({
}) => {
return (
<BaseEmailTemplate
previewText={`Withdrawal of ${variables.authority} ${variables.id}`}
heading={`This is confirmation that you have requested to withdraw the package below. The package will no longer be considered for CMS review:`}
previewText={`Waiver Package ${variables.id} Withdraw Request`}
heading={
"This is confirmation that you have requested to withdraw the package below. The package will no longer be considered for CMS review:"
}
applicationEndpointUrl={variables.applicationEndpointUrl}
footerContent={<BasicFooter />}
>
Expand Down

0 comments on commit 78f313c

Please sign in to comment.