+
);
}
-export default ViewFormContainer(ViewForm);
\ No newline at end of file
+export default ViewFormContainer(ViewForm);
diff --git a/client/src/containers/Views/ViewFormPage.js b/client/src/containers/Views/ViewFormPage.js
index 033d5d629..88db1dabc 100644
--- a/client/src/containers/Views/ViewFormPage.js
+++ b/client/src/containers/Views/ViewFormPage.js
@@ -5,14 +5,17 @@ import { Intent, Alert } from '@blueprintjs/core';
import DashboardInsider from 'components/Dashboard/DashboardInsider';
import DashboardPageContent from 'components/Dashboard/DashboardPageContent';
import ViewForm from 'containers/Views/ViewForm';
-import withResourcesActions from 'containers/Resources/withResourcesActions';
-import withViewsActions from 'containers/Views/withViewsActions';
-import withDashboard from 'containers/Dashboard/withDashboard';
+
import AppToaster from 'components/AppToaster';
import {compose} from 'utils';
import { If } from 'components';
import { FormattedMessage as T, useIntl } from 'react-intl';
+import withResourcesActions from 'containers/Resources/withResourcesActions';
+import withViewsActions from 'containers/Views/withViewsActions';
+import withDashboard from 'containers/Dashboard/withDashboard';
+
+
// @flow
function ViewFormPage({
changePageTitle,
@@ -27,6 +30,7 @@ function ViewFormPage({
}) {
const { resource_slug: resourceSlug, view_id: viewId } = useParams();
const [stateDeleteView, setStateDeleteView] = useState(null);
+ const {formatMessage} =useIntl()
const fetchHook = useAsync(async () => {
return Promise.all([
@@ -44,9 +48,9 @@ function ViewFormPage({
useEffect(() => {
if (viewId) {
- changePageTitle('Edit Custom View');
+ changePageTitle(formatMessage({id:'edit_custom_view'}));
} else {
- changePageTitle('New Custom View');
+ changePageTitle(formatMessage({id:'new_custom_view'}));
}
return () => {
changePageTitle('');
diff --git a/client/src/lang/en/index.js b/client/src/lang/en/index.js
index 6a6f84302..79c54866a 100644
--- a/client/src/lang/en/index.js
+++ b/client/src/lang/en/index.js
@@ -149,7 +149,22 @@ bulk_update:'Bulk Update',
all_accounts:'All accounts',
go_to_bigcapital_com:'← Go to bigcapital.com',
currency:'Currency',
-new_conditional:'+ New Conditional'
+new_conditional:'+ New Conditional',
+chart_of_accounts:'Chart of Accounts',
+exchange_rate_details:'Exchange Rate Details',
+exchange_rate_list:'Exchange Rate List',
+manual_journals:'Manual Journals',
+edit_expense_details:'Edit Expense Details',
+expenses_list:'Expenses List',
+edit_category_details:'Edit Category Details',
+category_list:'Category List',
+edit_item_details:'Edit Item Details',
+items_list:'Items List',
+edit_custom_view:'Edit Custom View',
+new_custom_view:'New Custom View',
+view_name:'View Name',
+new_conditional:'New Conditional'
+
diff --git a/client/src/store/ExchangeRate/exchange.actions.js b/client/src/store/ExchangeRate/exchange.actions.js
index 2e25556ec..8bf497b39 100644
--- a/client/src/store/ExchangeRate/exchange.actions.js
+++ b/client/src/store/ExchangeRate/exchange.actions.js
@@ -7,6 +7,10 @@ export const fetchExchangeRates = () => {
dispatch({
type: t.SET_DASHBOARD_REQUEST_LOADING,
});
+ dispatch({
+ type: t.EXCHANGE_RATE_TABLE_LOADING,
+ loading: true,
+ });
ApiService.get('exchange_rates')
.then((response) => {
dispatch({
@@ -16,6 +20,10 @@ export const fetchExchangeRates = () => {
dispatch({
type: t.SET_DASHBOARD_REQUEST_COMPLETED,
});
+ dispatch({
+ type: t.EXCHANGE_RATE_TABLE_LOADING,
+ loading: false,
+ });
resolve(response);
})
.catch((error) => {
diff --git a/client/src/store/ExchangeRate/exchange.reducer.js b/client/src/store/ExchangeRate/exchange.reducer.js
index ae7db5cbf..efcc2c4ae 100644
--- a/client/src/store/ExchangeRate/exchange.reducer.js
+++ b/client/src/store/ExchangeRate/exchange.reducer.js
@@ -17,4 +17,7 @@ export default createReducer(initialState, {
..._exchangeRates,
};
},
+ [t.EXCHANGE_RATE_TABLE_LOADING]: (state, action) => {
+ state.loading = action.loading;
+ },
});
diff --git a/client/src/store/ExchangeRate/exchange.type.js b/client/src/store/ExchangeRate/exchange.type.js
index c0354afc6..7e07ab04b 100644
--- a/client/src/store/ExchangeRate/exchange.type.js
+++ b/client/src/store/ExchangeRate/exchange.type.js
@@ -4,4 +4,5 @@ export default {
EXCHANGE_RATE_LIST_SET: 'EXCHANGE_RATE_LIST_SET',
CLEAR_EXCHANGE_RATE_FORM_ERRORS: 'CLEAR_EXCHANGE_RATE_FORM_ERRORS',
ExchangeRates_TABLE_QUERIES_ADD: 'ExchangeRates_TABLE_QUERIES_ADD',
+ EXCHANGE_RATE_TABLE_LOADING:'EXCHANGE_RATE_TABLE_LOADING'
};