From 1593129a9ee87838b657c7cd062fbde5e23a7190 Mon Sep 17 00:00:00 2001 From: James Dinh Date: Fri, 6 Dec 2024 12:12:06 -0800 Subject: [PATCH 1/6] add all logic for upload subsequent documents --- .../emailTemplates/MedSpaCMS.tsx | 49 +++++++++++++++++++ .../emailTemplates/MedSpaState.tsx | 39 +++++++++++++++ .../emailTemplates/index.tsx | 2 + .../CMS/CHIP_SPA.tsx | 3 +- .../CMS/MED_SPA.tsx | 28 +++++++++++ .../State/CHIP_SPA.tsx | 1 + .../State/MED_SPA.tsx | 27 ++++++++++ 7 files changed, 148 insertions(+), 1 deletion(-) create mode 100644 lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx create mode 100644 lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaState.tsx create mode 100644 lib/libs/email/preview/Upload Subsequent Documents/CMS/MED_SPA.tsx create mode 100644 lib/libs/email/preview/Upload Subsequent Documents/State/MED_SPA.tsx diff --git a/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx b/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx new file mode 100644 index 000000000..4212b4a3c --- /dev/null +++ b/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx @@ -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.`; + return ( + } + > + + + + How to Access: + + + • These documents can be found in OneMAC through this link + + {variables.applicationEndpointUrl} + + + + • 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. + + + • After you logged in, click the submission ID number on the dashboard page to view details. + + Thank you. + + ); +}; diff --git a/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaState.tsx b/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaState.tsx new file mode 100644 index 000000000..b7b5f5e06 --- /dev/null +++ b/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaState.tsx @@ -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 ( + } + > + + + + + If you have questions or did not expect this email, please contact your CPOC. + + Thank you. + + ); +}; diff --git a/lib/libs/email/content/upload-subsequent-documents/emailTemplates/index.tsx b/lib/libs/email/content/upload-subsequent-documents/emailTemplates/index.tsx index fd031f113..2479bc9c8 100644 --- a/lib/libs/email/content/upload-subsequent-documents/emailTemplates/index.tsx +++ b/lib/libs/email/content/upload-subsequent-documents/emailTemplates/index.tsx @@ -1,2 +1,4 @@ export { ChipSpaCMSEmail } from "./ChipSpaCMS"; export { ChipSpaStateEmail } from "./ChipSpaState"; +export { MedSpaCMSEmail } from "./MedSpaCMS"; +export { MedSpaStateEmail } from "./MedSpaState"; diff --git a/lib/libs/email/preview/Upload Subsequent Documents/CMS/CHIP_SPA.tsx b/lib/libs/email/preview/Upload Subsequent Documents/CMS/CHIP_SPA.tsx index 0ee8ce9d2..ceec9f1c2 100644 --- a/lib/libs/email/preview/Upload Subsequent Documents/CMS/CHIP_SPA.tsx +++ b/lib/libs/email/preview/Upload Subsequent Documents/CMS/CHIP_SPA.tsx @@ -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"; @@ -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, diff --git a/lib/libs/email/preview/Upload Subsequent Documents/CMS/MED_SPA.tsx b/lib/libs/email/preview/Upload Subsequent Documents/CMS/MED_SPA.tsx new file mode 100644 index 000000000..7b41cf0a4 --- /dev/null +++ b/lib/libs/email/preview/Upload Subsequent Documents/CMS/MED_SPA.tsx @@ -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 ( + + ); +}; + +export default ChipSpaCMSEmailPreview; diff --git a/lib/libs/email/preview/Upload Subsequent Documents/State/CHIP_SPA.tsx b/lib/libs/email/preview/Upload Subsequent Documents/State/CHIP_SPA.tsx index 5c1b7e947..053adeb21 100644 --- a/lib/libs/email/preview/Upload Subsequent Documents/State/CHIP_SPA.tsx +++ b/lib/libs/email/preview/Upload Subsequent Documents/State/CHIP_SPA.tsx @@ -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, diff --git a/lib/libs/email/preview/Upload Subsequent Documents/State/MED_SPA.tsx b/lib/libs/email/preview/Upload Subsequent Documents/State/MED_SPA.tsx new file mode 100644 index 000000000..44e2ac684 --- /dev/null +++ b/lib/libs/email/preview/Upload Subsequent Documents/State/MED_SPA.tsx @@ -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 ( + + ); +}; + +export default ChipSpaStateEmailPreview; From 1ec4661d4f6018a101fffe998e4a4cf1a932202a Mon Sep 17 00:00:00 2001 From: James Dinh Date: Tue, 10 Dec 2024 08:50:13 -0800 Subject: [PATCH 2/6] add andies comments --- .../emailTemplates/MedSpaCMS.tsx | 25 ++++++------------- .../emailTemplates/MedSpaState.tsx | 2 -- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx b/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx index 4212b4a3c..1e92ca468 100644 --- a/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx +++ b/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx @@ -1,5 +1,10 @@ import { CommonEmailVariables, Events } from "shared-types"; -import { PackageDetails, BasicFooter, Attachments } from "../../email-components"; +import { + PackageDetails, + BasicFooter, + Attachments, + SubDocHowToAccess, +} from "../../email-components"; import { BaseEmailTemplate } from "../../email-templates"; import { styles } from "../../email-styles"; import { Text } from "@react-email/components"; @@ -27,23 +32,7 @@ export const MedSpaCMSEmail = (props: { }} /> - - How to Access: - - - • These documents can be found in OneMAC through this link - - {variables.applicationEndpointUrl} - - - - • 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. - - - • After you logged in, click the submission ID number on the dashboard page to view details. - - Thank you. + ); }; diff --git a/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaState.tsx b/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaState.tsx index b7b5f5e06..36851cdcc 100644 --- a/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaState.tsx +++ b/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaState.tsx @@ -19,7 +19,6 @@ export const MedSpaStateEmail = (props: { applicationEndpointUrl={variables.applicationEndpointUrl} footerContent={} > - If you have questions or did not expect this email, please contact your CPOC. - Thank you. ); }; From 0e25e330684333f5f1e88fa67b06112132c4257a Mon Sep 17 00:00:00 2001 From: James Dinh Date: Tue, 10 Dec 2024 08:59:16 -0800 Subject: [PATCH 3/6] linter --- .../upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx | 2 -- .../upload-subsequent-documents/emailTemplates/MedSpaState.tsx | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx b/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx index 1e92ca468..45db3612c 100644 --- a/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx +++ b/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx @@ -6,8 +6,6 @@ import { SubDocHowToAccess, } 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; diff --git a/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaState.tsx b/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaState.tsx index 36851cdcc..14ad6cae8 100644 --- a/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaState.tsx +++ b/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaState.tsx @@ -1,7 +1,7 @@ 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 { PackageDetails, Attachments, BasicFooter } from "../../email-components"; import { BaseEmailTemplate } from "../../email-templates"; import { styles } from "../../email-styles"; From 7a07d69d806562a3d8767820c803320d7130044d Mon Sep 17 00:00:00 2001 From: James Dinh Date: Wed, 11 Dec 2024 07:33:06 -0800 Subject: [PATCH 4/6] Remove pairing comments --- .../upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx b/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx index 45db3612c..d1b08a1c6 100644 --- a/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx +++ b/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx @@ -11,9 +11,7 @@ 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.`; return ( Date: Wed, 11 Dec 2024 07:52:15 -0800 Subject: [PATCH 5/6] address comments --- .../emailTemplates/MedSpaCMS.tsx | 7 +++---- .../emailTemplates/MedSpaState.tsx | 6 ++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx b/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx index d1b08a1c6..1c05b997e 100644 --- a/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx +++ b/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx @@ -11,12 +11,11 @@ export const MedSpaCMSEmail = (props: { variables: Events["UploadSubsequentDocuments"] & CommonEmailVariables; }) => { const variables = props.variables; - const previewText = `Medicaid SPA ${variables.id}`; - const heading = `New documents have been submitted for Medicaid SPA ${variables.id} in OneMAC.`; + return ( } > diff --git a/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaState.tsx b/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaState.tsx index 14ad6cae8..0302a41b7 100644 --- a/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaState.tsx +++ b/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaState.tsx @@ -9,13 +9,11 @@ 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 ( } > From e922b9543404ed5d5dd9daae68a7e98da9590fc9 Mon Sep 17 00:00:00 2001 From: James Dinh Date: Wed, 11 Dec 2024 15:38:09 -0800 Subject: [PATCH 6/6] change territory --- .../upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx | 2 +- .../upload-subsequent-documents/emailTemplates/MedSpaState.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx b/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx index 1c05b997e..873c4c9ac 100644 --- a/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx +++ b/lib/libs/email/content/upload-subsequent-documents/emailTemplates/MedSpaCMS.tsx @@ -21,7 +21,7 @@ export const MedSpaCMSEmail = (props: { >