Skip to content

Commit

Permalink
Merge branch 'main' into oy2-28891
Browse files Browse the repository at this point in the history
  • Loading branch information
andieswift authored Aug 22, 2024
2 parents 7447590 + 08e0d72 commit 1cc9cdc
Show file tree
Hide file tree
Showing 46 changed files with 830 additions and 472 deletions.
2 changes: 1 addition & 1 deletion docs/docs/webforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ These webforms are a replacement for the pdf form uploads previously used in mmd
1. The data. The data collected is added along with its metadata to its parent record. This data can be used to view/approve/edit the form later by admins or other users with appropriate permissions.

## Things to note
Some of the fields listed in these webforms are FieldGroups and FieldArrays. This means that they are arrays of values that contain groups of like values (think an array of identicaly typed objects). The items within those arrays will have `Parent` values to indicate which parent they belong to.
Some of the fields listed in these webforms are FieldArrays. This means that they are arrays of values that contain groups of like values (think an array of identicaly typed objects). The items within those arrays will have `Parent` values to indicate which parent they belong to.

## Key structuring of Webforms:
For our webforms, we are in communication with data connect on our we should pass our json data to their team. We have gone with this approach to help streamline our data, but also make it as easy as possible to hunt down questions if items are added or changed. Our “name” keys are made up of for different parts.
Expand Down
11 changes: 7 additions & 4 deletions lib/libs/webforms/ABP1/v202401.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FormSchema } from "shared-types";
import { DefaultFieldGroupProps, FormSchema } from "shared-types";

export const v202401: FormSchema = {
header: "ABP 1: Alternative Benefit Plan populations",
Expand Down Expand Up @@ -626,9 +626,10 @@ export const v202401: FormSchema = {
{
slots: [
{
rhf: "FieldGroup",
rhf: "FieldArray",
name: "income_definition_specific_statewide_group_region",
props: {
...DefaultFieldGroupProps,
appendText: "Add Region",
removeText:
"Remove Region",
Expand Down Expand Up @@ -773,9 +774,10 @@ export const v202401: FormSchema = {
{
slots: [
{
rhf: "FieldGroup",
rhf: "FieldArray",
name: "income_definition_specific_statewide_group_liv_arrange",
props: {
...DefaultFieldGroupProps,
appendText:
"Add Living Arrangement",
removeText:
Expand Down Expand Up @@ -922,9 +924,10 @@ export const v202401: FormSchema = {
{
slots: [
{
rhf: "FieldGroup",
rhf: "FieldArray",
name: "income_definition_specific_statewide_group_other",
props: {
...DefaultFieldGroupProps,
appendText:
"Add some other way",
removeText:
Expand Down
11 changes: 7 additions & 4 deletions lib/libs/webforms/ABP1/v202402.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FormSchema } from "shared-types";
import { FormSchema, DefaultFieldGroupProps } from "shared-types";

export const v202402: FormSchema = {
header: "ABP 1: Alternative Benefit Plan populations",
Expand Down Expand Up @@ -630,9 +630,10 @@ export const v202402: FormSchema = {
{
slots: [
{
rhf: "FieldGroup",
rhf: "FieldArray",
name: "income-def-specific-statewide-group-region",
props: {
...DefaultFieldGroupProps,
appendText: "Add region",
removeText:
"Remove region",
Expand Down Expand Up @@ -799,9 +800,10 @@ export const v202402: FormSchema = {
{
slots: [
{
rhf: "FieldGroup",
rhf: "FieldArray",
name: "liv-arrange",
props: {
...DefaultFieldGroupProps,
appendText:
"Add living arrangement",
removeText:
Expand Down Expand Up @@ -971,9 +973,10 @@ export const v202402: FormSchema = {
{
slots: [
{
rhf: "FieldGroup",
rhf: "FieldArray",
name: "add-other-way",
props: {
...DefaultFieldGroupProps,
appendText:
"Add other way",
removeText:
Expand Down
13 changes: 9 additions & 4 deletions lib/libs/webforms/ABP5/v202401.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
FormSchema,
RHFSlotProps,
Section,
DefaultFieldGroupProps,
} from "shared-types";

const formName = "abp5";
Expand Down Expand Up @@ -339,9 +340,10 @@ function subsection({
slots: [
...headerSlots,
{
rhf: "FieldGroup",
rhf: "FieldArray",
name: "benefit",
props: {
...DefaultFieldGroupProps,
appendText: "Add benefit",
removeText: "Remove benefit",
},
Expand Down Expand Up @@ -814,9 +816,10 @@ export const v202401: FormSchema = {
{
slots: [
{
rhf: "FieldGroup",
rhf: "FieldArray",
name: "other-non-essential",
props: {
...DefaultFieldGroupProps,
appendText: "Add benefit",
removeText: "Remove benefit",
},
Expand All @@ -840,9 +843,10 @@ export const v202401: FormSchema = {
{
slots: [
{
rhf: "FieldGroup",
rhf: "FieldArray",
name: "other-base",
props: {
...DefaultFieldGroupProps,
appendText: "Add item",
removeText: "Remove item",
},
Expand Down Expand Up @@ -894,9 +898,10 @@ export const v202401: FormSchema = {
{
slots: [
{
rhf: "FieldGroup",
rhf: "FieldArray",
name: "add-benefits",
props: {
...DefaultFieldGroupProps,
appendText: "Add benefit",
removeText: "Remove benefit",
},
Expand Down
2 changes: 1 addition & 1 deletion lib/libs/webforms/ABP8/sections/v202401.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ export function deliverySystemCharactaristics({
},
},
{
rhf: "FieldGroup",
rhf: "FieldArray",
name: "benefit-service",
label: `Which benefit or service will be provided by a type of coverage other than the ${programLabel}?`,
labelClassName: "font-bold",
Expand Down
8 changes: 5 additions & 3 deletions lib/libs/webforms/G2A/v202401.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FormSchema } from "shared-types";
import { FormSchema, DefaultFieldGroupProps } from "shared-types";

export const v202401: FormSchema = {
header:
Expand Down Expand Up @@ -46,9 +46,10 @@ export const v202401: FormSchema = {
{
slots: [
{
rhf: "FieldGroup",
rhf: "FieldArray",
name: "service-item",
props: {
...DefaultFieldGroupProps,
appendText: "Add service or item",
removeText: "Remove",
},
Expand Down Expand Up @@ -152,8 +153,9 @@ export const v202401: FormSchema = {
slots: [
{
name: "service-item",
rhf: "FieldGroup",
rhf: "FieldArray",
props: {
...DefaultFieldGroupProps,
appendText: "Add service or item",
removeText: "Remove",
},
Expand Down
8 changes: 5 additions & 3 deletions lib/libs/webforms/G2B/v202401.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FormSchema } from "shared-types";
import { FormSchema, DefaultFieldGroupProps } from "shared-types";

export const v202401: FormSchema = {
header:
Expand Down Expand Up @@ -68,9 +68,10 @@ export const v202401: FormSchema = {
{
slots: [
{
rhf: "FieldGroup",
rhf: "FieldArray",
name: "service-item",
props: {
...DefaultFieldGroupProps,
appendText: "Add service or item",
removeText: "Remove",
},
Expand Down Expand Up @@ -175,8 +176,9 @@ export const v202401: FormSchema = {
slots: [
{
name: "service-item",
rhf: "FieldGroup",
rhf: "FieldArray",
props: {
...DefaultFieldGroupProps,
appendText: "Add service or item",
removeText: "Remove",
},
Expand Down
1 change: 1 addition & 0 deletions lib/libs/webforms/G2C/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./v202401";
Loading

0 comments on commit 1cc9cdc

Please sign in to comment.