mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
feat: apply new cards design system.
feat: empty status datatables. fix: edit account.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { omit } from 'lodash';
|
||||
import { omit, flatten } from 'lodash';
|
||||
import ApiService from 'services/ApiService';
|
||||
import t from 'store/types';
|
||||
|
||||
@@ -135,7 +135,14 @@ export const fetchManualJournalsTable = ({ query } = {}) => {
|
||||
});
|
||||
dispatch({
|
||||
type: t.MANUAL_JOURNALS_ITEMS_SET,
|
||||
manual_journals: response.data.manual_journals,
|
||||
manual_journals: [
|
||||
...response.data.manual_journals.map((manualJournal) => ({
|
||||
...manualJournal,
|
||||
entries: manualJournal.entries.map((entry) => ({
|
||||
...omit(entry, ['account']),
|
||||
}))
|
||||
})),
|
||||
]
|
||||
});
|
||||
dispatch({
|
||||
type: t.MANUAL_JOURNALS_PAGINATION_SET,
|
||||
@@ -145,6 +152,12 @@ export const fetchManualJournalsTable = ({ query } = {}) => {
|
||||
response.data.manual_journals?.viewMeta?.customViewId || -1,
|
||||
},
|
||||
});
|
||||
dispatch({
|
||||
type: t.ACCOUNTS_ITEMS_SET,
|
||||
accounts: flatten(response.data.manual_journals?.map(
|
||||
journal => journal?.entries.map(entry => entry.account),
|
||||
)),
|
||||
});
|
||||
dispatch({
|
||||
type: t.MANUAL_JOURNALS_TABLE_LOADING,
|
||||
loading: false,
|
||||
|
||||
Reference in New Issue
Block a user