Skip to content

Commit 77de09e

Browse files
committed
hidden field required config by default must be false
1 parent f08389c commit 77de09e

File tree

5 files changed

+45
-1
lines changed

5 files changed

+45
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"@hapi/boom": "^9.1.1",
6565
"@hapi/hapi": "^20.0.1",
6666
"@hapi/inert": "^6.0.3",
67-
"@opencrvs/toolkit": "1.9.2-rc.5ad83cd",
67+
"@opencrvs/toolkit": "1.9.2-rc.f1d7235",
6868
"@types/chalk": "^2.2.0",
6969
"@types/csv2json": "^1.4.0",
7070
"@types/fhir": "^0.0.30",

src/form/v2/birth/forms/pages/child.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,27 @@ export const child = defineFormPage({
391391
streetAddressForm: defaultStreetAddressConfiguration
392392
}
393393
},
394+
{
395+
id: 'child.birthLocationId',
396+
type: FieldType.HIDDEN,
397+
required: false,
398+
label: {
399+
defaultMessage: 'Health Institution',
400+
description: 'This is the label for the field',
401+
id: 'event.birth.action.declare.form.section.child.field.birthLocation.label'
402+
},
403+
parent: [
404+
field('child.placeOfBirth'),
405+
field('child.birthLocation'),
406+
field('child.birthLocation.privateHome'),
407+
field('child.birthLocation.other')
408+
],
409+
value: [
410+
field('child.birthLocation'),
411+
field('child.birthLocation.privateHome').get('administrativeArea'),
412+
field('child.birthLocation.other').get('administrativeArea')
413+
]
414+
},
394415
{
395416
id: 'child.divider2',
396417
type: FieldType.DIVIDER,

src/form/v2/birth/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export const birthEvent = defineConfig({
4141
id: 'event.birth.label'
4242
},
4343
dateOfEvent: field('child.dob'),
44+
placeOfEvent: field('child.birthLocationId'),
4445
title: {
4546
defaultMessage: '{child.name.firstname} {child.name.surname}',
4647
description: 'This is the title of the summary',

src/form/v2/death/forms/pages/eventDetails.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,27 @@ export const eventDetails = defineFormPage({
364364
configuration: {
365365
streetAddressForm: defaultStreetAddressConfiguration
366366
}
367+
},
368+
{
369+
id: 'eventDetails.deathLocationId',
370+
type: FieldType.HIDDEN,
371+
required: false,
372+
label: {
373+
defaultMessage: 'Health Institution',
374+
description: 'This is the label for the field',
375+
id: 'event.birth.action.declare.form.section.child.field.birthLocation.label'
376+
},
377+
parent: [
378+
field('eventDetails.placeOfDeath'),
379+
field('eventDetails.deathLocation'),
380+
field('eventDetails.deathLocationOther'),
381+
field('deceased.address')
382+
],
383+
value: [
384+
field('eventDetails.deathLocation'),
385+
field('eventDetails.deathLocationOther').get('administrativeArea'),
386+
field('deceased.address').get('administrativeArea')
387+
]
367388
}
368389
]
369390
})

src/form/v2/death/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export const deathEvent = defineConfig({
3636
id: 'event.death.label'
3737
},
3838
dateOfEvent: field('eventDetails.date'),
39+
placeOfEvent: field('eventDetails.deathLocationId'),
3940
title: {
4041
defaultMessage: '{deceased.name.firstname} {deceased.name.surname}',
4142
description: 'This is the title of the summary',

0 commit comments

Comments
 (0)