fix bugs.

This commit is contained in:
Ahmed Bouhuolia
2020-04-29 17:54:26 +02:00
parent f6c5cae82e
commit 3b063e3567
4 changed files with 21 additions and 7 deletions

View File

@@ -6,7 +6,7 @@ export const fetchGeneralLedger = ({ query }) => {
dispatch({
type: t.GENERAL_LEDGER_SHEET_LOADING,
loading: true,
})
});
ApiService.get('/financial_statements/general_ledger', { params: query }).then((response) => {
dispatch({
type: t.GENERAL_LEDGER_STATEMENT_SET,
@@ -23,6 +23,9 @@ export const fetchGeneralLedger = ({ query }) => {
export const fetchBalanceSheet = ({ query }) => {
return (dispatch) => new Promise((resolve, reject) => {
dispatch({
type: t.SET_DASHBOARD_REQUEST_LOADING,
});
dispatch({
type: t.BALANCE_SHEET_LOADING,
loading: true,
@@ -37,6 +40,9 @@ export const fetchBalanceSheet = ({ query }) => {
type: t.BALANCE_SHEET_LOADING,
loading: false,
});
dispatch({
type: t.SET_DASHBOARD_REQUEST_COMPLETED,
});
resolve(response);
}).catch((error) => { reject(error); });
});