This commit is contained in:
a.bouhuolia
2021-02-22 17:00:57 +02:00
21 changed files with 432 additions and 267 deletions

View File

@@ -1,33 +1,15 @@
import { connect } from 'react-redux';
import {
getFinancialSheetFactory,
getFinancialSheetColumnsFactory,
getFinancialSheetTableRowsFactory,
APAgingSummaryFilterDrawerSelector,
} from 'store/financialStatement/financialStatements.selectors';
export default (mapState) => {
const mapStateToProps = (state, props) => {
const getAPAgingSheet = getFinancialSheetFactory('payableAgingSummary');
const getAPAgingSheetColumns = getFinancialSheetColumnsFactory(
'payableAgingSummary',
);
const getAPAgingSheetRows = getFinancialSheetTableRowsFactory(
'payableAgingSummary',
);
const {
loading,
filter,
refresh,
} = state.financialStatements.payableAgingSummary;
const mapped = {
payableAgingSummarySheet: getAPAgingSheet(state, props),
payableAgingSummaryColumns: getAPAgingSheetColumns(state, props),
payableAgingSummaryRows: getAPAgingSheetRows(state, props),
payableAgingSummaryLoading: loading,
payableAgingSummaryFilter: filter,
APAgingSummaryRefresh: refresh,
APAgingSummaryFilterDrawer: APAgingSummaryFilterDrawerSelector(
state,
props,
),
};
return mapState ? mapState(mapped, state, props) : mapped;
};