From de8a0c1507aaf442a5020cd8d161eb1077e79a68 Mon Sep 17 00:00:00 2001 From: Jan Date: Thu, 8 Feb 2024 09:58:19 +0100 Subject: [PATCH] CM-501: adjust frontend to individual custom filters --- src/components/GroupSearcher.js | 6 +++--- src/components/IndividualSearcher.js | 8 ++++---- src/constants.js | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/GroupSearcher.js b/src/components/GroupSearcher.js index 8dfc805..d557ee0 100644 --- a/src/components/GroupSearcher.js +++ b/src/components/GroupSearcher.js @@ -28,7 +28,7 @@ import { import { DEFAULT_PAGE_SIZE, ROWS_PER_PAGE_OPTIONS, - RIGHT_GROUP_UPDATE, RIGHT_GROUP_DELETE, SOCIAL_PROTECTION_MODULE_NAME, BENEFIT_PLAN_LABEL, + RIGHT_GROUP_UPDATE, RIGHT_GROUP_DELETE, INDIVIDUAL_MODULE_NAME, INDIVIDUAL_LABEL, } from '../constants'; import GroupFilter from './GroupFilter'; import { applyNumberCircle } from '../util/searcher-utils'; @@ -229,8 +229,8 @@ function GroupSearcher({ cacheFiltersKey="groupsFilterCache" resetFiltersOnUnmount isCustomFiltering - moduleName={SOCIAL_PROTECTION_MODULE_NAME} - objectType={BENEFIT_PLAN_LABEL} + moduleName={INDIVIDUAL_MODULE_NAME} + objectType={INDIVIDUAL_LABEL} additionalCustomFilterParams={{ type: 'GROUP' }} appliedCustomFilters={appliedCustomFilters} setAppliedCustomFilters={setAppliedCustomFilters} diff --git a/src/components/IndividualSearcher.js b/src/components/IndividualSearcher.js index fb35e86..1f52b03 100644 --- a/src/components/IndividualSearcher.js +++ b/src/components/IndividualSearcher.js @@ -33,10 +33,10 @@ import { EMPTY_STRING, RIGHT_INDIVIDUAL_UPDATE, RIGHT_INDIVIDUAL_DELETE, - BENEFIT_PLAN_LABEL, - SOCIAL_PROTECTION_MODULE_NAME, RIGHT_SCHEMA_SEARCH, FETCH_BENEFIT_PLAN_SCHEMA_FIELDS_REF, + INDIVIDUAL_MODULE_NAME, + INDIVIDUAL_LABEL, } from '../constants'; import { applyNumberCircle } from '../util/searcher-utils'; import IndividualFilter from './IndividualFilter'; @@ -270,8 +270,8 @@ function IndividualSearcher({ exportable exportFetch={downloadIndividuals} isCustomFiltering - moduleName={SOCIAL_PROTECTION_MODULE_NAME} - objectType={BENEFIT_PLAN_LABEL} + moduleName={INDIVIDUAL_MODULE_NAME} + objectType={INDIVIDUAL_LABEL} additionalCustomFilterParams={{ type: 'INDIVIDUAL' }} appliedCustomFilters={appliedCustomFilters} setAppliedCustomFilters={setAppliedCustomFilters} diff --git a/src/constants.js b/src/constants.js index 910b4c4..233a0fd 100644 --- a/src/constants.js +++ b/src/constants.js @@ -55,6 +55,6 @@ export const BENEFIT_PLAN_LABEL = 'BenefitPlan'; export const INDIVIDUAL_LABEL = 'Individual'; export const GROUP_LABEL = 'Group'; -export const SOCIAL_PROTECTION_MODULE_NAME = 'social_protection'; +export const INDIVIDUAL_MODULE_NAME = 'individual'; export const FETCH_BENEFIT_PLAN_SCHEMA_FIELDS_REF = 'socialProtection.fetchBenefitPlanSchemaFields';