From ebdf775dab5608b869d11c367c206490aeace97f Mon Sep 17 00:00:00 2001 From: Nathan Keeys Date: Tue, 22 Aug 2023 16:30:14 -0400 Subject: [PATCH 1/4] create transition benchmark strategy UI with mock data --- .../ui-src/src/components/app/AppRoutes.tsx | 4 ++ .../ui-src/src/components/menus/Sidebar.tsx | 8 +++ .../components/reports/ReportPageWrapper.tsx | 18 ++++- .../components/reports/StandardReportPage.tsx | 1 + .../ui-src/src/utils/testing/tbsMockForm.tsx | 68 +++++++++++++++++++ 5 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 services/ui-src/src/utils/testing/tbsMockForm.tsx diff --git a/services/ui-src/src/components/app/AppRoutes.tsx b/services/ui-src/src/components/app/AppRoutes.tsx index 6ffc7ed72..7631078e4 100644 --- a/services/ui-src/src/components/app/AppRoutes.tsx +++ b/services/ui-src/src/components/app/AppRoutes.tsx @@ -38,6 +38,10 @@ export const AppRoutes = () => { /> {/* Report Routes */} } /> + } + /> } /> diff --git a/services/ui-src/src/components/menus/Sidebar.tsx b/services/ui-src/src/components/menus/Sidebar.tsx index 0aedf9355..a56f01e07 100644 --- a/services/ui-src/src/components/menus/Sidebar.tsx +++ b/services/ui-src/src/components/menus/Sidebar.tsx @@ -70,6 +70,14 @@ export const Sidebar = ({ isHidden }: SidebarProps) => { section={{ name: "placeholder", path: "/standard" }} level={1} /> + diff --git a/services/ui-src/src/components/reports/ReportPageWrapper.tsx b/services/ui-src/src/components/reports/ReportPageWrapper.tsx index 7acfa4c00..7703cb283 100644 --- a/services/ui-src/src/components/reports/ReportPageWrapper.tsx +++ b/services/ui-src/src/components/reports/ReportPageWrapper.tsx @@ -8,6 +8,7 @@ import { Sidebar, StandardReportPage, } from "components"; +import { useLocation } from "react-router-dom"; import { PageTypes } from "types"; // utils import { @@ -16,7 +17,22 @@ import { mockStandardReportPageJson, } from "utils/testing/mockForm"; +import { mockStandardTBSReportPageJson } from "utils/testing/tbsMockForm"; + export const ReportPageWrapper = () => { + const location = useLocation(); + + // temporary for mocking correct json per page + const routePath = (path: string) => { + if (path === "/standard") { + return mockStandardReportPageJson; + } else if (path === "/wp/transition-benchmark-strategy") { + return mockStandardTBSReportPageJson; + } else { + return mockStandardReportPageJson; + } + }; + // these should be built off the form template, which comes from the report. const renderPageSection = (route: PageTypes) => { switch (route) { @@ -27,7 +43,7 @@ export const ReportPageWrapper = () => { case PageTypes.REVIEW_SUBMIT: return ; default: - return ; + return ; } }; diff --git a/services/ui-src/src/components/reports/StandardReportPage.tsx b/services/ui-src/src/components/reports/StandardReportPage.tsx index befefa8c9..cb6ca79dc 100644 --- a/services/ui-src/src/components/reports/StandardReportPage.tsx +++ b/services/ui-src/src/components/reports/StandardReportPage.tsx @@ -3,6 +3,7 @@ import { Box } from "@chakra-ui/react"; import { Form, ReportPageFooter, ReportPageIntro } from "components"; import { StandardReportPageShape } from "types"; import { mockStandardReportPageJson } from "utils/testing/mockForm"; + // utils export const StandardReportPage = ({ route, validateOnRender }: Props) => { diff --git a/services/ui-src/src/utils/testing/tbsMockForm.tsx b/services/ui-src/src/utils/testing/tbsMockForm.tsx new file mode 100644 index 000000000..4bb7ca33a --- /dev/null +++ b/services/ui-src/src/utils/testing/tbsMockForm.tsx @@ -0,0 +1,68 @@ +export const mockFormField = { + id: "mock-text-field", + type: "textarea", + validation: "text", + props: { + label: + "Explain how you formulated your projected numbers, which should include descriptions of the data sources used, the time period for the analysis, and the methods used to project the number of transitions.", + }, +}; + +export const mockFormField2 = { + id: "mock-text-field", + type: "textarea", + validation: "text", + props: { + label: + "Provide additional detail on strategies or approaches the state or territory will use to achieve transition targets here and through a required state or territory specific initiative.", + }, +}; + +export const mockForm = { + id: "mock-form-id", + fields: [mockFormField, mockFormField2], +}; + +export const mockVerbiageIntro = { + section: "", + subsection: "mock subsection", + spreadsheet: "mock item", + info: [ + { + type: "html", + content: "mock html", + }, + ], + editEntityButtonText: "Edit", + enterReportText: "Enter Details", +}; + +export const mockVerbaigeIntro = { + section: "", + subsection: "Transition Benchmark Strategy", + spreadsheet: "", + info: [ + { + type: "html", + content: "", + }, + ], + editEntityButtonText: "Edit", + enterReportText: "Enter Details", +}; + +export const mockStandardTBSReportPageJson = { + name: "transition-benchmark-strategy", + path: "/wp/transition-benchmark-strategy", + pageType: "standard", + verbiage: { + intro: mockVerbaigeIntro, + }, + form: mockForm, +}; + +export const mockReviewSubmitPageJson = { + name: "mock-route-3", + path: "/mock/mock-review-and-submit", + pageType: "reviewSubmit", +}; From d7bcb86e0baa801824576efb938c5982eb7ddb8d Mon Sep 17 00:00:00 2001 From: Nathan Keeys Date: Tue, 22 Aug 2023 16:58:53 -0400 Subject: [PATCH 2/4] update getter function name --- services/ui-src/src/components/reports/ReportPageWrapper.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/ui-src/src/components/reports/ReportPageWrapper.tsx b/services/ui-src/src/components/reports/ReportPageWrapper.tsx index 7703cb283..64f7380cc 100644 --- a/services/ui-src/src/components/reports/ReportPageWrapper.tsx +++ b/services/ui-src/src/components/reports/ReportPageWrapper.tsx @@ -23,7 +23,7 @@ export const ReportPageWrapper = () => { const location = useLocation(); // temporary for mocking correct json per page - const routePath = (path: string) => { + const getRoutePath = (path: string) => { if (path === "/standard") { return mockStandardReportPageJson; } else if (path === "/wp/transition-benchmark-strategy") { @@ -43,7 +43,7 @@ export const ReportPageWrapper = () => { case PageTypes.REVIEW_SUBMIT: return ; default: - return ; + return ; } }; From 91ea05b9e2a6dedeabec003c9146f870729037f1 Mon Sep 17 00:00:00 2001 From: Ajaita Saini Date: Thu, 24 Aug 2023 10:09:08 -0400 Subject: [PATCH 3/4] general info page --- services/app-api/forms/wp.json | 8 +++- .../ui-src/src/components/app/AppRoutes.tsx | 4 ++ .../ui-src/src/components/menus/Sidebar.tsx | 8 ++++ .../components/reports/ReportPageWrapper.tsx | 5 ++- .../src/utils/testing/generalInfoMockForm.tsx | 42 +++++++++++++++++++ 5 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 services/ui-src/src/utils/testing/generalInfoMockForm.tsx diff --git a/services/app-api/forms/wp.json b/services/app-api/forms/wp.json index a722fbe90..89a8c7d4e 100644 --- a/services/app-api/forms/wp.json +++ b/services/app-api/forms/wp.json @@ -16,7 +16,13 @@ "section": "", "subsection": "", "hint": "", - "exportSection": "" + "exportSection": "", + "info": [ + { + "type": "text", + "content": "" + } + ] } } }, diff --git a/services/ui-src/src/components/app/AppRoutes.tsx b/services/ui-src/src/components/app/AppRoutes.tsx index 7631078e4..920e6c62b 100644 --- a/services/ui-src/src/components/app/AppRoutes.tsx +++ b/services/ui-src/src/components/app/AppRoutes.tsx @@ -38,6 +38,10 @@ export const AppRoutes = () => { /> {/* Report Routes */} } /> + } + /> } diff --git a/services/ui-src/src/components/menus/Sidebar.tsx b/services/ui-src/src/components/menus/Sidebar.tsx index a56f01e07..dccb1a53d 100644 --- a/services/ui-src/src/components/menus/Sidebar.tsx +++ b/services/ui-src/src/components/menus/Sidebar.tsx @@ -70,6 +70,14 @@ export const Sidebar = ({ isHidden }: SidebarProps) => { section={{ name: "placeholder", path: "/standard" }} level={1} /> + { const location = useLocation(); - // temporary for mocking correct json per page + // TO-DO: remove once db work is complete, temporary for mocking correct json per page const getRoutePath = (path: string) => { if (path === "/standard") { return mockStandardReportPageJson; + } else if (path === "/wp/general-information") { + return mockGeneralInfoReportPageJson; } else if (path === "/wp/transition-benchmark-strategy") { return mockStandardTBSReportPageJson; } else { diff --git a/services/ui-src/src/utils/testing/generalInfoMockForm.tsx b/services/ui-src/src/utils/testing/generalInfoMockForm.tsx new file mode 100644 index 000000000..5c3204a70 --- /dev/null +++ b/services/ui-src/src/utils/testing/generalInfoMockForm.tsx @@ -0,0 +1,42 @@ +export const mockGeneralInfoForm = { + id: "mock-general-info-id", + fields: [], +}; + +export const mockGeneralInfoReportPageVerbiage = { + section: "", + subsection: "General Information", + hint: "", + exportSection: "", + info: [ + { + type: "html", + content: + "The Money Follows the Person (MFP) Demonstration Work Plan (WP) is the state or territory’s road map for accomplishing the rebalancing objective described in section ", + }, + { + type: "externalLink", + content: "6071(a)(1) of the Deficit Reduction Act (DRA)", + props: { + href: "https://www.govinfo.gov/content/pkg/PLAW-109publ171/pdf/PLAW-109publ171.pdf", + target: "_blank", + ariaLabel: "Link opens in new tab", + }, + }, + { + type: "html", + content: + " as “increasing the use of home and community-based, rather than institutional, long-term care services.” The WP presents MFP Demonstration initiatives that support the state or territory’s unique rebalancing goals and objectives. The WP enables states or territories and Centers for Medicare & Medicaid Services (CMS) to monitor state or territory-specific initiatives throughout the grant and make course corrections where needed. While the WP describes state or territory initiatives and sets performance measures, the Semi-Annual Progress Report (SAR) will capture progress on these initiatives and performance measures, alongside other information.

A recipient submits an initial WP with the updated operational protocol for review and approval. The WP will be updated annually during Period 1 of SAR reporting (July–August). Recipients may also submit updates to the WP during Period 2 of SAR reporting (January–February) to reflect any planned changes in state or territory-specific initiatives or add new initiatives. Changes to the WP must be submitted to CMS for approval no later than 30 days prior to the planned date of implementation of the change and the proposed change(s) may not be implemented until approved. Approved changes will be integrated into the recipient’s SAR reporting for the following reporting period. Note that requests to change Transition Benchmark projections can be made once annually, during the July–August period.

CMS may amend or add new WP fields during the demonstration period. For additional guidance on completing this form, please see the associated User Guide and Help File. ", + }, + ], +}; + +export const mockGeneralInfoReportPageJson = { + name: "mock-general-information", + path: "/wp/general-information", + pageType: "generalInfo", + verbiage: { + intro: mockGeneralInfoReportPageVerbiage, + }, + form: mockGeneralInfoForm, +}; From 1038d6dd76cb0a0693d1d3d929b3a9a93bcbfddc Mon Sep 17 00:00:00 2001 From: Ajaita Saini Date: Wed, 30 Aug 2023 15:48:10 -0400 Subject: [PATCH 4/4] remove mock + add to wp.json --- services/app-api/forms/wp.json | 21 +++++- .../ui-src/src/components/menus/Sidebar.tsx | 16 ----- .../src/utils/testing/generalInfoMockForm.tsx | 42 ------------ .../ui-src/src/utils/testing/tbsMockForm.tsx | 68 ------------------- 4 files changed, 18 insertions(+), 129 deletions(-) delete mode 100644 services/ui-src/src/utils/testing/generalInfoMockForm.tsx delete mode 100644 services/ui-src/src/utils/testing/tbsMockForm.tsx diff --git a/services/app-api/forms/wp.json b/services/app-api/forms/wp.json index 3bda626cd..cbb7d1873 100644 --- a/services/app-api/forms/wp.json +++ b/services/app-api/forms/wp.json @@ -14,13 +14,28 @@ "verbiage": { "intro": { "section": "", - "subsection": "", + "subsection": "General Information", "hint": "", "exportSection": "", "info": [ { - "type": "text", - "content": "" + "type": "html", + "content": + "The Money Follows the Person (MFP) Demonstration Work Plan (WP) is the state or territory’s road map for accomplishing the rebalancing objective described in section " + }, + { + "type": "externalLink", + "content": "6071(a)(1) of the Deficit Reduction Act (DRA)", + "props": { + "href": "https://www.govinfo.gov/content/pkg/PLAW-109publ171/pdf/PLAW-109publ171.pdf", + "target": "_blank", + "ariaLabel": "Link opens in new tab" + } + }, + { + "type": "html", + "content": + " as “increasing the use of home and community-based, rather than institutional, long-term care services.” The WP presents MFP Demonstration initiatives that support the state or territory’s unique rebalancing goals and objectives. The WP enables states or territories and Centers for Medicare & Medicaid Services (CMS) to monitor state or territory-specific initiatives throughout the grant and make course corrections where needed. While the WP describes state or territory initiatives and sets performance measures, the Semi-Annual Progress Report (SAR) will capture progress on these initiatives and performance measures, alongside other information.

A recipient submits an initial WP with the updated operational protocol for review and approval. The WP will be updated annually during Period 1 of SAR reporting (July–August). Recipients may also submit updates to the WP during Period 2 of SAR reporting (January–February) to reflect any planned changes in state or territory-specific initiatives or add new initiatives. Changes to the WP must be submitted to CMS for approval no later than 30 days prior to the planned date of implementation of the change and the proposed change(s) may not be implemented until approved. Approved changes will be integrated into the recipient’s SAR reporting for the following reporting period. Note that requests to change Transition Benchmark projections can be made once annually, during the July–August period.

CMS may amend or add new WP fields during the demonstration period. For additional guidance on completing this form, please see the associated User Guide and Help File. " } ] } diff --git a/services/ui-src/src/components/menus/Sidebar.tsx b/services/ui-src/src/components/menus/Sidebar.tsx index dccb1a53d..0aedf9355 100644 --- a/services/ui-src/src/components/menus/Sidebar.tsx +++ b/services/ui-src/src/components/menus/Sidebar.tsx @@ -70,22 +70,6 @@ export const Sidebar = ({ isHidden }: SidebarProps) => { section={{ name: "placeholder", path: "/standard" }} level={1} /> - - diff --git a/services/ui-src/src/utils/testing/generalInfoMockForm.tsx b/services/ui-src/src/utils/testing/generalInfoMockForm.tsx deleted file mode 100644 index 5c3204a70..000000000 --- a/services/ui-src/src/utils/testing/generalInfoMockForm.tsx +++ /dev/null @@ -1,42 +0,0 @@ -export const mockGeneralInfoForm = { - id: "mock-general-info-id", - fields: [], -}; - -export const mockGeneralInfoReportPageVerbiage = { - section: "", - subsection: "General Information", - hint: "", - exportSection: "", - info: [ - { - type: "html", - content: - "The Money Follows the Person (MFP) Demonstration Work Plan (WP) is the state or territory’s road map for accomplishing the rebalancing objective described in section ", - }, - { - type: "externalLink", - content: "6071(a)(1) of the Deficit Reduction Act (DRA)", - props: { - href: "https://www.govinfo.gov/content/pkg/PLAW-109publ171/pdf/PLAW-109publ171.pdf", - target: "_blank", - ariaLabel: "Link opens in new tab", - }, - }, - { - type: "html", - content: - " as “increasing the use of home and community-based, rather than institutional, long-term care services.” The WP presents MFP Demonstration initiatives that support the state or territory’s unique rebalancing goals and objectives. The WP enables states or territories and Centers for Medicare & Medicaid Services (CMS) to monitor state or territory-specific initiatives throughout the grant and make course corrections where needed. While the WP describes state or territory initiatives and sets performance measures, the Semi-Annual Progress Report (SAR) will capture progress on these initiatives and performance measures, alongside other information.

A recipient submits an initial WP with the updated operational protocol for review and approval. The WP will be updated annually during Period 1 of SAR reporting (July–August). Recipients may also submit updates to the WP during Period 2 of SAR reporting (January–February) to reflect any planned changes in state or territory-specific initiatives or add new initiatives. Changes to the WP must be submitted to CMS for approval no later than 30 days prior to the planned date of implementation of the change and the proposed change(s) may not be implemented until approved. Approved changes will be integrated into the recipient’s SAR reporting for the following reporting period. Note that requests to change Transition Benchmark projections can be made once annually, during the July–August period.

CMS may amend or add new WP fields during the demonstration period. For additional guidance on completing this form, please see the associated User Guide and Help File. ", - }, - ], -}; - -export const mockGeneralInfoReportPageJson = { - name: "mock-general-information", - path: "/wp/general-information", - pageType: "generalInfo", - verbiage: { - intro: mockGeneralInfoReportPageVerbiage, - }, - form: mockGeneralInfoForm, -}; diff --git a/services/ui-src/src/utils/testing/tbsMockForm.tsx b/services/ui-src/src/utils/testing/tbsMockForm.tsx deleted file mode 100644 index 4bb7ca33a..000000000 --- a/services/ui-src/src/utils/testing/tbsMockForm.tsx +++ /dev/null @@ -1,68 +0,0 @@ -export const mockFormField = { - id: "mock-text-field", - type: "textarea", - validation: "text", - props: { - label: - "Explain how you formulated your projected numbers, which should include descriptions of the data sources used, the time period for the analysis, and the methods used to project the number of transitions.", - }, -}; - -export const mockFormField2 = { - id: "mock-text-field", - type: "textarea", - validation: "text", - props: { - label: - "Provide additional detail on strategies or approaches the state or territory will use to achieve transition targets here and through a required state or territory specific initiative.", - }, -}; - -export const mockForm = { - id: "mock-form-id", - fields: [mockFormField, mockFormField2], -}; - -export const mockVerbiageIntro = { - section: "", - subsection: "mock subsection", - spreadsheet: "mock item", - info: [ - { - type: "html", - content: "mock html", - }, - ], - editEntityButtonText: "Edit", - enterReportText: "Enter Details", -}; - -export const mockVerbaigeIntro = { - section: "", - subsection: "Transition Benchmark Strategy", - spreadsheet: "", - info: [ - { - type: "html", - content: "", - }, - ], - editEntityButtonText: "Edit", - enterReportText: "Enter Details", -}; - -export const mockStandardTBSReportPageJson = { - name: "transition-benchmark-strategy", - path: "/wp/transition-benchmark-strategy", - pageType: "standard", - verbiage: { - intro: mockVerbaigeIntro, - }, - form: mockForm, -}; - -export const mockReviewSubmitPageJson = { - name: "mock-route-3", - path: "/mock/mock-review-and-submit", - pageType: "reviewSubmit", -};