WIP Financial statements.

This commit is contained in:
Ahmed Bouhuolia
2020-04-03 01:17:17 +02:00
parent cf5f56ae32
commit 4227f2f9a8
40 changed files with 1750 additions and 761 deletions

View 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);

View File

@@ -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) => ({

View File

@@ -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) => ({