Skip to content

Commit 5468a79

Browse files
committed
placeOfEvent configuration added
1 parent 27c4f75 commit 5468a79

File tree

4 files changed

+44
-0
lines changed

4 files changed

+44
-0
lines changed

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,27 @@ export const child = defineFormPage({
389389
streetAddressForm: defaultStreetAddressConfiguration
390390
}
391391
},
392+
{
393+
id: 'child.birthLocationId',
394+
type: FieldType.HIDDEN,
395+
required: false,
396+
label: {
397+
defaultMessage: 'Health Institution',
398+
description: 'This is the label for the field',
399+
id: 'event.birth.action.declare.form.section.child.field.birthLocation.label'
400+
},
401+
parent: [
402+
field('child.placeOfBirth'),
403+
field('child.birthLocation'),
404+
field('child.birthLocation.privateHome'),
405+
field('child.birthLocation.other')
406+
],
407+
value: [
408+
field('child.birthLocation'),
409+
field('child.birthLocation.privateHome').get('administrativeArea'),
410+
field('child.birthLocation.other').get('administrativeArea')
411+
]
412+
},
392413
{
393414
id: 'child.divider2',
394415
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
@@ -363,6 +363,27 @@ export const eventDetails = defineFormPage({
363363
configuration: {
364364
streetAddressForm: defaultStreetAddressConfiguration
365365
}
366+
},
367+
{
368+
id: 'eventDetails.deathLocationId',
369+
type: FieldType.HIDDEN,
370+
required: false,
371+
label: {
372+
defaultMessage: 'Health Institution',
373+
description: 'This is the label for the field',
374+
id: 'event.birth.action.declare.form.section.child.field.birthLocation.label'
375+
},
376+
parent: [
377+
field('eventDetails.placeOfDeath'),
378+
field('eventDetails.deathLocation'),
379+
field('eventDetails.deathLocationOther'),
380+
field('deceased.address')
381+
],
382+
value: [
383+
field('eventDetails.deathLocation'),
384+
field('eventDetails.deathLocationOther').get('administrativeArea'),
385+
field('deceased.address').get('administrativeArea')
386+
]
366387
}
367388
]
368389
})

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)