Skip to content

Commit b8b370f

Browse files
committed
feat: Add registration number field to advanced search configuration
#10760
1 parent ed7faab commit b8b370f

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
@@ -11,6 +11,7 @@
1111
- Add Import/Export system client and `record.export` scope to enable data migrations [#10415](https://github.com/opencrvs/opencrvs-core/issues/10415)
1212
- 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)
1313
- Add bulk import endpoint [#10590](https://github.com/opencrvs/opencrvs-core/pull/10590)
14+
- 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)
1415

1516
### Improvements
1617

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: SearchField) => FieldConfig>
143152

packages/commons/src/events/AdvancedSearchConfig.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ export const EventFieldIdInput = z.enum([
9494
'status',
9595
'legalStatuses.REGISTERED.acceptedAt',
9696
'legalStatuses.REGISTERED.createdAtLocation',
97+
'legalStatuses.REGISTERED.registrationNumber',
9798
'updatedAt'
9899
])
99100

@@ -112,6 +113,7 @@ export const EventFieldId = z.enum([
112113
`${METADATA_FIELD_PREFIX}status`,
113114
`${METADATA_FIELD_PREFIX}legalStatuses.REGISTERED.acceptedAt`,
114115
`${METADATA_FIELD_PREFIX}legalStatuses.REGISTERED.createdAtLocation`,
116+
`${METADATA_FIELD_PREFIX}legalStatuses.REGISTERED.registrationNumber`,
115117
`${METADATA_FIELD_PREFIX}updatedAt`
116118
])
117119

0 commit comments

Comments
 (0)