Skip to content

Commit 223f1cf

Browse files
committed
feat: Add registration number field to advanced search configuration
#10760
1 parent d580146 commit 223f1cf

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
@@ -12,6 +12,7 @@
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)
1414
- Add multi-field search with a single component [#10617](https://github.com/opencrvs/opencrvs-core/issues/10617)
15+
- 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)
1516

1617
### Improvements
1718

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
@@ -126,6 +126,7 @@ export const EventFieldIdInput = z.enum([
126126
'status',
127127
'legalStatuses.REGISTERED.acceptedAt',
128128
'legalStatuses.REGISTERED.createdAtLocation',
129+
'legalStatuses.REGISTERED.registrationNumber',
129130
'updatedAt'
130131
])
131132

@@ -144,6 +145,7 @@ export const EventFieldId = z.enum([
144145
`${METADATA_FIELD_PREFIX}status`,
145146
`${METADATA_FIELD_PREFIX}legalStatuses.REGISTERED.acceptedAt`,
146147
`${METADATA_FIELD_PREFIX}legalStatuses.REGISTERED.createdAtLocation`,
148+
`${METADATA_FIELD_PREFIX}legalStatuses.REGISTERED.registrationNumber`,
147149
`${METADATA_FIELD_PREFIX}updatedAt`
148150
])
149151

0 commit comments

Comments
 (0)