diff --git a/packages/client/src/search/advancedSearch/utils.ts b/packages/client/src/search/advancedSearch/utils.ts index 41cd71d3f64..bdf1535fda6 100644 --- a/packages/client/src/search/advancedSearch/utils.ts +++ b/packages/client/src/search/advancedSearch/utils.ts @@ -609,10 +609,11 @@ const getLabelForRegistrationStatus = ( DECLARATION_UPDATED: [RegStatus.DeclarationUpdated], DECLARED: [RegStatus.Declared], IN_PROGRESS: [RegStatus.InProgress], - REGISTERED: [RegStatus.Registered], + REGISTERED: [RegStatus.Registered, RegStatus.Issued, RegStatus.Certified], REJECTED: [RegStatus.Rejected], VALIDATED: [RegStatus.Validated], - WAITING_VALIDATION: [RegStatus.WaitingValidation] + WAITING_VALIDATION: [RegStatus.WaitingValidation], + CORRECTION_REQUESTED: [RegStatus.CorrectionRequested] } const statusType = Object.keys(statusLabelMapping).find((key) => { if (isEqual([...statusList].sort(), [...statusLabelMapping[key]].sort())) { @@ -648,6 +649,16 @@ const getLabelForRegistrationStatus = ( { value: RegStatus.Archived, label: intl.formatMessage(advancedSearchForm.recordStatusAchived) + }, + { + value: RegStatus.CorrectionRequested, + label: intl.formatMessage( + advancedSearchForm.recordStatusCorrectionRequested + ) + }, + { + value: RegStatus.Validated, + label: intl.formatMessage(advancedSearchForm.recordStatusValidated) } ] @@ -710,6 +721,12 @@ export const getFormattedAdvanceSearchParamPills = ( intl: IntlShape, offlineData: IOfflineData ): pillKeyValueMap => { + const pillLabelFromTimePeriod = { + [TIME_PERIOD.LAST_90_DAYS]: advancedSearchForm.timePeriodLast90Days, + [TIME_PERIOD.LAST_30_DAYS]: advancedSearchForm.timePeriodLast30Days, + [TIME_PERIOD.LAST_7_DAYS]: advancedSearchForm.timePeriodLast7Days, + [TIME_PERIOD.LAST_YEAR]: advancedSearchForm.timePeriodLastYear + } const intlFormattedMapOfParams: pillKeyValueMap = { event: advancedSearchParamsState.event === 'birth' @@ -725,7 +742,13 @@ export const getFormattedAdvanceSearchParamPills = ( ) : '', - timePeriodFrom: advancedSearchParamsState.timePeriodFrom, + timePeriodFrom: + advancedSearchParamsState.timePeriodFrom && + intl.formatMessage( + pillLabelFromTimePeriod[ + advancedSearchParamsState.timePeriodFrom as TIME_PERIOD + ] + ), trackingId: advancedSearchParamsState.trackingId, regNumber: advancedSearchParamsState.registrationNumber, childFirstName: advancedSearchParamsState.childFirstNames,