Skip to content

Commit f2f38f1

Browse files
Siyasangatumbledwyer
authored andcommitted
feat: Add registration number field to advanced search configuration
#10760
1 parent de66fdb commit f2f38f1

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ To see Events V2 in action, check out the example configurations in the **countr
316316
- Add an Alpha version of configurable "Print" button that will be refactored in a later release - this button can be used to print certificates during declaration/correction flow. [#10039](https://github.com/opencrvs/opencrvs-core/issues/10039)
317317
- Add bulk import endpoint [#10590](https://github.com/opencrvs/opencrvs-core/pull/10590)
318318
- Add multi-field search with a single component [#10617](https://github.com/opencrvs/opencrvs-core/issues/10617)
319+
- Add registration number field to advanced search configuration so that documents can be searched by their `Registration Number`. [#10760](https://github.com/opencrvs/opencrvs-core/issues/10760)
319320

320321
### Improvements
321322

packages/client/src/v2-events/features/events/Search/utils.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,15 @@ const defaultSearchFieldGenerator: Record<
138138
id: 'advancedSearch.status'
139139
},
140140
options: statusOptions
141+
}),
142+
'event.legalStatuses.REGISTERED.registrationNumber': (_) => ({
143+
id: 'event.legalStatuses.REGISTERED.registrationNumber',
144+
type: FieldType.TEXT,
145+
label: {
146+
defaultMessage: 'Registration number',
147+
description: 'Label for registration number field',
148+
id: 'advancedSearch.registrationNumber'
149+
}
141150
})
142151
} satisfies Record<EventFieldId, (config: AdvancedSearchField) => FieldConfig>
143152

packages/commons/src/events/AdvancedSearchConfig.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ export const EventFieldIdInput = z.enum([
124124
'status',
125125
'legalStatuses.REGISTERED.acceptedAt',
126126
'legalStatuses.REGISTERED.createdAtLocation',
127+
'legalStatuses.REGISTERED.registrationNumber',
127128
'updatedAt'
128129
])
129130

@@ -142,6 +143,7 @@ export const EventFieldId = z.enum([
142143
`${METADATA_FIELD_PREFIX}status`,
143144
`${METADATA_FIELD_PREFIX}legalStatuses.REGISTERED.acceptedAt`,
144145
`${METADATA_FIELD_PREFIX}legalStatuses.REGISTERED.createdAtLocation`,
146+
`${METADATA_FIELD_PREFIX}legalStatuses.REGISTERED.registrationNumber`,
145147
`${METADATA_FIELD_PREFIX}updatedAt`
146148
])
147149

0 commit comments

Comments
 (0)