Skip to content

Commit

Permalink
Add a column comparing absolute enrollment change
Browse files Browse the repository at this point in the history
  • Loading branch information
benmartin-coforma committed Oct 12, 2023
1 parent c6eee13 commit e06fe91
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
4 changes: 4 additions & 0 deletions services/app-api/libs/validation/backend-section.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,10 @@ export const sectionSchema = {
],
},
},
// If true, this prevents the first column from being bolded
all_columns_have_data: {
type: ["bool", "null"],
},
},
required: ["type", "questions"],
additionalProperties: false,
Expand Down
15 changes: 13 additions & 2 deletions services/database/data/seed/seed-section-base-2023.json
Original file line number Diff line number Diff line change
Expand Up @@ -1918,6 +1918,13 @@
"fieldset_info": {
"rows": [
[
{
"compareACS": {
"ffy1": "2021",
"ffy2": "2022",
"acsProperty": "numberUninsured"
}
},
{
"compareACS": {
"ffy1": "2021",
Expand All @@ -1929,11 +1936,15 @@
],
"headers": [
{
"contents": "Percent change between 2021 and 2022"
"contents": "Change in the number of uninsured children between 2021 and 2022"
},
{
"contents": "Change in the percent of uninsured children between 2021 and 2022"
}
]
},
"fieldset_type": "synthesized_table"
"fieldset_type": "synthesized_table",
"all_columns_have_data": true
},
{
"id": "2023-02-a-02-01",
Expand Down
2 changes: 1 addition & 1 deletion services/ui-src/src/components/fields/SynthesizedTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const SynthesizedTable = ({ rows, question, tableTitle }) => {
return (
<tr key={index}>
{row.map((cell, index) => {
if (index === 0) {
if (index === 0 && !question.all_columns_have_data) {
rowLabel = cell.contents;
return (
<th
Expand Down

0 comments on commit e06fe91

Please sign in to comment.