Skip to content

Commit

Permalink
feat(Upload Waiver) OY2-30723 1915(b) waivers (#934)
Browse files Browse the repository at this point in the history
* feat(Upload Waiver)  OY2-30723 1915(b) waivers

* update formatting. Removed some constants
  • Loading branch information
thwalker6 authored Dec 17, 2024
1 parent 6b5b588 commit d4b2070
Show file tree
Hide file tree
Showing 6 changed files with 127 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { CommonEmailVariables, Events } from "shared-types";
import {
PackageDetails,
BasicFooter,
Attachments,
SubDocHowToAccess,
} from "../../email-components";
import { BaseEmailTemplate } from "../../email-templates";

export const WaiversEmailCMS = ({
variables,
}: {
variables: Events["UploadSubsequentDocuments"] & CommonEmailVariables;
}) => {
return (
<BaseEmailTemplate
previewText={`Action required: review new documents for 1915(B) ${variables.id} in OneMAC.`}
heading={`New documents have been submitted for 1915(B) ${variables.id} in OneMAC.`}
applicationEndpointUrl={variables.applicationEndpointUrl}
footerContent={<BasicFooter />}
>
<PackageDetails
details={{
"State or Territory": variables.territory,
"Waiver Package ID": variables.id,
Summary: variables.additionalInformation,
}}
/>
<Attachments attachments={variables.attachments} />
<SubDocHowToAccess appEndpointURL={variables.applicationEndpointUrl} />
</BaseEmailTemplate>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { CommonEmailVariables, Events } from "shared-types";
import { PackageDetails, BasicFooter, Attachments, Divider } from "../../email-components";
import { styles } from "../../email-styles";
import { Text } from "@react-email/components";
import { BaseEmailTemplate } from "../../email-templates";

export const WaiversEmailState = ({
variables,
}: {
variables: Events["UploadSubsequentDocuments"] & CommonEmailVariables;
}) => {
return (
<BaseEmailTemplate
previewText={`Action required: review new documents for 1915(B) ${variables.id}.`}
heading={`You’ve successfully submitted the following to CMS reviewers for 1915(B) ${variables.id}:`}
applicationEndpointUrl={variables.applicationEndpointUrl}
footerContent={<BasicFooter />}
>
<PackageDetails
details={{
"State or Territory": variables.territory,
Name: variables.submitterName,
"Email Address": variables.submitterEmail,
"Waiver Package ID": variables.id,
Summary: variables.additionalInformation,
}}
/>
<Attachments attachments={variables.attachments} />
<Divider />
<Text style={{ ...styles.text.base, marginTop: "16px" }}>
If you have questions or did not expect this email, please contact your CPOC.
</Text>
</BaseEmailTemplate>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ export { MedSpaCMSEmail } from "./MedSpaCMS";
export { MedSpaStateEmail } from "./MedSpaState";
export { AppKStateEmail } from "./AppKState";
export { AppKCMSEmail } from "./AppKCMS";
export { WaiversEmailCMS } from "./Waiver1915BCMS"
export { WaiversEmailState } from "./Waiver1915BState"
2 changes: 1 addition & 1 deletion lib/libs/email/mock-data/upload-subsequent-documents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const emailTemplateValue = {
},
},
additionalInformation:
"This some additional infornormaiton about the request to withdraw and what makes it important.",
"This some additional information about the request to upload additional documents.",
submitterName: "George Harrison",
submitterEmail: "[email protected]",
timestamp: 1723390633663,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { WaiversEmailCMS } from "lib/libs/email/content/upload-subsequent-documents/emailTemplates/Waiver1915BCMS";
import { emailTemplateValue } from "lib/libs/email/mock-data/upload-subsequent-documents";
import * as attachments from "lib/libs/email/mock-data/attachments";

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

export default Waiver1915bCMSEmail;
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { WaiversEmailState } from "lib/libs/email/content/upload-subsequent-documents/emailTemplates/Waiver1915BState";
import { emailTemplateValue } from "lib/libs/email/mock-data/upload-subsequent-documents";
import * as attachments from "lib/libs/email/mock-data/attachments";

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

export default Waiver1915bCMSEmail;

0 comments on commit d4b2070

Please sign in to comment.