Skip to content

Commit

Permalink
Minor content changes for 2023
Browse files Browse the repository at this point in the history
  • Loading branch information
benmartin-coforma committed Oct 5, 2023
1 parent 12318df commit 669f240
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 152 deletions.
6 changes: 6 additions & 0 deletions services/app-api/libs/validation/backend-section.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,12 @@ export const sectionSchema = {
comment: {
type: "string",
},
addAnotherText: {
type: ["string", "null"],
},
hideOptionalHint: {
type: ["boolean", "null"],
},
questions: {
type: "array",
items: {
Expand Down
151 changes: 5 additions & 146 deletions services/database/data/seed/seed-section-base-2023.json
Original file line number Diff line number Diff line change
Expand Up @@ -1616,7 +1616,7 @@
"parts": [
{
"id": "2023-02-a-01",
"text": "This table is pre-filled with your SEDS data for the two most recent federal fiscal years (FFY). If the information is inaccurate, adjust your data in SEDS (go to line 7: “Unduplicated Number Ever Enrolled” in your fourth quarter SEDS report) and then refresh this page. If you’re adjusting data in SEDS, allow one business day for the CARTS data below to update.",
"text": "This table is pre-filled with your SEDS data for the two most recent federal fiscal years (FFY). The percent change column in the table below calculates the rate of growth in enrollment over the previous federal fiscal year by subtracting the previous fiscal year enrollment total from the current fiscal year enrollment total (B - A), and dividing that by the previous fiscal year total (A). If the information is inaccurate, adjust your data in SEDS (go to line 7: “Unduplicated Number Ever Enrolled” in your fourth quarter SEDS report) and then refresh this page. If you’re adjusting data in SEDS, allow one business day for the CARTS data below to update.",
"type": "part",
"title": "Number of Children Enrolled in CHIP",
"questions": [
Expand Down Expand Up @@ -1745,151 +1745,6 @@
"fieldset_id": "synthesized-table-2-2",
"fieldset_info": {
"rows": [
[
{
"contents": "2013"
},
{
"lookupAcs": {
"ffy": "2013",
"acsProperty": "numberUninsured"
}
},
{
"lookupAcs": {
"ffy": "2013",
"acsProperty": "numberUninsuredMoe"
}
},
{
"lookupAcs": {
"ffy": "2013",
"acsProperty": "percentUninsured"
}
},
{
"lookupAcs": {
"ffy": "2013",
"acsProperty": "percentUninsuredMoe"
}
}
],
[
{
"contents": "2014"
},
{
"lookupAcs": {
"ffy": "2014",
"acsProperty": "numberUninsured"
}
},
{
"lookupAcs": {
"ffy": "2014",
"acsProperty": "numberUninsuredMoe"
}
},
{
"lookupAcs": {
"ffy": "2014",
"acsProperty": "percentUninsured"
}
},
{
"lookupAcs": {
"ffy": "2014",
"acsProperty": "percentUninsuredMoe"
}
}
],
[
{
"contents": "2015"
},
{
"lookupAcs": {
"ffy": "2015",
"acsProperty": "numberUninsured"
}
},
{
"lookupAcs": {
"ffy": "2015",
"acsProperty": "numberUninsuredMoe"
}
},
{
"lookupAcs": {
"ffy": "2015",
"acsProperty": "percentUninsured"
}
},
{
"lookupAcs": {
"ffy": "2015",
"acsProperty": "percentUninsuredMoe"
}
}
],
[
{
"contents": "2016"
},
{
"lookupAcs": {
"ffy": "2016",
"acsProperty": "numberUninsured"
}
},
{
"lookupAcs": {
"ffy": "2016",
"acsProperty": "numberUninsuredMoe"
}
},
{
"lookupAcs": {
"ffy": "2016",
"acsProperty": "percentUninsured"
}
},
{
"lookupAcs": {
"ffy": "2016",
"acsProperty": "percentUninsuredMoe"
}
}
],
[
{
"contents": "2017"
},
{
"lookupAcs": {
"ffy": "2017",
"acsProperty": "numberUninsured"
}
},
{
"lookupAcs": {
"ffy": "2017",
"acsProperty": "numberUninsuredMoe"
}
},
{
"lookupAcs": {
"ffy": "2017",
"acsProperty": "percentUninsured"
}
},
{
"lookupAcs": {
"ffy": "2017",
"acsProperty": "percentUninsuredMoe"
}
}
],
[
{
"contents": "2018"
Expand Down Expand Up @@ -8636,6 +8491,7 @@
"parts": [
{
"id": "2023-03-i-01",
"title": "\u00A0",
"type": "part",
"questions": [
{
Expand All @@ -8661,12 +8517,15 @@
},
{
"id": "2023-03-i-02",
"title": "\u00A0",
"text": "Please answer the following questions for all of the state's approved HSIs as listed in section 2.2 of the CHIP state plan.",
"type": "part",
"questions": [
{
"id": "2023-03-i-02-01",
"type": "repeatables",
"addAnotherText": "Does the state have additional HSIs to report?",
"hideOptionalHint": false,
"questions": [
{
"id": "2023-03-i-02-01-01",
Expand Down
23 changes: 17 additions & 6 deletions services/ui-src/src/components/fields/Repeatables.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ const Repeatables = ({
removeRepeatableFrom(question.id);
};

let doYouHaveAnotherVerbiage;
if (question.addAnotherText) {
doYouHaveAnotherVerbiage = question.addAnotherText;
} else if (question.typeLabel) {
doYouHaveAnotherVerbiage = `Do you have another ${question.typeLabel} in this list?`;
} else {
doYouHaveAnotherVerbiage = `Do you have another in this list?`;
}

return (
<>
<Accordion
Expand All @@ -64,26 +73,28 @@ const Repeatables = ({
type="button"
className="add-objective ds-c-button ds-c-button--danger"
>
Delete last {type || "item"}
Delete last {question.typeLabel || "item"}
</button>
)}
</Accordion>

<div className="section-footer">
<span className="question-inner-header span-pdf-no-bookmark">
Do you have another{type ? ` ${type}` : ""} in this list?
{doYouHaveAnotherVerbiage}
</span>

<div className="ds-c-field__hint" aria-label="Hint">
Optional
</div>
{!question.hideOptionalHint && (
<div className="ds-c-field__hint" aria-label="Hint">
Optional
</div>
)}
<button
disabled={disabled}
onClick={add}
type="button"
className="add-objective ds-c-button ds-c-button--primary"
>
Add another{type && ` ${type}`}
Add another{question.typeLabel && ` ${question.typeLabel}`}
<FontAwesomeIcon icon={faPlus} />
</button>
</div>
Expand Down

0 comments on commit 669f240

Please sign in to comment.