Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added spreadsheet widgets #4248

Merged
merged 5 commits into from
Oct 6, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions services/ui-src/src/components/reports/ReportPageIntro.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// components
import { Box, Heading } from "@chakra-ui/react";
import { Box, Flex, Heading } from "@chakra-ui/react";
import { SpreadsheetWidget } from "components";
// utils
import { parseCustomHtml } from "utils";
import { AnyObject } from "types";

export const ReportPageIntro = ({ text, ...props }: Props) => {
const { section, subsection, info, spreadsheet } = text;
const { section, subsection, info, spreadsheet, spreadsheetLast } = text;
return (
<Box sx={sx.introBox} {...props}>
<Heading as="h1" sx={sx.sectionHeading}>
Expand All @@ -15,12 +15,14 @@ export const ReportPageIntro = ({ text, ...props }: Props) => {
<Heading as="h2" sx={sx.subsectionHeading}>
{subsection}
</Heading>
{spreadsheet && (
<Box sx={sx.spreadsheetWidgetBox}>
<SpreadsheetWidget description={spreadsheet} />
</Box>
)}
{info && <Box sx={sx.infoTextBox}>{parseCustomHtml(info)}</Box>}
<Flex flexDir={spreadsheetLast ? "column-reverse" : "column"}>
gmrabian marked this conversation as resolved.
Show resolved Hide resolved
{spreadsheet && (
<Box sx={sx.spreadsheetWidgetBox}>
<SpreadsheetWidget description={spreadsheet} />
</Box>
)}
{info && <Box sx={sx.infoTextBox}>{parseCustomHtml(info)}</Box>}
</Flex>
</Box>
);
};
Expand Down
23 changes: 16 additions & 7 deletions services/ui-src/src/forms/mcpar/mcpar.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"intro": {
"section": "Section A: Program Information",
"subsection": "Point of Contact",
"info": "Who should CMS contact with questions regarding information reported in the MCPAR? States that do not wish to list a specific individual on the report are encouraged to use a department or program-wide email address that will allow anyone with questions to quickly reach someone who can provide answers."
"info": "Who should CMS contact with questions regarding information reported in the MCPAR? States that do not wish to list a specific individual on the report are encouraged to use a department or program-wide email address that will allow anyone with questions to quickly reach someone who can provide answers.",
"spreadsheet": "A_Program_Info"
},
"form": {
"id": "apoc",
Expand Down Expand Up @@ -87,7 +88,8 @@
"pageType": "standard",
"intro": {
"section": "Section A: Program Information",
"subsection": "Reporting Period"
"subsection": "Reporting Period",
"spreadsheet": "A_Program_Info"
},
"form": {
"id": "arp",
Expand Down Expand Up @@ -132,7 +134,9 @@
"intro": {
"section": "Section A: Program Information",
"subsection": "Add plans (A.7)",
"info": "Enter the name of each plan that participates in the program for which the state is reporting data."
"info": "Enter the name of each plan that participates in the program for which the state is reporting data.",
"spreadsheet": "A_Program_Info",
"spreadsheetLast": true
},
"form": {
"id": "aap",
Expand Down Expand Up @@ -160,7 +164,9 @@
"type": "text",
"content": "Enter the names of Beneficiary Support System (BSS) entities that support enrollees in the program for which the state is reporting data."
}
]
],
"spreadsheet": "A_Program_Info",
"spreadsheetLast": true
},
"form": {
"id": "absse",
Expand Down Expand Up @@ -188,7 +194,8 @@
"pageType": "standard",
"intro": {
"section": "Section B: State-Level Indicators",
"subsection": "I. Program Characteristics and Enrollment"
"subsection": "I. Program Characteristics and Enrollment",
"spreadsheet": "B_State"
},
"form": {
"id": "bpc",
Expand Down Expand Up @@ -222,7 +229,8 @@
"pageType": "standard",
"intro": {
"section": "Section B: State-Level Indicators",
"subsection": "Topic III. Encounter Data Report"
"subsection": "Topic III. Encounter Data Report",
"spreadsheet": "B_State"
},
"form": {
"id": "bedr",
Expand Down Expand Up @@ -313,7 +321,8 @@
"pageType": "standard",
"intro": {
"section": "B: State-Level Indicators",
"subsection": "Topic X: Program Integrity"
"subsection": "Topic X: Program Integrity",
"spreadsheet": "B_State"
},
"form": {
"id": "bpi",
Expand Down