mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
WIP Financial statements.
This commit is contained in:
20
client/src/connectors/GeneralLedgerSheet.connect.js
Normal file
20
client/src/connectors/GeneralLedgerSheet.connect.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import {connect} from 'react-redux';
|
||||
import {
|
||||
fetchGeneralLedger,
|
||||
} from 'store/financialStatement/financialStatements.actions';
|
||||
import {
|
||||
getFinancialSheetIndexByQuery,
|
||||
getFinancialSheet,
|
||||
} from 'store/financialStatement/financialStatements.selectors';
|
||||
|
||||
export const mapStateToProps = (state, props) => ({
|
||||
getGeneralLedgerSheetIndex: (query) => getFinancialSheetIndexByQuery(state.financialStatements.generalLedger.sheets, query),
|
||||
getGeneralLedgerSheet: (index) => getFinancialSheet(state.financialStatements.generalLedger.sheets, index),
|
||||
generalLedgerSheetLoading: state.financialStatements.generalLedger.loading,
|
||||
});
|
||||
|
||||
export const mapDispatchToProps = (dispatch) => ({
|
||||
fetchGeneralLedger: (query = {}) => dispatch(fetchGeneralLedger({ query })),
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps);
|
||||
@@ -8,8 +8,9 @@ import {
|
||||
} from 'store/financialStatement/financialStatements.selectors';
|
||||
|
||||
export const mapStateToProps = (state, props) => ({
|
||||
getJournalSheetIndex: (query) => getFinancialSheetIndexByQuery(state.financialStatements.journalSheets, query),
|
||||
getJournalSheet: (index) => getFinancialSheet(state.financialStatements.journalSheets, index),
|
||||
getJournalSheetIndex: (query) => getFinancialSheetIndexByQuery(state.financialStatements.journal.sheets, query),
|
||||
getJournalSheet: (index) => getFinancialSheet(state.financialStatements.journal.sheets, index),
|
||||
journalSheetLoading: state.financialStatements.journal.loading,
|
||||
});
|
||||
|
||||
export const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
@@ -3,17 +3,13 @@ import {
|
||||
fetchProfitLossSheet,
|
||||
} from 'store/financialStatement/financialStatements.actions';
|
||||
import {
|
||||
getProfitLossSheetIndex,
|
||||
getProfitLossSheet,
|
||||
getProfitLossSheetColumns,
|
||||
getProfitLossSheetAccounts,
|
||||
getFinancialSheetIndexByQuery,
|
||||
getFinancialSheet,
|
||||
} from 'store/financialStatement/financialStatements.selectors';
|
||||
|
||||
export const mapStateToProps = (state, props) => ({
|
||||
getProfitLossSheetIndex: (query) => getProfitLossSheetIndex(state.financialStatements.profitLossSheets, query),
|
||||
getProfitLossSheet: (index) => getProfitLossSheet(state.financialStatements.profitLossSheets, index),
|
||||
getProfitLossSheetColumns: (index) => getProfitLossSheetColumns(state.financialStatements.profitLossSheets, index),
|
||||
getProfitLossSheetAccounts: (index) => getProfitLossSheetAccounts(state.financialStatements.profitLossSheets, index),
|
||||
getProfitLossSheetIndex: (query) => getFinancialSheetIndexByQuery(state.financialStatements.profitLoss.sheets, query),
|
||||
getProfitLossSheet: (index) => getFinancialSheet(state.financialStatements.profitLoss.sheets, index),
|
||||
});
|
||||
|
||||
export const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
Reference in New Issue
Block a user