From 1f25617009eff79c249147f16b64898a6e3b349e Mon Sep 17 00:00:00 2001 From: brittbujacich Date: Tue, 16 Jul 2024 13:39:40 -0600 Subject: [PATCH 1/4] validateDOMnesting console error fix --- services/app-api/forms/mcpar.json | 12 ++++++++++-- .../src/components/export/ExportedSectionHeading.tsx | 10 ++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/services/app-api/forms/mcpar.json b/services/app-api/forms/mcpar.json index 58310925a..8c7b78cfd 100644 --- a/services/app-api/forms/mcpar.json +++ b/services/app-api/forms/mcpar.json @@ -1075,7 +1075,11 @@ }, { "type": "p", - "content": "Revisions to the Medicaid managed care regulations in 2016 and 2020 built on existing requirements that managed care plans maintain provider networks sufficient to ensure adequate access to covered services by: (1) requiring states to develop quantitative network adequacy standards for at least eight specified provider types if covered under the contract, and to make these standards available online; (2) strengthening network adequacy monitoring requirements; and (3) addressing the needs of people with long-term care service needs (42 CFR 438.66; 42 CFR 438.68).

42 CFR 438.66(e) specifies that the MCPAR must provide information on and an assessment of the availability and accessibility of covered services within the MCO, PHIP, or PAHP contracts, including network adequacy standards for each managed care program." + "content": "Revisions to the Medicaid managed care regulations in 2016 and 2020 built on existing requirements that managed care plans maintain provider networks sufficient to ensure adequate access to covered services by: (1) requiring states to develop quantitative network adequacy standards for at least eight specified provider types if covered under the contract, and to make these standards available online; (2) strengthening network adequacy monitoring requirements; and (3) addressing the needs of people with long-term care service needs (42 CFR 438.66; 42 CFR 438.68)." + }, + { + "type": "p", + "content": "42 CFR 438.66(e) specifies that the MCPAR must provide information on and an assessment of the availability and accessibility of covered services within the MCO, PHIP, or PAHP contracts, including network adequacy standards for each managed care program." } ] }, @@ -3382,7 +3386,11 @@ "info": [ { "type": "p", - "content": "Describe sanctions that the state has issued for each plan. Report all known actions across the following domains: sanctions, administrative penalties, corrective action plans, other. Include any pending or unresolved actions.

42 CFR 438.66(e)(2)(viii) specifies that the MCPAR include the results of any sanctions or corrective action plans imposed by the State or other formal or informal intervention with a contracted MCO, PIHP, PAHP, or PCCM entity to improve performance." + "content": "Describe sanctions that the state has issued for each plan. Report all known actions across the following domains: sanctions, administrative penalties, corrective action plans, other. Include any pending or unresolved actions." + }, + { + "type": "p", + "content": "42 CFR 438.66(e)(2)(viii) specifies that the MCPAR include the results of any sanctions or corrective action plans imposed by the State or other formal or informal intervention with a contracted MCO, PIHP, PAHP, or PCCM entity to improve performance." } ] }, diff --git a/services/ui-src/src/components/export/ExportedSectionHeading.tsx b/services/ui-src/src/components/export/ExportedSectionHeading.tsx index 3ffdb6006..e8a2a1dcf 100644 --- a/services/ui-src/src/components/export/ExportedSectionHeading.tsx +++ b/services/ui-src/src/components/export/ExportedSectionHeading.tsx @@ -1,5 +1,5 @@ // components -import { Box, Heading, Text } from "@chakra-ui/react"; +import { Box, Heading } from "@chakra-ui/react"; // types import { ReportPageVerbiage } from "types"; // utils @@ -34,11 +34,9 @@ export const ExportedSectionHeading = ({ heading, verbiage }: Props) => { {sectionInfo && ( - - {typeof sectionInfo === "string" - ? sectionInfo - : parseCustomHtml(sectionInfo)} - + {typeof sectionInfo === "string" + ? sectionInfo + : parseCustomHtml(sectionInfo)} )} From cb0b92157e0fdee28e32c9fb4f5583cc941a18e5 Mon Sep 17 00:00:00 2001 From: brittbujacich Date: Mon, 18 Nov 2024 14:03:47 -0700 Subject: [PATCH 2/4] refactor reportPageFooter component --- .../components/reports/ReportPageFooter.tsx | 110 +++++++++--------- 1 file changed, 54 insertions(+), 56 deletions(-) diff --git a/services/ui-src/src/components/reports/ReportPageFooter.tsx b/services/ui-src/src/components/reports/ReportPageFooter.tsx index cdf57d37e..4f95a50c8 100644 --- a/services/ui-src/src/components/reports/ReportPageFooter.tsx +++ b/services/ui-src/src/components/reports/ReportPageFooter.tsx @@ -3,7 +3,7 @@ import { useNavigate } from "react-router-dom"; import { Box, Button, Flex, Image, Spinner } from "@chakra-ui/react"; // utils import { parseCustomHtml, useFindRoute, useStore } from "utils"; -import { CustomHtmlElement, FormJson } from "types"; +import { CustomHtmlElement, FormJson, ReportStatus } from "types"; // assets import nextIcon from "assets/icons/icon_next_white.png"; import previousIcon from "assets/icons/icon_previous_blue.png"; @@ -20,56 +20,57 @@ export const ReportPageFooter = ({ report?.formTemplate.flatRoutes, report?.formTemplate.basePath ); - const hidePrevious = previousRoute === "/mcpar" || previousRoute === "/mlr"; - const { userIsAdmin, userIsReadOnly } = useStore().user ?? {}; + const { userIsAdmin, userIsReadOnly, userIsEndUser } = useStore().user ?? {}; const isAdminUserType = userIsAdmin || userIsReadOnly; - const formIsDisabled = isAdminUserType && !form?.editableByAdmins; + const hidePrevious = previousRoute === "/mcpar" || previousRoute === "/mlr"; + const reportWithSubmittedStatus = report?.status === ReportStatus.SUBMITTED; + const formIsDisabled = + (isAdminUserType && !form?.editableByAdmins) || + (userIsEndUser && reportWithSubmittedStatus); + const isReadOnly = !form?.id || formIsDisabled; + + const prevButton = ( + + ); + + const nextButtonNavOnly = ( + + ); + + const nextButtonSubmit = ( + + ); return ( - - - {!hidePrevious && ( - - )} - {!form?.id || formIsDisabled ? ( - - ) : ( - - )} - - + + {!hidePrevious ? prevButton : null} + {isReadOnly ? nextButtonNavOnly : nextButtonSubmit} + {praDisclosure && ( {parseCustomHtml(praDisclosure)} )} @@ -86,15 +87,8 @@ interface Props { const sx = { footerBox: { - marginTop: "3.5rem", - }, - buttonFlex: { - justifyContent: "space-between", - marginY: "1.5rem", - }, - floatButtonRight: { - justifyContent: "right", - marginY: "1.5rem", + marginTop: "2.5rem", + paddingTop: "1.5rem", }, arrowIcon: { width: "1rem", @@ -102,8 +96,12 @@ const sx = { button: { width: "8.25rem", }, + nextButton: { + minWidth: "8.25rem", + marginLeft: "auto", + }, praStatement: { fontSize: "0.875rem", - paddingTop: "2rem", + marginTop: "1rem", }, }; From b890f0e0f5be6a03d4c452a37a8fe605d2e5f3ba Mon Sep 17 00:00:00 2001 From: brittbujacich Date: Tue, 19 Nov 2024 11:48:31 -0700 Subject: [PATCH 3/4] update from PR review --- .../src/components/reports/ReportPageFooter.tsx | 11 ++++++----- services/ui-src/src/constants.ts | 3 +++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/services/ui-src/src/components/reports/ReportPageFooter.tsx b/services/ui-src/src/components/reports/ReportPageFooter.tsx index 4f95a50c8..f90078edd 100644 --- a/services/ui-src/src/components/reports/ReportPageFooter.tsx +++ b/services/ui-src/src/components/reports/ReportPageFooter.tsx @@ -7,6 +7,7 @@ import { CustomHtmlElement, FormJson, ReportStatus } from "types"; // assets import nextIcon from "assets/icons/icon_next_white.png"; import previousIcon from "assets/icons/icon_previous_blue.png"; +import { ROUTES } from "../../constants"; export const ReportPageFooter = ({ submitting, @@ -23,7 +24,7 @@ export const ReportPageFooter = ({ const { userIsAdmin, userIsReadOnly, userIsEndUser } = useStore().user ?? {}; const isAdminUserType = userIsAdmin || userIsReadOnly; - const hidePrevious = previousRoute === "/mcpar" || previousRoute === "/mlr"; + const hidePrevious = ROUTES.includes(previousRoute); const reportWithSubmittedStatus = report?.status === ReportStatus.SUBMITTED; const formIsDisabled = (isAdminUserType && !form?.editableByAdmins) || @@ -34,7 +35,7 @@ export const ReportPageFooter = ({ @@ -44,7 +45,7 @@ export const ReportPageFooter = ({ @@ -57,7 +58,7 @@ export const ReportPageFooter = ({ sx={sx.nextButton} rightIcon={ !submitting ? ( - + Next ) : undefined } > @@ -102,6 +103,6 @@ const sx = { }, praStatement: { fontSize: "0.875rem", - marginTop: "1rem", + marginTop: "2rem", }, }; diff --git a/services/ui-src/src/constants.ts b/services/ui-src/src/constants.ts index 9a1b8da92..331e24cb6 100644 --- a/services/ui-src/src/constants.ts +++ b/services/ui-src/src/constants.ts @@ -79,3 +79,6 @@ export enum States { // TIMEOUT PARAMS export const IDLE_WINDOW = 30 * 60 * 1000; // ms export const PROMPT_AT = 29 * 60 * 1000; //ms + +// routes +export const ROUTES = ["/mcpar", "/mlr", "/naaar"]; From 261560c41f2bcbea1787cd93685b0906a5b2f1e7 Mon Sep 17 00:00:00 2001 From: brittbujacich Date: Tue, 19 Nov 2024 13:28:59 -0700 Subject: [PATCH 4/4] update per PR comment --- services/ui-src/src/components/reports/ReportPageFooter.tsx | 4 ++-- services/ui-src/src/constants.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/services/ui-src/src/components/reports/ReportPageFooter.tsx b/services/ui-src/src/components/reports/ReportPageFooter.tsx index f90078edd..fcf800790 100644 --- a/services/ui-src/src/components/reports/ReportPageFooter.tsx +++ b/services/ui-src/src/components/reports/ReportPageFooter.tsx @@ -7,7 +7,7 @@ import { CustomHtmlElement, FormJson, ReportStatus } from "types"; // assets import nextIcon from "assets/icons/icon_next_white.png"; import previousIcon from "assets/icons/icon_previous_blue.png"; -import { ROUTES } from "../../constants"; +import { INITIAL_REPORT_ROUTES } from "../../constants"; export const ReportPageFooter = ({ submitting, @@ -24,7 +24,7 @@ export const ReportPageFooter = ({ const { userIsAdmin, userIsReadOnly, userIsEndUser } = useStore().user ?? {}; const isAdminUserType = userIsAdmin || userIsReadOnly; - const hidePrevious = ROUTES.includes(previousRoute); + const hidePrevious = INITIAL_REPORT_ROUTES.includes(previousRoute); const reportWithSubmittedStatus = report?.status === ReportStatus.SUBMITTED; const formIsDisabled = (isAdminUserType && !form?.editableByAdmins) || diff --git a/services/ui-src/src/constants.ts b/services/ui-src/src/constants.ts index 331e24cb6..359902f20 100644 --- a/services/ui-src/src/constants.ts +++ b/services/ui-src/src/constants.ts @@ -80,5 +80,5 @@ export enum States { export const IDLE_WINDOW = 30 * 60 * 1000; // ms export const PROMPT_AT = 29 * 60 * 1000; //ms -// routes -export const ROUTES = ["/mcpar", "/mlr", "/naaar"]; +// REPORT ROUTES FOR FIRST SECTION OF A PROGRAM +export const INITIAL_REPORT_ROUTES = ["/mcpar", "/mlr", "/naaar"];