- feat: Filter expense and payment accounts on expense form.

- feat: Make journal errors with receivable and payable accounts.
- fix: Handle database big numbers.
- fix: Indexing lines when add a new line on make journal form.
- fix: Abstruct accounts type component.
This commit is contained in:
Ahmed Bouhuolia
2020-07-06 21:22:27 +02:00
parent 3fc390652d
commit 282da55d08
40 changed files with 1031 additions and 747 deletions

View File

@@ -262,7 +262,9 @@ export const fetchAccount = ({ id }) => {
.then((response) => {
dispatch({
type: t.ACCOUNT_SET,
account: response.data.account,
payload: {
account: response.data.account,
}
});
resolve(response);
})

View File

@@ -51,7 +51,11 @@ const accountsReducer = createReducer(initialState, {
},
[t.ACCOUNT_SET]: (state, action) => {
state.accountsById[action.account.id] = action.account;
const { account } = action.payload;
state.items[account.id] = {
...(state.items[account.id] || {}),
...account,
};
},
[t.ACCOUNT_DELETE]: (state, action) => {

View File

@@ -8,7 +8,7 @@ const initialState = {
views: {},
loading: false,
tableQuery: {
page_size: 4,
page_size: 12,
page: 1,
},
currentViewId: -1,