fix: customer view.

This commit is contained in:
elforjani3
2020-12-21 18:29:32 +02:00
parent c327c79612
commit 4eb7d9984f
7 changed files with 70 additions and 51 deletions

View File

@@ -49,6 +49,7 @@ export default createReducer(initialState, {
state.views[viewId] = {
...view,
pages: {
...(state.views?.[viewId]?.pages || {}),
[paginationMeta.page]: {
ids: customers.map((i) => i.id),
@@ -64,6 +65,10 @@ export default createReducer(initialState, {
}
},
[t.CUSTOMERS_SET_CURRENT_VIEW]: (state, action) => {
state.currentViewId = action.currentViewId;
},
[t.CUSTOMERS_TABLE_LOADING]: (state, action) => {
const { loading } = action.payload;
state.loading = loading;