Fix : ItemCategory & items

This commit is contained in:
elforjani3
2020-10-22 14:38:18 +02:00
parent 0e342ca02e
commit 274bd2ea48
3 changed files with 3 additions and 2 deletions

View File

@@ -59,7 +59,7 @@ export const fetchCustomers = ({ query }) => {
dispatch({
type: t.CUSTOMERS_PAGE_SET,
customers: response.data.customers,
customViewId: response.data.customers.customViewId,
customViewId: response.data.customers?.viewMeta?.customViewId || -1,
paginationMeta: response.data.pagination,
});
dispatch({

View File

@@ -27,7 +27,7 @@ export const fetchItems = ({ query }) => {
dispatch({
type: t.ITEMS_PAGE_SET,
items: response.data.items,
customViewId: response.data.customViewId,
customViewId: response.data?.filter_meta?.view?.custom_view_id,
paginationMeta: response.data.pagination,
});
dispatch({