Skip to content

Commit d8ec077

Browse files
authored
Merge pull request #1065 from opencrvs/ocrvs-10574
fix: death advanced search config
2 parents ba6ba9c + 18e2008 commit d8ec077

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/form/v2/death/advancedSearch.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
*/
1111

1212
import { AdvancedSearchConfig, event, field } from '@opencrvs/toolkit/events'
13+
import { placeOfDeathOptions } from './forms/pages/eventDetails'
1314
const deceasedPrefix = {
1415
id: 'death.search.criteria.label.prefix.deceased',
1516
defaultMessage: "Deceased's",
@@ -60,10 +61,13 @@ export const advancedSearchDeath = [
6061
id: 'advancedSearch.form.eventDetails'
6162
},
6263
fields: [
64+
field('eventDetails.placeOfDeath', {
65+
options: placeOfDeathOptions
66+
}).exact(),
6367
field('eventDetails.deathLocation', {
64-
conditionals: [],
6568
searchCriteriaLabelPrefix: deceasedPrefix
66-
}).exact()
69+
}).exact(),
70+
field('eventDetails.deathLocationOther', {}).exact()
6771
]
6872
},
6973
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ const placeOfDeathMessageDescriptors = {
132132
}
133133
} satisfies Record<keyof typeof PlaceOfDeath, TranslationConfig>
134134

135-
const placeOfDeathOptions = createSelectOptions(
135+
export const placeOfDeathOptions = createSelectOptions(
136136
PlaceOfDeath,
137137
placeOfDeathMessageDescriptors
138138
)

0 commit comments

Comments
 (0)