Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jdinh8124 committed Aug 8, 2024
1 parent 75de75d commit 618beec
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 109 deletions.
206 changes: 98 additions & 108 deletions lib/libs/webforms/CS3/v202401.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,118 +32,108 @@ export const v202401: FormSchema = {
},
fields: [
{
rhf: "WrappedGroup",
name: "wrapped",
rhf: "Select",
name: "from-age",
labelClassName: "text-black font-bold",
label: "From age",
formItemClassName: "w-[125px]",
rules: {
required: "* Required",
},
props: {
wrapperClassName:
"space-between flex-row flex w-full gap-5",
options: [
{ value: "0", label: "0" },
{ value: "1", label: "1" },
{ value: "2", label: "2" },
{ value: "3", label: "3" },
{ value: "4", label: "4" },
{ value: "5", label: "5" },
{ value: "6", label: "6" },
{ value: "7", label: "7" },
{ value: "8", label: "8" },
{ value: "9", label: "9" },
{ value: "10", label: "10" },
{ value: "11", label: "11" },
{ value: "12", label: "12" },
{ value: "13", label: "13" },
{ value: "14", label: "14" },
{ value: "15", label: "15" },
{ value: "16", label: "16" },
{ value: "17", label: "17" },
{ value: "18", label: "18" },
{ value: "19", label: "19" },
],
},
fields: [
{
rhf: "Select",
name: "from-age",
labelClassName: "text-black font-bold",
label: "From age",
formItemClassName: "w-[125px]",
rules: {
required: "* Required",
},
props: {
options: [
{ value: "0", label: "0" },
{ value: "1", label: "1" },
{ value: "2", label: "2" },
{ value: "3", label: "3" },
{ value: "4", label: "4" },
{ value: "5", label: "5" },
{ value: "6", label: "6" },
{ value: "7", label: "7" },
{ value: "8", label: "8" },
{ value: "9", label: "9" },
{ value: "10", label: "10" },
{ value: "11", label: "11" },
{ value: "12", label: "12" },
{ value: "13", label: "13" },
{ value: "14", label: "14" },
{ value: "15", label: "15" },
{ value: "16", label: "16" },
{ value: "17", label: "17" },
{ value: "18", label: "18" },
{ value: "19", label: "19" },
],
},
},
{
rhf: "Select",
name: "to-age",
labelClassName: "text-black font-bold",
label: "To age",
formItemClassName: "w-[125px]",
rules: {
required: "* Required",
},
props: {
options: [
{ value: "0", label: "0" },
{ value: "1", label: "1" },
{ value: "2", label: "2" },
{ value: "3", label: "3" },
{ value: "4", label: "4" },
{ value: "5", label: "5" },
{ value: "6", label: "6" },
{ value: "7", label: "7" },
{ value: "8", label: "8" },
{ value: "9", label: "9" },
{ value: "10", label: "10" },
{ value: "11", label: "11" },
{ value: "12", label: "12" },
{ value: "13", label: "13" },
{ value: "14", label: "14" },
{ value: "15", label: "15" },
{ value: "16", label: "16" },
{ value: "17", label: "17" },
{ value: "18", label: "18" },
{ value: "19", label: "19" },
],
},
},
{
rhf: "Input",
name: "above",
labelClassName: "text-black font-bold",
label: "Above",
formItemClassName: "w-[159px]",
props: {
icon: "% FPL",
iconRight: true,
},
rules: {
pattern: {
value: /^[0-9]\d*$/,
message: "Must be a positive integer value",
},
required: "* Required",
},
},
{
rhf: "Select",
name: "to-age",
labelClassName: "text-black font-bold",
label: "To age",
formItemClassName: "w-[125px]",
rules: {
required: "* Required",
},
props: {
options: [
{ value: "0", label: "0" },
{ value: "1", label: "1" },
{ value: "2", label: "2" },
{ value: "3", label: "3" },
{ value: "4", label: "4" },
{ value: "5", label: "5" },
{ value: "6", label: "6" },
{ value: "7", label: "7" },
{ value: "8", label: "8" },
{ value: "9", label: "9" },
{ value: "10", label: "10" },
{ value: "11", label: "11" },
{ value: "12", label: "12" },
{ value: "13", label: "13" },
{ value: "14", label: "14" },
{ value: "15", label: "15" },
{ value: "16", label: "16" },
{ value: "17", label: "17" },
{ value: "18", label: "18" },
{ value: "19", label: "19" },
],
},
},
{
rhf: "Input",
name: "above",
labelClassName: "text-black font-bold",
label: "Above",
formItemClassName: "w-[159px]",
props: {
icon: "% FPL",
iconRight: true,
},
rules: {
pattern: {
value: /^[0-9]\d*$/,
message: "Must be a positive integer value",
},
{
rhf: "Input",
name: "up-to-and-including",
labelClassName: "text-black font-bold",
label: "Up to and including",
formItemClassName: "w-[159px]",
rules: {
pattern: {
value: /^[0-9]\d*$/,
message: "Must be a positive integer value",
},
required: "* Required",
},
props: {
icon: "% FPL",
iconRight: true,
},
required: "* Required",
},
},
{
rhf: "Input",
name: "up-to-and-including",
labelClassName: "text-black font-bold",
label: "Up to and including",
formItemClassName: "w-[159px]",
rules: {
pattern: {
value: /^[0-9]\d*$/,
message: "Must be a positive integer value",
},
],
required: "* Required",
},
props: {
icon: "% FPL",
iconRight: true,
},
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion react-app/src/components/RHF/FieldArray.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const RHFFieldArray = <TFields extends FieldValues>(
{/* FieldArray Removal */}
{index >= 1 && isFieldArray && (
<Trash2
className="self-end mb-4 cursor-pointer stroke-primary"
className="self-end mb-2 cursor-pointer stroke-primary"
data-testid={`removeRowButton-${index}`}
onClick={() => fieldArr.remove(index)}
/>
Expand Down

0 comments on commit 618beec

Please sign in to comment.