From fe0546077fc2cbc180f4b6c8527d179ef4d331a2 Mon Sep 17 00:00:00 2001 From: Ajaita Saini Date: Mon, 6 Jan 2025 13:26:30 -0500 Subject: [PATCH 1/3] set up ui for 2 new reports --- .../ui-src/src/components/layout/HomePage.tsx | 10 ++++ services/ui-src/src/verbiage/pages/home.ts | 56 +++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/services/ui-src/src/components/layout/HomePage.tsx b/services/ui-src/src/components/layout/HomePage.tsx index a8d83542..f3e8991f 100644 --- a/services/ui-src/src/components/layout/HomePage.tsx +++ b/services/ui-src/src/components/layout/HomePage.tsx @@ -8,12 +8,16 @@ import { import { useEffect } from "react"; import { checkDateRangeStatus, useStore } from "utils"; import verbiage from "verbiage/pages/home"; +//import { useFlags } from "launchdarkly-react-client-sdk"; export const HomePage = () => { const { bannerData, bannerActive, setBannerActive } = useStore(); const { intro, cards } = verbiage; const { userIsEndUser } = useStore().user ?? {}; + const isTAReportActive = false; + const isCIReportActive = false; + useEffect(() => { let bannerActivity = false; if (bannerData && bannerData.startDate && bannerData.endDate) { @@ -52,6 +56,12 @@ export const HomePage = () => { + {isTAReportActive && ( + + )} + {isCIReportActive && ( + + )} ) : ( // show read-only view to non-state users diff --git a/services/ui-src/src/verbiage/pages/home.ts b/services/ui-src/src/verbiage/pages/home.ts index 69b5d51d..2ccc65dd 100644 --- a/services/ui-src/src/verbiage/pages/home.ts +++ b/services/ui-src/src/verbiage/pages/home.ts @@ -39,6 +39,62 @@ export default { ], }, }, + TA: { + title: "HCBS Timely Access Report", + body: { + available: "The HCBS is ... ", + }, + linkText: "6071(a)(1) of the Deficit Reduction Act (DRA)", + linkLocation: + "https://www.govinfo.gov/content/pkg/PLAW-109publ171/pdf/PLAW-109publ171.pdf", + postLinkText: + ' as "increasing the use of home and community-based, rather than institutional, long-term care services."', + downloadText: "User Guide and Help File", + link: { + text: "Enter HCBS TA online", + route: "/report/TA/{state}", + }, + accordion: { + buttonLabel: "When is the HCBS Timely Access Report due?", + text: [ + { + content: + "The HCBS Timely Access Report will be created and submitted ...", + }, + { + content: "The HCBS Timely Access Report deadlines are TBD ...", + }, + ], + }, + }, + CI: { + title: "HCBS Critical Incident Report", + body: { + available: "The HCBS is ... ", + }, + linkText: "6071(a)(1) of the Deficit Reduction Act (DRA)", + linkLocation: + "https://www.govinfo.gov/content/pkg/PLAW-109publ171/pdf/PLAW-109publ171.pdf", + postLinkText: + ' as "increasing the use of home and community-based, rather than institutional, long-term care services."', + downloadText: "User Guide and Help File", + link: { + text: "Enter HCBS CI online", + route: "/report/CI/{state}", + }, + accordion: { + buttonLabel: "When is the HCBS Critical Incident Report due?", + text: [ + { + content: + "The HCBS Critical Incident Report will be created and submitted ...", + }, + { + content: "The HCBS Critical Incident Report deadlines are TBD ...", + }, + ], + }, + }, }, readOnly: { header: "View State/Territory Reports", From 0e594f5111a41ca8c056bbbbd7b0e40c8fd09781 Mon Sep 17 00:00:00 2001 From: Ajaita Saini Date: Wed, 8 Jan 2025 12:26:34 -0500 Subject: [PATCH 2/3] add flags back in --- services/ui-src/src/components/layout/HomePage.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/ui-src/src/components/layout/HomePage.tsx b/services/ui-src/src/components/layout/HomePage.tsx index f3e8991f..6fc89102 100644 --- a/services/ui-src/src/components/layout/HomePage.tsx +++ b/services/ui-src/src/components/layout/HomePage.tsx @@ -8,15 +8,15 @@ import { import { useEffect } from "react"; import { checkDateRangeStatus, useStore } from "utils"; import verbiage from "verbiage/pages/home"; -//import { useFlags } from "launchdarkly-react-client-sdk"; +import { useFlags } from "launchdarkly-react-client-sdk"; export const HomePage = () => { const { bannerData, bannerActive, setBannerActive } = useStore(); const { intro, cards } = verbiage; const { userIsEndUser } = useStore().user ?? {}; - const isTAReportActive = false; - const isCIReportActive = false; + const isTAReportActive = useFlags()?.isTaReportActive; + const isCIReportActive = useFlags()?.isCiReportActive; useEffect(() => { let bannerActivity = false; From e46bc7e84f4227edfde6ad72f597585cd9b89614 Mon Sep 17 00:00:00 2001 From: Ajaita Saini Date: Wed, 8 Jan 2025 12:38:45 -0500 Subject: [PATCH 3/3] redirecting to broken page --- services/ui-src/src/verbiage/pages/home.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/ui-src/src/verbiage/pages/home.ts b/services/ui-src/src/verbiage/pages/home.ts index 2ccc65dd..cf86d89a 100644 --- a/services/ui-src/src/verbiage/pages/home.ts +++ b/services/ui-src/src/verbiage/pages/home.ts @@ -52,7 +52,7 @@ export default { downloadText: "User Guide and Help File", link: { text: "Enter HCBS TA online", - route: "/report/TA/{state}", + route: "/report/TA/", }, accordion: { buttonLabel: "When is the HCBS Timely Access Report due?", @@ -80,14 +80,14 @@ export default { downloadText: "User Guide and Help File", link: { text: "Enter HCBS CI online", - route: "/report/CI/{state}", + route: "/report/CI/", }, accordion: { buttonLabel: "When is the HCBS Critical Incident Report due?", text: [ { content: - "The HCBS Critical Incident Report will be created and submitted ...", + "The HCBS Critical Incident will be created and submitted ...", }, { content: "The HCBS Critical Incident Report deadlines are TBD ...",