- feat: Highlight inactive accounts in data-table.

- feat: Separate accounts list and table order.
This commit is contained in:
Ahmed Bouhuolia
2020-07-04 15:30:24 +02:00
parent 273834b13e
commit 3fc390652d
13 changed files with 116 additions and 49 deletions

View File

@@ -5,6 +5,7 @@ import { createTableQueryReducers } from 'store/queryReducers';
const initialState = {
items: {},
views: {},
list: [],
accountsTypes: [],
accountsById: {},
tableQuery: {
@@ -40,6 +41,11 @@ const accountsReducer = createReducer(initialState, {
};
},
[t.ACCOUNTS_LIST_SET]: (state, action) => {
const { accounts } = action.payload;
state.list = accounts.map(account => account.id);
},
[t.ACCOUNT_TYPES_LIST_SET]: (state, action) => {
state.accountsTypes = action.account_types;
},