Skip to content

Commit

Permalink
CM-406: fix eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan committed Jan 10, 2024
1 parent 602e026 commit 994dedf
Showing 1 changed file with 27 additions and 31 deletions.
58 changes: 27 additions & 31 deletions src/components/IndividualHistorySearcher.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import React from 'react';
import {injectIntl} from 'react-intl';
import { injectIntl } from 'react-intl';
import {
formatDateFromISO,
formatMessageWithValues,
Searcher,
withHistory,
withModulesManager,
} from '@openimis/fe-core';
import {bindActionCreators} from 'redux';
import {connect} from 'react-redux';
import {fetchIndividualHistory} from '../actions';
import {DEFAULT_PAGE_SIZE, EMPTY_STRING, ROWS_PER_PAGE_OPTIONS,} from '../constants';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { fetchIndividualHistory } from '../actions';
import { DEFAULT_PAGE_SIZE, EMPTY_STRING, ROWS_PER_PAGE_OPTIONS } from '../constants';
import IndividualHistoryFilter from './IndividualHistoryFilter';

function IndividualHistorySearcher({
Expand All @@ -27,33 +27,29 @@ function IndividualHistorySearcher({
}) {
const fetch = (params) => fetchIndividualHistory(params);

const headers = () => {
return [
'individualHistory.firstName',
'individualHistory.lastName',
'individualHistory.dob',
'individualHistory.dateUpdated',
'individualHistory.version',
'individualHistory.jsonExt',
'individualHistory.userUpdated',
];
};
const headers = () => [
'individualHistory.firstName',
'individualHistory.lastName',
'individualHistory.dob',
'individualHistory.dateUpdated',
'individualHistory.version',
'individualHistory.jsonExt',
'individualHistory.userUpdated',
];

const itemFormatters = () => {
return [
(individualHistory) => individualHistory.firstName,
(individualHistory) => individualHistory.lastName,
(individualHistory) => (individualHistory.dob
? formatDateFromISO(modulesManager, intl, individualHistory.dob) : EMPTY_STRING
),
(individualHistory) => (individualHistory.dateUpdated
? formatDateFromISO(modulesManager, intl, individualHistory.dateUpdated) : EMPTY_STRING
),
(individualHistory) => individualHistory.version,
(individualHistory) => individualHistory.jsonExt,
(individualHistory) => individualHistory?.userUpdated?.username,
];
};
const itemFormatters = () => [
(individualHistory) => individualHistory.firstName,
(individualHistory) => individualHistory.lastName,
(individualHistory) => (individualHistory.dob
? formatDateFromISO(modulesManager, intl, individualHistory.dob) : EMPTY_STRING
),
(individualHistory) => (individualHistory.dateUpdated
? formatDateFromISO(modulesManager, intl, individualHistory.dateUpdated) : EMPTY_STRING
),
(individualHistory) => individualHistory.version,
(individualHistory) => individualHistory.jsonExt,
(individualHistory) => individualHistory?.userUpdated?.username,
];

const rowIdentifier = (individualHistory) => individualHistory.id;

Expand Down

0 comments on commit 994dedf

Please sign in to comment.