From 8354ed2e40a4f063f0287f68ab4dd18cd6e957cd Mon Sep 17 00:00:00 2001 From: sniedzielski Date: Tue, 5 Mar 2024 16:14:31 +0100 Subject: [PATCH 1/3] CM-717: added group history tab --- src/actions.js | 16 +++ .../GroupIndividualHistoryFilter.js | 98 +++++++++++++++ .../GroupIndividualHistorySearcher.js | 115 ++++++++++++++++++ src/components/GroupIndividualHistoryTab.js | 39 ++++++ src/components/GroupTabPanel.js | 83 +++++++++++++ src/constants.js | 4 + src/index.js | 26 +++- src/pages/GroupPage.js | 4 +- src/reducer.js | 39 ++++++ src/translations/en.json | 14 +++ 10 files changed, 430 insertions(+), 8 deletions(-) create mode 100644 src/components/GroupIndividualHistoryFilter.js create mode 100644 src/components/GroupIndividualHistorySearcher.js create mode 100644 src/components/GroupIndividualHistoryTab.js create mode 100644 src/components/GroupTabPanel.js diff --git a/src/actions.js b/src/actions.js index 1410119..f2bc1ff 100644 --- a/src/actions.js +++ b/src/actions.js @@ -69,6 +69,17 @@ const GROUP_FULL_PROJECTION = [ 'userUpdated {username}', ]; +const GROUP_INDIVIDUAL_HISTORY_FULL_PROJECTION = [ + 'id', + 'individual {id, firstName, lastName, dob}', + 'group {id}', + 'role', + 'isDeleted', + 'dateCreated', + 'dateUpdated', + 'jsonExt', +]; + const GROUP_HISTORY_FULL_PROJECTION = GROUP_FULL_PROJECTION.filter( (item) => item !== 'head {firstName, lastName}', ); @@ -125,6 +136,11 @@ export function fetchGroupHistory(params) { return graphql(payload, ACTION_TYPE.SEARCH_GROUP_HISTORY); } +export function fetchGroupIndividualHistory(params) { + const payload = formatPageQueryWithCount('groupIndividualHistory', params, GROUP_INDIVIDUAL_HISTORY_FULL_PROJECTION); + return graphql(payload, ACTION_TYPE.SEARCH_GROUP_INDIVIDUAL_HISTORY); +} + export function fetchUploadHistory(params) { const payload = formatPageQueryWithCount('individualDataUploadHistory', params, UPLOAD_HISTORY_FULL_PROJECTION()); return graphql(payload, ACTION_TYPE.GET_INDIVIDUAL_UPLOAD_HISTORY); diff --git a/src/components/GroupIndividualHistoryFilter.js b/src/components/GroupIndividualHistoryFilter.js new file mode 100644 index 0000000..a16e5ba --- /dev/null +++ b/src/components/GroupIndividualHistoryFilter.js @@ -0,0 +1,98 @@ +import React, { useEffect } from 'react'; +import { injectIntl } from 'react-intl'; +import { TextInput, PublishedComponent, formatMessage } from '@openimis/fe-core'; +import { Grid } from '@material-ui/core'; +import { withTheme, withStyles } from '@material-ui/core/styles'; +import _debounce from 'lodash/debounce'; +import { CONTAINS_LOOKUP, DEFAULT_DEBOUNCE_TIME, EMPTY_STRING } from '../constants'; +import { defaultFilterStyles } from '../util/styles'; +import GroupIndividualRolePicker from '../pickers/GroupIndividualRolePicker'; + +function GroupIndividualHistoryFilter({ + intl, classes, filters, onChangeFilters, groupId, +}) { + const debouncedOnChangeFilters = _debounce(onChangeFilters, DEFAULT_DEBOUNCE_TIME); + + const filterValue = (filterName) => filters?.[filterName]?.value; + + const filterTextFieldValue = (filterName) => filters?.[filterName]?.value ?? EMPTY_STRING; + + const onChangeStringFilter = (filterName, lookup = null) => (value) => { + if (lookup) { + debouncedOnChangeFilters([ + { + id: filterName, + value, + filter: `${filterName}_${lookup}: "${value}"`, + }, + ]); + } else { + onChangeFilters([ + { + id: filterName, + value, + filter: `${filterName}: "${value}"`, + }, + ]); + } + }; + + const handleGroupId = onChangeStringFilter('group_Id'); + useEffect(() => { + if (filters?.group_Id?.value !== groupId) { + handleGroupId(groupId); + } + }, [groupId]); + + return ( + + + + + + + + + onChangeFilters([ + { + id: 'individual_Dob', + value: v, + filter: `individual_Dob: "${v}"`, + }, + ])} + /> + + + onChangeFilters([ + { + id: 'role', + value, + filter: `role: ${value}`, + }, + ])} + /> + + + ); +} + +export default injectIntl(withTheme(withStyles(defaultFilterStyles)(GroupIndividualHistoryFilter))); diff --git a/src/components/GroupIndividualHistorySearcher.js b/src/components/GroupIndividualHistorySearcher.js new file mode 100644 index 0000000..e667a74 --- /dev/null +++ b/src/components/GroupIndividualHistorySearcher.js @@ -0,0 +1,115 @@ +import React from 'react'; +import { useDispatch, useSelector } from 'react-redux'; +import { injectIntl } from 'react-intl'; +import { + useModulesManager, + useTranslations, + Searcher, + withHistory, + withModulesManager, +} from '@openimis/fe-core'; +import { DEFAULT_PAGE_SIZE, EMPTY_STRING, ROWS_PER_PAGE_OPTIONS } from '../constants'; +import GroupIndividualHistoryFilter from './GroupIndividualHistoryFilter'; +import { fetchGroupIndividualHistory } from '../actions'; + +function GroupIndividualHistorySearcher({ + individualId, +}) { + const modulesManager = useModulesManager(); + const dispatch = useDispatch(); + const { formatDateFromISO, formatMessageWithValues } = useTranslations('individual', modulesManager); + + const fetchingGroupIndividualHistory = useSelector((state) => state.individual.fetchingGroupIndividualHistory); + const fetchedGroupIndividualHistory = useSelector((state) => state.individual.fetchedGroupIndividualHistory); + const errorGroupIndividualHistory = useSelector((state) => state.individual.errorGroupIndividualHistory); + const groupIndividualHistory = useSelector((state) => state.individual.groupIndividualHistory); + const groupIndividualHistoryPageInfo = useSelector((state) => state.individual.groupIndividualHistoryPageInfo); + const groupIndividualHistoryTotalCount = useSelector((state) => state.individual.groupIndividualHistoryTotalCount); + const fetch = (params) => (individualId ? dispatch(fetchGroupIndividualHistory(params)) : null); + + const headers = () => { + const headers = [ + 'individual.firstName', + 'individual.lastName', + 'individual.dob', + 'groupIndividual.individual.role', + 'emptyLabel', + ]; + return headers; + }; + + const itemFormatters = () => { + const formatters = [ + (groupIndividualHistory) => groupIndividualHistory.individual.firstName, + (groupIndividualHistory) => groupIndividualHistory.individual.lastName, + (groupIndividualHistory) => ( + groupIndividualHistory.individual.dob + ? formatDateFromISO(modulesManager, groupIndividualHistory.individual.dob) + : EMPTY_STRING + ), + (groupIndividualHistory) => groupIndividualHistory.role, + ]; + return formatters; + }; + + const rowIdentifier = (groupIndividualHistory) => groupIndividualHistory.id; + + const sorts = () => [ + ['id', true], + ['dateUpdated', true], + ['version', true], + ]; + + const defaultFilters = () => { + const filters = { + }; + if (individualId !== null && individualId !== undefined) { + filters.individual_Id = { + value: individualId, + filter: `individual_Id: "${individualId}"`, + }; + } + return filters; + }; + + const groupIndividualHistoryFilter = (props) => ( + + ); + + return ( +
+ +
+ ); +} + +export default withHistory( + withModulesManager(injectIntl((GroupIndividualHistorySearcher))), +); diff --git a/src/components/GroupIndividualHistoryTab.js b/src/components/GroupIndividualHistoryTab.js new file mode 100644 index 0000000..d1bdaea --- /dev/null +++ b/src/components/GroupIndividualHistoryTab.js @@ -0,0 +1,39 @@ +import React from 'react'; +import { Tab } from '@material-ui/core'; +import { formatMessage, PublishedComponent } from '@openimis/fe-core'; +import { GROUP_INDIVIDUAL_HISTORY_TAB_VALUE } from '../constants'; + +function GroupIndividualHistoryTabLabel({ + intl, onChange, tabStyle, isSelected, +}) { + return ( + + ); +} + +function GroupIndividualHistoryTabPanel({ + value, rights, individual, +}) { + return ( + + + + ); +} + +export { GroupIndividualHistoryTabLabel, GroupIndividualHistoryTabPanel }; diff --git a/src/components/GroupTabPanel.js b/src/components/GroupTabPanel.js new file mode 100644 index 0000000..ec992e9 --- /dev/null +++ b/src/components/GroupTabPanel.js @@ -0,0 +1,83 @@ +import React, { useState } from 'react'; +import { Paper, Grid } from '@material-ui/core'; +import { Contributions } from '@openimis/fe-core'; +import { injectIntl } from 'react-intl'; +import { withTheme, withStyles } from '@material-ui/core/styles'; +import { + BENEFIT_PLANS_LIST_TAB_VALUE, + GROUPS_TABS_LABEL_CONTRIBUTION_KEY, + GROUPS_TABS_PANEL_CONTRIBUTION_KEY, INDIVIDUALS_LIST_TAB_VALUE, +} from '../constants'; + +const styles = (theme) => ({ + paper: theme.paper.paper, + tableTitle: theme.table.title, + tabs: { + display: 'flex', + alignItems: 'center', + }, + selectedTab: { + borderBottom: '4px solid white', + }, + unselectedTab: { + borderBottom: '4px solid transparent', + }, + button: { + marginLeft: 'auto', + padding: theme.spacing(1), + fontSize: '0.875rem', + textTransform: 'none', + }, +}); + +function GroupTabPanel({ + intl, + rights, + classes, + individual, + setConfirmedAction, + group, editedGroupIndividual, + setEditedGroupIndividual, + groupIndividualIds, +}) { + const [activeTab, setActiveTab] = useState(individual ? BENEFIT_PLANS_LIST_TAB_VALUE : INDIVIDUALS_LIST_TAB_VALUE); + + const isSelected = (tab) => tab === activeTab; + + const tabStyle = (tab) => (isSelected(tab) ? classes.selectedTab : classes.unselectedTab); + + const handleChange = (_, tab) => setActiveTab(tab); + + return ( + + + + + + + ); +} + +export default injectIntl(withTheme(withStyles(styles)(GroupTabPanel))); diff --git a/src/constants.js b/src/constants.js index 13ff83b..487d2d2 100644 --- a/src/constants.js +++ b/src/constants.js @@ -27,11 +27,15 @@ export const INDIVIDUALS_LIST_TAB_VALUE = 'IndividualsListTab'; export const INDIVIDUAL_CHANGELOG_TAB_VALUE = 'IndividualChangelogTab'; export const INDIVIDUAL_TASK_TAB_VALUE = 'IndividualTaskTab'; export const GROUP_CHANGELOG_TAB_VALUE = 'GroupChangelogTab'; +export const GROUP_INDIVIDUAL_HISTORY_TAB_VALUE = 'GroupIndividualHistoryTab'; export const GROUP_TASK_TAB_VALUE = 'GroupTaskTab'; export const BENEFITS_TAB_VALUE = 'BenefitTaskTab'; export const INDIVIDUAL_TABS_LABEL_CONTRIBUTION_KEY = 'individual.TabPanel.label'; export const INDIVIDUAL_TABS_PANEL_CONTRIBUTION_KEY = 'individual.TabPanel.panel'; +export const GROUPS_TABS_LABEL_CONTRIBUTION_KEY = 'group.TabPanel.label'; +export const GROUPS_TABS_PANEL_CONTRIBUTION_KEY = 'group.TabPanel.panel'; + export const BENEFIT_PLAN_TABS_LABEL_CONTRIBUTION_KEY = 'individual.BenefitPlansListTabLabel'; export const BENEFIT_PLAN_TABS_PANEL_CONTRIBUTION_KEY = 'individual.BenefitPlansListTabPanel'; export const TASK_CONTRIBUTION_KEY = 'tasksManagement.tasks'; diff --git a/src/index.js b/src/index.js index 9112400..8b63641 100644 --- a/src/index.js +++ b/src/index.js @@ -40,6 +40,11 @@ import { GROUP_LABEL, INDIVIDUAL_LABEL } from './constants'; import { GroupCreateTaskItemFormatters, GroupCreateTaskTableHeaders } from './components/tasks/GroupCreateTasks'; import IndividualsUploadDialog from './components/dialogs/IndividualsUploadDialog'; import { BenefitsTabLabel, BenefitsTabPanel } from './components/BenefitsTab'; +import GroupIndividualHistorySearcher from './components/GroupIndividualHistorySearcher'; +import { + GroupIndividualHistoryTabLabel, + GroupIndividualHistoryTabPanel, +} from './components/GroupIndividualHistoryTab'; const ROUTE_INDIVIDUALS = 'individuals'; const ROUTE_INDIVIDUAL = 'individuals/individual'; @@ -75,25 +80,34 @@ const DEFAULT_CONFIG = { { key: 'individual.IndividualHistorySearcher', ref: IndividualHistorySearcher }, { key: 'individual.GroupHistorySearcher', ref: GroupHistorySearcher }, { key: 'individual.IndividualsUploadDialog', ref: IndividualsUploadDialog }, + { key: 'individual.GroupIndividualHistorySearcher', ref: GroupIndividualHistorySearcher }, ], 'individual.IndividualsUploadDialog': IndividualsUploadDialog, 'individual.TabPanel.label': [ - IndividualsListTabLabel, BenefitPlansListTabLabel, IndividalChangelogTabLabel, - GroupChangelogTabLabel, - GroupTaskTabLabel, IndividalTaskTabLabel, BenefitsTabLabel, + GroupIndividualHistoryTabLabel, ], 'individual.TabPanel.panel': [ - IndividualsListTabPanel, BenefitPlansListTabPanel, - GroupChangelogTabPanel, IndividalChangelogTabPanel, - GroupTaskTabPanel, IndividalTaskTabPanel, BenefitsTabPanel, + GroupIndividualHistoryTabPanel, + ], + 'group.TabPanel.label': [ + IndividualsListTabLabel, + BenefitPlansListTabLabel, + GroupChangelogTabLabel, + GroupTaskTabLabel, + ], + 'group.TabPanel.panel': [ + IndividualsListTabPanel, + BenefitPlansListTabPanel, + GroupChangelogTabPanel, + GroupTaskTabPanel, ], 'individual.BenefitPlansListTabLabel': [BENEFIT_PLAN_TABS_LABEL_REF_KEY], 'individual.BenefitPlansListTabPanel': [BENEFIT_PLAN_TABS_PANEL_REF_KEY], diff --git a/src/pages/GroupPage.js b/src/pages/GroupPage.js index a658be6..c9178b1 100644 --- a/src/pages/GroupPage.js +++ b/src/pages/GroupPage.js @@ -20,8 +20,8 @@ import { fetchGroup, deleteGroup, updateGroup, clearGroup, createGroupAndMoveIndividual, } from '../actions'; import GroupHeadPanel from '../components/GroupHeadPanel'; -import IndividualTabPanel from '../components/IndividualTabPanel'; import { ACTION_TYPE } from '../reducer'; +import GroupTabPanel from '../components/GroupTabPanel'; const styles = (theme) => ({ page: theme.page, @@ -168,7 +168,7 @@ function GroupPage({ canSave={canSave} save={groupUuid ? handleSave : null} HeadPanel={GroupHeadPanel} - Panels={[IndividualTabPanel]} + Panels={[GroupTabPanel]} rights={rights} actions={actions} setConfirmedAction={setConfirmedAction} diff --git a/src/reducer.js b/src/reducer.js index cae1739..304eee6 100644 --- a/src/reducer.js +++ b/src/reducer.js @@ -39,6 +39,7 @@ export const ACTION_TYPE = { ENROLLMENT_SUMMARY: 'ENROLLMENT_SUMMARY', CONFIRM_ENROLLMENT: 'CONFIRM_ENROLLMENT', GET_INDIVIDUAL_UPLOAD_HISTORY: 'GET_INDIVIDUAL_UPLOAD_HISTORY', + SEARCH_GROUP_INDIVIDUAL_HISTORY: 'SEARCH_GROUP_INDIVIDUAL_HISTORY', }; function reducer( @@ -114,6 +115,13 @@ function reducer( individualDataUploadHistory: [], individualDataUploadHistoryPageInfo: {}, errorIndividualDataUploadHistory: null, + + fetchingGroupIndividualHistory: false, + errorGroupIndividualHistory: null, + fetchedGroupIndividualHistory: false, + groupIndividualHistory: [], + groupIndividualHistoryPageInfo: {}, + groupIndividualHistoryTotalCount: 0, }, action, ) { @@ -533,6 +541,37 @@ function reducer( fetchingIndividualDataUploadHistory: false, errorIndividualDataUploadHistory: formatServerError(action.payload), }; + case REQUEST(ACTION_TYPE.SEARCH_GROUP_INDIVIDUAL_HISTORY): + return { + ...state, + fetchingGroupIndividualHistory: true, + fetchedGroupIndividualHistory: false, + groupIndividualHistory: null, + groupIndividualHistoryPageInfo: {}, + groupIndividualHistoryTotalCount: 0, + errorGroupIndividualHistory: null, + }; + case SUCCESS(ACTION_TYPE.SEARCH_GROUP_INDIVIDUAL_HISTORY): + return { + ...state, + fetchingGroupIndividualHistory: false, + fetchedGroupIndividualHistory: true, + // eslint-disable-next-line max-len + groupIndividualHistory: parseData(action.payload.data.groupIndividualHistory)?.map((groupIndividualHistory) => ({ + ...groupIndividualHistory, + id: decodeId(groupIndividualHistory.id), + })), + // eslint-disable-next-line max-len + groupIndividualHistoryTotalCount: action.payload.data.groupIndividualHistoryPageInfo ? action.payload.data.groupIndividualHistoryPageInfo.totalCount : null, + groupIndividualHistoryPageInfo: pageInfo(action.payload.data.groupIndividualHistoryPageInfo), + errorGroupIndividualHistory: formatGraphQLError(action.payload), + }; + case ERROR(ACTION_TYPE.SEARCH_GROUP_INDIVIDUAL_HISTORY): + return { + ...state, + fetchingGroupIndividualHistory: false, + errorGroupIndividualHistory: formatServerError(action.payload), + }; case REQUEST(ACTION_TYPE.MUTATION): return dispatchMutationReq(state, action); case ERROR(ACTION_TYPE.MUTATION): diff --git a/src/translations/en.json b/src/translations/en.json index 96d2106..b923e1d 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -201,6 +201,20 @@ "groupIndividualRolePicker.RECIPIENT": "RECIPIENT", "groupIndividualRolePicker": "Role" }, + "groupIndividualHistoryList": { + "searcherResultsTitle": "{groupIndividualHistoryTotalCount} Historical Records Found" + }, + "groupIndividualHistory": { + "individual": { + "role": "Role", + "groupId": "Group ID", + "individualId": "Individual ID" + }, + "label": "Group History", + "groupIndividualRolePicker.HEAD": "HEAD", + "groupIndividualRolePicker.RECIPIENT": "RECIPIENT", + "groupIndividualRolePicker": "Role" + }, "groupChangelog.label": "Change Log", "groupTasks.label": "Tasks", "groupPicker": { From 045586ef0fbf3eb8f99af50853cb2948b36cf3c7 Mon Sep 17 00:00:00 2001 From: sniedzielski Date: Wed, 6 Mar 2024 12:12:47 +0100 Subject: [PATCH 2/3] CM-717: added adjustments to the searcher of history group, added membership status --- src/actions.js | 1 + .../GroupIndividualHistoryFilter.js | 34 +++++-------------- .../GroupIndividualHistorySearcher.js | 23 +++++++------ src/reducer.js | 2 +- src/translations/en.json | 4 ++- 5 files changed, 26 insertions(+), 38 deletions(-) diff --git a/src/actions.js b/src/actions.js index f2bc1ff..4bad876 100644 --- a/src/actions.js +++ b/src/actions.js @@ -78,6 +78,7 @@ const GROUP_INDIVIDUAL_HISTORY_FULL_PROJECTION = [ 'dateCreated', 'dateUpdated', 'jsonExt', + 'version', ]; const GROUP_HISTORY_FULL_PROJECTION = GROUP_FULL_PROJECTION.filter( diff --git a/src/components/GroupIndividualHistoryFilter.js b/src/components/GroupIndividualHistoryFilter.js index a16e5ba..9b1d46f 100644 --- a/src/components/GroupIndividualHistoryFilter.js +++ b/src/components/GroupIndividualHistoryFilter.js @@ -7,6 +7,7 @@ import _debounce from 'lodash/debounce'; import { CONTAINS_LOOKUP, DEFAULT_DEBOUNCE_TIME, EMPTY_STRING } from '../constants'; import { defaultFilterStyles } from '../util/styles'; import GroupIndividualRolePicker from '../pickers/GroupIndividualRolePicker'; +import GroupPicker from '../pickers/GroupPicker'; function GroupIndividualHistoryFilter({ intl, classes, filters, onChangeFilters, groupId, @@ -47,32 +48,15 @@ function GroupIndividualHistoryFilter({ return ( - - - - - - - onChangeFilters([ + onChangeFilters([ { - id: 'individual_Dob', - value: v, - filter: `individual_Dob: "${v}"`, + id: 'group_Id', + value, + filter: `group_Id: "${value}"`, }, ])} /> diff --git a/src/components/GroupIndividualHistorySearcher.js b/src/components/GroupIndividualHistorySearcher.js index e667a74..c3fd415 100644 --- a/src/components/GroupIndividualHistorySearcher.js +++ b/src/components/GroupIndividualHistorySearcher.js @@ -2,6 +2,7 @@ import React from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { injectIntl } from 'react-intl'; import { + decodeId, useModulesManager, useTranslations, Searcher, @@ -29,25 +30,26 @@ function GroupIndividualHistorySearcher({ const headers = () => { const headers = [ - 'individual.firstName', - 'individual.lastName', - 'individual.dob', + 'group.id', + 'groupIndividual.dateJoined', 'groupIndividual.individual.role', - 'emptyLabel', + 'groupIndividual.statusOfMembership', ]; return headers; }; const itemFormatters = () => { const formatters = [ - (groupIndividualHistory) => groupIndividualHistory.individual.firstName, - (groupIndividualHistory) => groupIndividualHistory.individual.lastName, + (groupIndividualHistory) => decodeId(groupIndividualHistory.group.id), (groupIndividualHistory) => ( - groupIndividualHistory.individual.dob - ? formatDateFromISO(modulesManager, groupIndividualHistory.individual.dob) + groupIndividualHistory.dateCreated + ? formatDateFromISO(modulesManager, groupIndividualHistory.dateCreated) : EMPTY_STRING ), (groupIndividualHistory) => groupIndividualHistory.role, + (groupIndividualHistory) => ( + groupIndividualHistory.version === groupIndividualHistoryTotalCount ? 'Active' : 'Past' + ), ]; return formatters; }; @@ -56,8 +58,7 @@ function GroupIndividualHistorySearcher({ const sorts = () => [ ['id', true], - ['dateUpdated', true], - ['version', true], + ['dateCreated', true], ]; const defaultFilters = () => { @@ -100,7 +101,7 @@ function GroupIndividualHistorySearcher({ sorts={sorts} rowsPerPageOptions={ROWS_PER_PAGE_OPTIONS} defaultPageSize={DEFAULT_PAGE_SIZE} - defaultOrderBy="id" + defaultOrderBy="-version" rowIdentifier={rowIdentifier} defaultFilters={defaultFilters()} cacheFiltersKey="groupIndividualHistoryFilterCache" diff --git a/src/reducer.js b/src/reducer.js index 304eee6..291af1d 100644 --- a/src/reducer.js +++ b/src/reducer.js @@ -562,7 +562,7 @@ function reducer( id: decodeId(groupIndividualHistory.id), })), // eslint-disable-next-line max-len - groupIndividualHistoryTotalCount: action.payload.data.groupIndividualHistoryPageInfo ? action.payload.data.groupIndividualHistoryPageInfo.totalCount : null, + groupIndividualHistoryTotalCount: action.payload.data.groupIndividualHistory ? action.payload.data.groupIndividualHistory.totalCount : null, groupIndividualHistoryPageInfo: pageInfo(action.payload.data.groupIndividualHistoryPageInfo), errorGroupIndividualHistory: formatGraphQLError(action.payload), }; diff --git a/src/translations/en.json b/src/translations/en.json index b923e1d..08c7cab 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -199,7 +199,9 @@ }, "groupIndividualRolePicker.HEAD": "HEAD", "groupIndividualRolePicker.RECIPIENT": "RECIPIENT", - "groupIndividualRolePicker": "Role" + "groupIndividualRolePicker": "Role", + "dateJoined": "Joining Date", + "statusOfMembership": "Status Of Membership" }, "groupIndividualHistoryList": { "searcherResultsTitle": "{groupIndividualHistoryTotalCount} Historical Records Found" From 525775262b58327f9f0d94b6fe1345019730a572 Mon Sep 17 00:00:00 2001 From: sniedzielski Date: Wed, 6 Mar 2024 12:24:44 +0100 Subject: [PATCH 3/3] CM-717: fixed linter --- src/components/GroupIndividualHistoryFilter.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/GroupIndividualHistoryFilter.js b/src/components/GroupIndividualHistoryFilter.js index 9b1d46f..ff3cae2 100644 --- a/src/components/GroupIndividualHistoryFilter.js +++ b/src/components/GroupIndividualHistoryFilter.js @@ -1,10 +1,10 @@ import React, { useEffect } from 'react'; import { injectIntl } from 'react-intl'; -import { TextInput, PublishedComponent, formatMessage } from '@openimis/fe-core'; +import { formatMessage } from '@openimis/fe-core'; import { Grid } from '@material-ui/core'; import { withTheme, withStyles } from '@material-ui/core/styles'; import _debounce from 'lodash/debounce'; -import { CONTAINS_LOOKUP, DEFAULT_DEBOUNCE_TIME, EMPTY_STRING } from '../constants'; +import { DEFAULT_DEBOUNCE_TIME } from '../constants'; import { defaultFilterStyles } from '../util/styles'; import GroupIndividualRolePicker from '../pickers/GroupIndividualRolePicker'; import GroupPicker from '../pickers/GroupPicker'; @@ -16,8 +16,6 @@ function GroupIndividualHistoryFilter({ const filterValue = (filterName) => filters?.[filterName]?.value; - const filterTextFieldValue = (filterName) => filters?.[filterName]?.value ?? EMPTY_STRING; - const onChangeStringFilter = (filterName, lookup = null) => (value) => { if (lookup) { debouncedOnChangeFilters([