diff --git a/src/components/tasks/IndividualUpdateTasks.js b/src/components/tasks/IndividualUpdateTasks.js new file mode 100644 index 0000000..70bdc81 --- /dev/null +++ b/src/components/tasks/IndividualUpdateTasks.js @@ -0,0 +1,16 @@ +import React from 'react'; +import { FormattedMessage } from '@openimis/fe-core'; + +const IndividualUpdateTaskTableHeaders = () => [ + , + , + , +]; + +const IndividualUpdateTaskItemFormatters = () => [ + (individual) => individual?.first_name, + (individual) => individual?.last_name, + (individual) => individual?.dob, +]; + +export { IndividualUpdateTaskTableHeaders, IndividualUpdateTaskItemFormatters }; diff --git a/src/index.js b/src/index.js index 722b013..acb7984 100644 --- a/src/index.js +++ b/src/index.js @@ -2,6 +2,8 @@ /* eslint-disable camelcase */ /* eslint-disable import/prefer-default-export */ import flatten from 'flat'; +import { FormattedMessage } from '@openimis/fe-core'; +import React from 'react'; import messages_en from './translations/en.json'; import reducer from './reducer'; import IndividualsMainMenu from './menus/IndividualsMainMenu'; @@ -13,6 +15,10 @@ import { IndividualsListTabLabel, IndividualsListTabPanel } from './components/I import getBenefitPlansListTab from './contributions/getBenefitPlansListTab'; import GroupIndividualSearcher from './components/GroupIndividualSearcher'; import { clearIndividualExport, downloadIndividuals, fetchIndividuals } from './actions'; +import { + IndividualUpdateTaskItemFormatters, + IndividualUpdateTaskTableHeaders, +} from './components/tasks/IndividualUpdateTasks'; const ROUTE_INDIVIDUALS = 'individuals'; const ROUTE_INDIVIDUAL = 'individuals/individual'; @@ -53,6 +59,12 @@ const DEFAULT_CONFIG = { ], 'individual.BenefitPlansListTabLabel': [BENEFIT_PLAN_TABS_LABEL_REF_KEY], 'individual.BenefitPlansListTabPanel': [BENEFIT_PLAN_TABS_PANEL_REF_KEY], + 'tasksManagement.tasks': [{ + text: , + tableHeaders: IndividualUpdateTaskTableHeaders, + itemFormatters: IndividualUpdateTaskItemFormatters, + taskSource: ['IndividualService'], + }], }; export const IndividualModule = (cfg) => ({ ...DEFAULT_CONFIG, ...cfg }); diff --git a/src/translations/en.json b/src/translations/en.json index 4aa95da..cd9f5e5 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -36,6 +36,11 @@ "individualsList": { "label": "MEMBERS" }, + "tasks": { + "update": { + "title": "Individual Update Tasks" + } + }, "any": "ANY", "ok": "ok" },