Skip to content

Commit bed09af

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

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ HTTP input now accepts `field('..')` references in the HTTP body definition.
4949
- **Searchable Select**: A new select component that allows searching through options. Useful for selects with a large number of options. Currently being used in address fields. [#10749](https://github.com/opencrvs/opencrvs-core/issues/10749)
5050

5151
### Bug fixes
52+
5253
- During user password reset, email address lookup is now case insensitive [#9869](https://github.com/opencrvs/opencrvs-core/issues/9869)
5354
- Users cannot activate or reactivate users with roles not specified in the `user.edit` scope [#9933](https://github.com/opencrvs/opencrvs-core/issues/9933)
5455
- Login page no longer show "Farajaland CRVS" before showing the correct title [#10958](https://github.com/opencrvs/opencrvs-core/issues/10958)
@@ -332,6 +333,8 @@ To see Events V2 in action, check out the example configurations in the **countr
332333
- Add Import/Export system client and `record.export` scope to enable data migrations [#10415](https://github.com/opencrvs/opencrvs-core/issues/10415)
333334
- 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)
334335
- Add bulk import endpoint [#10590](https://github.com/opencrvs/opencrvs-core/pull/10590)
336+
- Add multi-field search with a single component [#10617](https://github.com/opencrvs/opencrvs-core/issues/10617)
337+
- 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)
335338

336339
### Improvements
337340

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)