Skip to content

Commit

Permalink
feat: show dob or age based on dobUnknown checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
jamil314 committed Jan 6, 2025
1 parent 78ba94b commit 6015741
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/form/Legecy/birth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,12 @@ const getPersonInputFields = (person: string): FieldConfig[] => [
description: 'This is the label for the field',
id: `event.birth.action.declare.form.section.${person}.field.dob.label`
},
conditionals: []
conditionals: [
{
type: 'HIDE',

Check failure on line 962 in src/form/Legecy/birth.ts

View workflow job for this annotation

GitHub Actions / test

Type '"HIDE"' is not assignable to type '"SHOW" | "ENABLE"'.
conditional: field(`${person}____dobUnknown`).isEqualTo('true')

Check failure on line 963 in src/form/Legecy/birth.ts

View workflow job for this annotation

GitHub Actions / test

Property 'isEqualTo' does not exist on type '{ isBeforeNow: () => { type: string; properties: { $form: { type: string; properties: { [x: string]: { type: string; format: string; formatMaximum: { $data: string; }; }; }; required: string[]; }; $now: { type: string; format: string; }; }; required: string[]; }; }'.
}
]
},
{
id: `${person}.dobUnknown`,
Expand All @@ -981,8 +986,8 @@ const getPersonInputFields = (person: string): FieldConfig[] => [
},
conditionals: [
{
type: 'SHOW',
conditional: field(`${person}.dobUnknown`).isEqualTo('true')
type: 'HIDE',

Check failure on line 989 in src/form/Legecy/birth.ts

View workflow job for this annotation

GitHub Actions / test

Type '"HIDE"' is not assignable to type '"SHOW" | "ENABLE"'.
conditional: field(`${person}____dobUnknown`).isEqualTo('false')

Check failure on line 990 in src/form/Legecy/birth.ts

View workflow job for this annotation

GitHub Actions / test

Property 'isEqualTo' does not exist on type '{ isBeforeNow: () => { type: string; properties: { $form: { type: string; properties: { [x: string]: { type: string; format: string; formatMaximum: { $data: string; }; }; }; required: string[]; }; $now: { type: string; format: string; }; }; required: string[]; }; }'.
}
]
},
Expand Down

0 comments on commit 6015741

Please sign in to comment.