feat: AR aging summary sheet frontend.

This commit is contained in:
a.bouhuolia
2021-01-13 20:58:58 +02:00
parent 7680150a31
commit 343185b8bd
27 changed files with 670 additions and 594 deletions

View File

@@ -0,0 +1,36 @@
import { connect } from 'react-redux';
import {
getFinancialSheetFactory,
getFinancialSheetAccountsFactory,
getFinancialSheetColumnsFactory,
getFinancialSheetQueryFactory,
getFinancialSheetTableRowsFactory,
} from 'store/financialStatement/financialStatements.selectors';
export default (mapState) => {
const mapStateToProps = (state, props) => {
const getARAgingSheet = getFinancialSheetFactory('receivableAgingSummary');
const getARAgingSheetColumns = getFinancialSheetColumnsFactory(
'receivableAgingSummary',
);
const getARAgingSheetRows = getFinancialSheetTableRowsFactory(
'receivableAgingSummary',
);
const {
loading,
filter,
refresh,
} = state.financialStatements.receivableAgingSummary;
const mapped = {
receivableAgingSummarySheet: getARAgingSheet(state, props),
receivableAgingSummaryColumns: getARAgingSheetColumns(state, props),
receivableAgingSummaryRows: getARAgingSheetRows(state, props),
receivableAgingSummaryLoading: loading,
receivableAgingSummaryFilter: filter,
ARAgingSummaryRefresh: refresh,
};
return mapState ? mapState(mapped, state, props) : mapped;
};
return connect(mapStateToProps);
};