Skip to content
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

feat(upload-sub-medicaid): add email templates for medicaid spa upload subsequent docs #905

Merged
merged 10 commits into from
Dec 12, 2024
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import { CommonEmailVariables, Events } from "shared-types";
import { PackageDetails, BasicFooter, Attachments } from "../../email-components";
import { BaseEmailTemplate } from "../../email-templates";
import { styles } from "../../email-styles";
import { Text } from "@react-email/components";

export const MedSpaCMSEmail = (props: {
variables: Events["UploadSubsequentDocuments"] & CommonEmailVariables;
}) => {
const variables = props.variables;
//subject
const previewText = `Medicaid SPA ${variables.id}`;
// start of body
const heading = `New documents have been submitted for Medicaid SPA ${variables.id} in OneMAC.`;
asharonbaltazar marked this conversation as resolved.
Show resolved Hide resolved
return (
<BaseEmailTemplate
previewText={previewText}
heading={heading}
applicationEndpointUrl={variables.applicationEndpointUrl}
footerContent={<BasicFooter />}
>
<PackageDetails
details={{
"State or territory": variables.territory,
"Medicaid SPA Package ID": variables.id,
Summary: variables.additionalInformation,
}}
/>
<Attachments attachments={variables.attachments} />
<Text style={{ ...styles.text.base, marginTop: "16px", fontWeight: "bold" }}>
How to Access:
andieswift marked this conversation as resolved.
Show resolved Hide resolved
</Text>
<Text style={{ ...styles.text.base, marginTop: "16px", marginLeft: "16px" }}>
• These documents can be found in OneMAC through this link
<a href={variables.applicationEndpointUrl} target="_blank">
{variables.applicationEndpointUrl}
</a>
</Text>
<Text style={{ ...styles.text.base, marginTop: "16px", marginLeft: "16px" }}>
• If you are not already logged in, click “Login” at the top of the page and log in using
your Enterprise User Administration (EUA) credentials.
</Text>
<Text style={{ ...styles.text.base, marginTop: "16px", marginLeft: "16px" }}>
• After you logged in, click the submission ID number on the dashboard page to view details.
</Text>
<Text style={{ ...styles.text.base, marginTop: "16px" }}>Thank you.</Text>
</BaseEmailTemplate>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { Events } from "shared-types";
import { CommonEmailVariables } from "shared-types";
import { Text } from "@react-email/components";
import { PackageDetails, DetailsHeading, Attachments, BasicFooter } from "../../email-components";
import { BaseEmailTemplate } from "../../email-templates";
import { styles } from "../../email-styles";

export const MedSpaStateEmail = (props: {
variables: Events["UploadSubsequentDocuments"] & CommonEmailVariables;
}) => {
const variables = props.variables;
const previewText = `Additional documents submitted for Medicaid SPA ${variables.id}`;
const heading = `You’ve successfully submitted the following to CMS reviewers for Medicaid SPA ${variables.id}`;

return (
<BaseEmailTemplate
previewText={previewText}
heading={heading}
applicationEndpointUrl={variables.applicationEndpointUrl}
footerContent={<BasicFooter />}
>
<DetailsHeading />
andieswift marked this conversation as resolved.
Show resolved Hide resolved
<PackageDetails
details={{
"State or territory": variables.territory,
Name: variables.submitterName,
"Email Address": variables.submitterEmail,
"Medicaid SPA Package ID": variables.id,
Summary: variables.additionalInformation,
}}
/>
<Attachments attachments={variables.attachments} />
<Text style={{ ...styles.text.base, marginTop: "16px" }}>
If you have questions or did not expect this email, please contact your CPOC.
</Text>
<Text style={{ ...styles.text.base, marginTop: "16px" }}>Thank you.</Text>
</BaseEmailTemplate>
);
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export { ChipSpaCMSEmail } from "./ChipSpaCMS";
export { ChipSpaStateEmail } from "./ChipSpaState";
export { MedSpaCMSEmail } from "./MedSpaCMS";
export { MedSpaStateEmail } from "./MedSpaState";
export { AppKStateEmail } from "./AppKState";
export { AppKCMSEmail } from "./AppKCMS";
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChipSpaCMSEmail } from "lib/libs/email/content/upload-subsequent-documents/emailTemplates/ChipSpaCMS";
import { ChipSpaCMSEmail } from "lib/libs/email/content/upload-subsequent-documents/emailTemplates";
import { emailTemplateValue } from "lib/libs/email/mock-data/upload-subsequent-documents";
import * as attachments from "lib/libs/email/mock-data/attachments";

Expand All @@ -10,6 +10,7 @@ const ChipSpaCMSEmailPreview = () => {
id: "CO-24-1234",
event: "upload-subsequent-documents",
actionType: "Amend",
authority: "CHIP SPA",
attachments: {
currentStatePlan: attachments.currentStatePlan,
amendedLanguage: attachments.amendedLanguage,
Expand Down
28 changes: 28 additions & 0 deletions lib/libs/email/preview/Upload Subsequent Documents/CMS/MED_SPA.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { MedSpaCMSEmail } from "lib/libs/email/content/upload-subsequent-documents/emailTemplates";
import { emailTemplateValue } from "lib/libs/email/mock-data/upload-subsequent-documents";
import * as attachments from "lib/libs/email/mock-data/attachments";

const ChipSpaCMSEmailPreview = () => {
return (
<MedSpaCMSEmail
variables={{
...emailTemplateValue,
id: "CO-24-1234",
event: "upload-subsequent-documents",
actionType: "Amend",
authority: "Medicaid SPA",
attachments: {
currentStatePlan: attachments.currentStatePlan,
amendedLanguage: attachments.amendedLanguage,
coverLetter: attachments.coverLetter,
budgetDocuments: attachments.budgetDocuments,
publicNotice: attachments.publicNotice,
tribalConsultation: attachments.tribalConsultation,
other: attachments.other,
},
}}
/>
);
};

export default ChipSpaCMSEmailPreview;
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const ChipSpaStateEmailPreview = () => {
id: "CO-24-1234",
event: "upload-subsequent-documents",
actionType: "Amend",
authority: "CHIP SPA",
attachments: {
currentStatePlan: attachments.currentStatePlan,
amendedLanguage: attachments.amendedLanguage,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { emailTemplateValue } from "lib/libs/email/mock-data/upload-subsequent-documents";
import { MedSpaStateEmail } from "lib/libs/email/content/upload-subsequent-documents/emailTemplates";
import * as attachments from "lib/libs/email/mock-data/attachments";
const ChipSpaStateEmailPreview = () => {
return (
<MedSpaStateEmail
variables={{
...emailTemplateValue,
id: "CO-24-1234",
event: "upload-subsequent-documents",
actionType: "Amend",
authority: "Medicaid SPA",
attachments: {
currentStatePlan: attachments.currentStatePlan,
amendedLanguage: attachments.amendedLanguage,
coverLetter: attachments.coverLetter,
budgetDocuments: attachments.budgetDocuments,
publicNotice: attachments.publicNotice,
tribalConsultation: attachments.tribalConsultation,
other: attachments.other,
},
}}
/>
);
};

export default ChipSpaStateEmailPreview;
Loading