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

@@ -29,6 +29,7 @@
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<div id="nprogress"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.

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