Skip to content

Commit

Permalink
recreate updates for the email static texts
Browse files Browse the repository at this point in the history
  • Loading branch information
kristin-at-theta committed Sep 28, 2023
1 parent 9982d86 commit 96997f9
Show file tree
Hide file tree
Showing 12 changed files with 66 additions and 20 deletions.
18 changes: 4 additions & 14 deletions services/app-api/email/stateSubmissionReceipt.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,10 @@ export const stateSubmissionReceipt = (data, config) => {
CcAddresses: [],
Subject: `Your ${config.typeLabel} ${data.componentId} has been submitted to CMS`,
HTML: `
<p>This response confirms the receipt of your ${config.typeLabel}:</p>
<p> This is confirmation that you submitted a ${
config.typeLabel
} to CMS for review:</p>
${formatPackageDetails(data, config)}
<p>
This response confirms the receipt of your Waiver request or your response to a Waiver Request for Additional Information (RAI)).
You can expect a formal response to your submittal to be issued within 90 days, before ${
data.ninetyDayDate
}.
</p>
<p>
This mailbox is for the submittal of Section 1915(b) and 1915(c) non-web-based Waivers, responses to Requests for Additional
Information (RAI) on Waivers, and extension requests on Waivers only. Any other correspondence will be disregarded.
</p>
<p>If you have any questions, please contact <a href="mailto:[email protected]">[email protected]</a> or your state lead.</p>
<p>Thank you!</p>
`,
${config.closingRemarks.replace("%NINETYDAYS%", data.ninetyDayDate)}`,
};
};
8 changes: 6 additions & 2 deletions services/app-api/email/stateSubmissionReceipt.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ it("builds the State Submission Receipt Email", async () => {
typeLabel: "Test Type",
};

const response2 = stateSubmissionReceipt(testData, testConfig);
expect(response2.HTML.length).toBe(1095);
try {
const response2 = stateSubmissionReceipt(testData, testConfig);
expect(response2.HTML.length).toBe(999);
} catch (e) {
console.log("reeived error: ", e);
}
});
26 changes: 26 additions & 0 deletions services/app-api/form/defaultFormConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,29 @@ export const defaultWithdrawConfig = {
parentType: defaultParentType,
},
};

export const medicaidSpaText = `<p>This response confirms the receipt of your State Plan Amendment (SPA or your response to a SPA Request for Additional Information (RAI)). You can expect a formal response to your submittal to be issued within 90 days, before %NINETYDAYS%.</p>
<p>This mailbox is for the submittal of State Plan Amendments and non-web-based responses to Requests for Additional Information (RAI) on submitted SPAs only. Any other correspondence will be disregarded.</p>
<p>If you have questions or did not expect this email, please contact <a href="mailto:[email protected]">[email protected]</a>.</p>
<p>Thank you!</p>`;
export const medicaidSpaRAIText = `<p>This response confirms the receipt of your State Plan Amendment (SPA or your response to a SPA Request for Additional Information (RAI)). You can expect a formal response to your submittal to be issued within 90 days. To calculate the 90th day, please count the date of receipt as day zero. The 90th day will be 90 calendar days from that date.</p>
<p>This mailbox is for the submittal of State Plan Amendments and non-web-based responses to Requests for Additional Information (RAI) on submitted SPAs only. Any other correspondence will be disregarded.</p>
<p>If you have any questions, please contact <a href="mailto:[email protected]">[email protected]</a> or your state lead.</p>
<p>Thank you!</p>`;
export const chipSpaText = `<p>This response confirms the receipt of your CHIP State Plan Amendment (CHIP SPA or your response to a SPA Request for Additional Information (RAI)). You can expect a formal response to your submittal from CMS at a later date.</p>
<p>If you have questions or did not expect this email, please contact <a href="[email protected]">[email protected]</a>.</p>
<p>Thank you!</p>`;
export const chipSpaRAIText = `<p>This response confirms the receipt of your CHIP State Plan Amendment (SPA or your response to a SPA Request for Additional Information (RAI)).</p>
<p>If you have any questions, please contact <a href="[email protected]">[email protected]</a> or your state lead.</p>
<p>Thank you!</p>`;
export const waiverActionText = `<p>This response confirms the receipt of your Waiver request or your response to a Waiver Request for Additional Information (RAI)). You can expect a formal response to your submittal to be issued within 90 days, before %NINETYDAYS%.</p>
<p>This mailbox is for the submittal of Section 1915(b) and 1915(c) non-web-based Waivers, responses to Requests for Additional Information (RAI) on Waivers, and extension requests on Waivers only. Any other correspondence will be disregarded.</p>
<p>If you have any questions, please contact <a href="mailto:[email protected]">[email protected]</a> or your state lead.</p>
<p>Thank you!</p>`;
export const waiverRAIText = `<p>This response confirms the receipt of your Waiver request or your response to a Waiver Request for Additional Information (RAI)). You can expect a formal response to your submittal to be issued within 90 days. To calculate the 90th day, please count the date of receipt as day zero. The 90th day will be 90 calendar days from that date.</p>
<p>This mailbox is for the submittal of Section 1915(b) and 1915(c) non-web-based Waivers, responses to Requests for Additional Information (RAI) on Waivers, and extension requests on Waivers only. Any other correspondence will be disregarded.</p>
<p>If you have any questions, please contact <a href="mailto:[email protected]">[email protected]</a> or your state lead.</p>
<p>Thank you!</p>`;
export const waiverExtensionText = `<p>This mailbox is for the submittal of Section 1915(b) and 1915(c) non-web-based Waivers, responses to Requests for Additional Information (RAI), and extension requests on Waivers only. Any other correspondence will be disregarded.</p>
<p>If you have any questions, please contact <a href="mailto:[email protected]">[email protected]</a> or your state lead.</p>
<p>Thank you!</p>`;
2 changes: 2 additions & 0 deletions services/app-api/form/submitCHIPSPA.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { chipSPA } from "cmscommonlib";
import handler from "../libs/handler-lib";
import { submitAny } from "./submitAny";
import {
chipSpaText,
defaultFormConfig,
defaultProposedEffectiveDateSchema,
} from "./defaultFormConfig";
Expand All @@ -12,6 +13,7 @@ export const chipSPAFormConfig = {
appendToSchema: {
proposedEffectiveDate: defaultProposedEffectiveDateSchema,
},
closingRemarks: chipSpaText,
};

export const main = handler(async (event) =>
Expand Down
2 changes: 2 additions & 0 deletions services/app-api/form/submitCHIPSPARAIResponse.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
defaultFormConfig,
defaultParentId,
defaultParentType,
chipSpaRAIText,
} from "./defaultFormConfig";

export const chipSPARAIResponseFormConfig = {
Expand All @@ -15,6 +16,7 @@ export const chipSPARAIResponseFormConfig = {
parentId: defaultParentId,
parentType: defaultParentType,
},
closingRemarks: chipSpaRAIText,
};

export const main = handler(async (event) =>
Expand Down
7 changes: 6 additions & 1 deletion services/app-api/form/submitInitialWaiver.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import { initialWaiverB4, initialWaiverB } from "cmscommonlib";

import handler from "../libs/handler-lib";
import { submitAny } from "./submitAny";
import { defaultFormConfig, defaultWaiverSchema } from "./defaultFormConfig";
import {
defaultFormConfig,
defaultWaiverSchema,
waiverActionText,
} from "./defaultFormConfig";

/**
* Submitting a Initial Waiver MUST do the following to return SUCCESS:
Expand All @@ -21,6 +25,7 @@ const initialWaiverFormConfig = {
appendToSchema: {
...defaultWaiverSchema,
},
closingRemarks: waiverActionText,
};

export const initialWaiverB4FormConifg = {
Expand Down
2 changes: 2 additions & 0 deletions services/app-api/form/submitMedicaidSPA.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { submitAny } from "./submitAny";
import {
defaultFormConfig,
defaultProposedEffectiveDateSchema,
medicaidSpaText,
} from "./defaultFormConfig";

export const medicaidSPAFormConfig = {
Expand All @@ -12,6 +13,7 @@ export const medicaidSPAFormConfig = {
appendToSchema: {
proposedEffectiveDate: defaultProposedEffectiveDateSchema,
},
closingRemarks: medicaidSpaText,
};

export const main = handler(async (event) =>
Expand Down
2 changes: 2 additions & 0 deletions services/app-api/form/submitMedicaidSPARAIResponse.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
defaultFormConfig,
defaultParentId,
defaultParentType,
medicaidSpaRAIText,
} from "./defaultFormConfig";

export const medicaidSPARAIResponseFormConfig = {
Expand All @@ -15,6 +16,7 @@ export const medicaidSPARAIResponseFormConfig = {
parentId: defaultParentId,
parentType: defaultParentType,
},
closingRemarks: medicaidSpaRAIText,
};

export const main = handler(async (event) =>
Expand Down
7 changes: 6 additions & 1 deletion services/app-api/form/submitWaiverAmendment.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@ import {
} from "cmscommonlib";
import handler from "../libs/handler-lib";
import { submitAny } from "./submitAny";
import { defaultFormConfig, defaultWaiverSchema } from "./defaultFormConfig";
import {
defaultFormConfig,
defaultWaiverSchema,
waiverActionText,
} from "./defaultFormConfig";

const waiverAmendmentFormConfig = {
...defaultFormConfig,
appendToSchema: {
...defaultWaiverSchema,
parentId: Joi.string().required(),
},
closingRemarks: waiverActionText,
};

export const waiverAmendmentB4FormConifg = {
Expand Down
3 changes: 2 additions & 1 deletion services/app-api/form/submitWaiverExtension.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
import Joi from "joi";
import handler from "../libs/handler-lib";
import { submitAny } from "./submitAny";
import { defaultFormConfig } from "./defaultFormConfig";
import { defaultFormConfig, waiverExtensionText } from "./defaultFormConfig";

export const waiverTemporaryExtensionFormConfig = {
...defaultFormConfig,
Expand All @@ -18,6 +18,7 @@ export const waiverTemporaryExtensionFormConfig = {
parentType: Joi.string().optional(),
temporaryExtensionType: Joi.string().required(),
},
closingRemarks: waiverExtensionText,
};

export const waiverTemporaryExtension1915bFormConfig = {
Expand Down
2 changes: 2 additions & 0 deletions services/app-api/form/submitWaiverRAIResponse.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
defaultFormConfig,
defaultParentId,
defaultParentType,
waiverRAIText,
} from "./defaultFormConfig";

export const waiverRAIResponseFormConfig = {
Expand All @@ -15,6 +16,7 @@ export const waiverRAIResponseFormConfig = {
parentId: defaultParentId,
parentType: defaultParentType,
},
closingRemarks: waiverRAIText,
};

export const main = handler(async (event) =>
Expand Down
7 changes: 6 additions & 1 deletion services/app-api/form/submitWaiverRenewal.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import Joi from "joi";
import handler from "../libs/handler-lib";
import { submitAny } from "./submitAny";
import { defaultFormConfig, defaultWaiverSchema } from "./defaultFormConfig";
import {
defaultFormConfig,
defaultWaiverSchema,
waiverActionText,
} from "./defaultFormConfig";
import { waiverRenewalB4, waiverRenewalB } from "cmscommonlib";
import { waiverAuthorityB4, waiverAuthorityB } from "cmscommonlib";

Expand All @@ -11,6 +15,7 @@ const waiverRenewalFormConfig = {
...defaultWaiverSchema,
parentId: Joi.string().required(),
},
closingRemarks: waiverActionText,
};

export const waiverRenewalB4FormConifg = {
Expand Down

0 comments on commit 96997f9

Please sign in to comment.