mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
35 lines
1.2 KiB
JavaScript
35 lines
1.2 KiB
JavaScript
import { connect } from 'react-redux';
|
|
import {
|
|
getFinancialSheet,
|
|
getFinancialSheetColumns,
|
|
getFinancialSheetTableRows,
|
|
} from 'store/financialStatement/financialStatements.selectors';
|
|
|
|
export default (mapState) => {
|
|
const mapStateToProps = (state, props) => {
|
|
const { receivableAgingSummaryIndex } = props;
|
|
|
|
const mapped = {
|
|
receivableAgingSummarySheet: getFinancialSheet(
|
|
state.financialStatements.receivableAgingSummary.sheets,
|
|
receivableAgingSummaryIndex,
|
|
),
|
|
receivableAgingSummaryColumns: getFinancialSheetColumns(
|
|
state.financialStatements.receivableAgingSummary.sheets,
|
|
receivableAgingSummaryIndex,
|
|
),
|
|
receivableAgingSummaryRows: getFinancialSheetTableRows(
|
|
state.financialStatements.receivableAgingSummary.sheets,
|
|
receivableAgingSummaryIndex,
|
|
),
|
|
receivableAgingSummaryLoading:
|
|
state.financialStatements.receivableAgingSummary.loading,
|
|
receivableAgingSummaryFilter:
|
|
state.financialStatements.receivableAgingSummary.filter,
|
|
receivableAgingSummaryRefresh:
|
|
state.financialStatements.receivableAgingSummary.refresh,
|
|
};
|
|
return mapState ? mapState(mapped, state, props) : mapped;
|
|
};
|
|
return connect(mapStateToProps);
|
|
} |