Skip to content

Commit

Permalink
feat(abp9): add abp 9 to our webforms (#506)
Browse files Browse the repository at this point in the history
* add abp 9 logic

* mistake cleanup

* cleanup

* Update v202401.ts
  • Loading branch information
jdinh8124 authored Apr 23, 2024
1 parent 16c49a5 commit 721d601
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/services/api/webforms/ABP9/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./v202401";
93 changes: 93 additions & 0 deletions src/services/api/webforms/ABP9/v202401.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
import { FormSchema } from "shared-types";

export const v202401: FormSchema = {
header: "ABP 9: Employer-sponsored insurance and payment of premiums",
sections: [
{
title: "Employer-sponsored insurance and payment of premiums",
form: [
{
slots: [
{
rhf: "Select",
name: "abp9_employee-sponsored-insur-or-pay_does-state-territory-provided-abp-through-employer-sponsored-insur_select",
label:
"Does the state/territory provide the Alternative Benefit Plan (ABP) through the payment of employer-sponsored insurance for participants with such coverage with additional benefits and services provided through a benchmark or benchmark-equivalent benefit package?",
labelStyling: "font-bold",
rules: { required: "* Required" },
props: {
className: "w-[150px]",
options: [
{ label: "Yes", value: "yes" },
{ label: "No", value: "no" },
],
},
},
{
rhf: "Textarea",
name: "abp9_employee-sponsored-insurance-or-payment_describe-employee-sponsored-insurance_textarea",
rules: { required: "* Required" },
formItemStyling: "ml-[0.6rem] px-4 border-l-4 border-l-primary",
label:
"Describe the employer-sponsored insurance, including the population covered, amount of premium assistance by population, and employer-sponsored insurance activities, including required contribution, cost-effectiveness test requirements, and benefit information.",
labelStyling: "font-bold",
dependency: {
conditions: [
{
name: "abp9_employee-sponsored-insur-or-pay_does-state-territory-provided-abp-through-employer-sponsored-insur_select",
type: "expectedValue",
expectedValue: "yes",
},
],
effect: { type: "show" },
},
},

{
rhf: "Select",
name: "abp9_employee-sponsored-insurance-or-pay_does-provide-pay-of-premiums_select",
label:
"Does the state/territory otherwise provide for payment of premiums?",
labelStyling: "font-bold",
rules: { required: "* Required" },
props: {
className: "w-[150px]",
options: [
{ label: "Yes", value: "yes" },
{ label: "No", value: "no" },
],
},
},
{
rhf: "Textarea",
name: "abp9_employee-sponsored-insurance-or-pay_describe-include-pop-covered-assist-contribut_textarea",
rules: { required: "* Required" },
formItemStyling: "ml-[0.6rem] px-4 border-l-4 border-l-primary",
label:
"Describe, including the population covered, amount of premium assistance by population, required contributions, cost-effectiveness test requirements, and benefit information.",
labelStyling: "font-bold",
dependency: {
conditions: [
{
name: "abp9_employee-sponsored-insurance-or-pay_does-provide-pay-of-premiums_select",
type: "expectedValue",
expectedValue: "yes",
},
],
effect: { type: "show" },
},
},

{
rhf: "Textarea",
name: "abp9_employee-sponsored-insurance-or-payment_other-info_textarea",
label:
"Other information about employer-sponsored insurance or payment of premiums (optional)",
labelStyling: "font-bold",
},
],
},
],
},
],
};
6 changes: 5 additions & 1 deletion src/services/api/webforms/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import * as ABP2A from "./ABP2A";
import * as ABP2C from "./ABP2C";
import * as ABP2B from "./ABP2B";
import * as ABP3 from "./ABP3";
import * as ABP5 from "./ABP5";
import * as ABP3_1 from "./ABP3_1";
import * as ABP4 from "./ABP4";
import * as ABP5 from "./ABP5";
import * as ABP9 from "./ABP9";
import * as ABP10 from "./ABP10";
import * as ABP11 from "./ABP11";
import { FormSchema } from "shared-types";
Expand Down Expand Up @@ -36,6 +37,9 @@ export const webformVersions: Record<string, Record<string, FormSchema>> = {
ABP5: {
v202401: ABP5.v202401,
},
ABP9: {
v202401: ABP9.v202401,
},
ABP10: {
v202401: ABP10.v202401,
},
Expand Down
1 change: 1 addition & 0 deletions src/services/ui/e2e/tests/a11y/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ test.describe("test a11y on static routes", () => {
const webformRoutes = [
"/guides/abp",
"/webform/abp10/202401",
"/webform/abp9/202401",
"/webform/abp4/202401",
"/webform/abp3_1/202401",
"/webform/abp3/202401",
Expand Down

0 comments on commit 721d601

Please sign in to comment.