mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 22:30:31 +00:00
24 lines
1012 B
JavaScript
24 lines
1012 B
JavaScript
import {connect} from 'react-redux';
|
|
import {
|
|
fetchTrialBalanceSheet
|
|
} from 'store/financialStatement/financialStatements.actions';
|
|
import {
|
|
getFinancialSheetIndexByQuery,
|
|
getFinancialSheetAccounts,
|
|
getFinancialSheetQuery,
|
|
} from 'store/financialStatement/financialStatements.selectors';
|
|
|
|
|
|
export const mapStateToProps = (state, props) => ({
|
|
getTrialBalanceSheetIndex: (query) => getFinancialSheetIndexByQuery(state.financialStatements.trialBalance.sheets, query),
|
|
getTrialBalanceAccounts: (sheetIndex) => getFinancialSheetAccounts(state.financialStatements.trialBalance.sheets, sheetIndex),
|
|
getTrialBalanceQuery: (sheetIndex) => getFinancialSheetQuery(state.financialStatements.trialBalance.sheets, sheetIndex),
|
|
|
|
trialBalanceSheetLoading: state.financialStatements.trialBalance.loading,
|
|
});
|
|
|
|
export const mapDispatchToProps = (dispatch) => ({
|
|
fetchTrialBalanceSheet: (query = {}) => dispatch(fetchTrialBalanceSheet({ query })),
|
|
});
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps); |