-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathWaiver1915bCMS.tsx
43 lines (42 loc) · 1.53 KB
/
Waiver1915bCMS.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { CommonEmailVariables, Events } from "shared-types";
import {
Attachments,
DetailsHeading,
LoginInstructions,
PackageDetails,
BasicFooter,
} from "../../email-components";
import { BaseEmailTemplate } from "../../email-templates";
import { formatDate } from "shared-utils";
export const Waiver1915bCMSEmail = (props: {
variables:
| (Events["CapitatedInitial"] & CommonEmailVariables)
| (Events["ContractingInitial"] & CommonEmailVariables);
}) => {
const variables = { ...props.variables };
const previewText = `${variables.authority} ${variables.actionType} Submitted`;
const heading = `The OneMAC Submission Portal received a ${variables.authority} ${variables.actionType} Submission:`;
return (
<BaseEmailTemplate
previewText={previewText}
heading={heading}
applicationEndpointUrl={variables.applicationEndpointUrl}
footerContent={<BasicFooter />}
>
<DetailsHeading />
<LoginInstructions appEndpointURL={variables.applicationEndpointUrl} />
<PackageDetails
details={{
"State or Territory": variables.territory,
Name: variables.submitterName,
"Email Address": variables.submitterEmail,
[`${variables.actionType} Number`]: variables.id,
"Waiver Authority": variables.authority,
"Proposed Effective Date": formatDate(variables.proposedEffectiveDate),
Summary: variables.additionalInformation,
}}
/>
<Attachments attachments={variables.attachments} />
</BaseEmailTemplate>
);
};