...
|
...
|
@@ -94,7 +94,8 @@ export default function productReducer(state=initialState, action) { |
|
|
.set('productList', Immutable.fromJS(productList))
|
|
|
.set('selectedProductList', Immutable.fromJS(productList))
|
|
|
.set('currentPage', currentPage)
|
|
|
.set('selectedCategoryIndex', 0);
|
|
|
.set('selectedCategoryIndex', 0)
|
|
|
.set('showEmpty', productList.length == 0);
|
|
|
|
|
|
let newState = state.set('commonProduct', newProduct);
|
|
|
return newState;
|
...
|
...
|
@@ -141,7 +142,8 @@ export default function productReducer(state=initialState, action) { |
|
|
let newProduct = globalProduct.set('isFetching', false)
|
|
|
.set('error', null)
|
|
|
.set('productList', Immutable.fromJS(productList))
|
|
|
.set('currentPage', currentPage);
|
|
|
.set('currentPage', currentPage)
|
|
|
.set('showEmpty', productList.length == 0);
|
|
|
|
|
|
let newState = state.set('globalProduct', newProduct);
|
|
|
return newState;
|
...
|
...
|
@@ -169,9 +171,12 @@ export default function productReducer(state=initialState, action) { |
|
|
let {productList, selectedProductList} = action.payload;
|
|
|
|
|
|
let {commonProduct} = state;
|
|
|
|
|
|
|
|
|
let newProduct = commonProduct.set('isDeleting', false)
|
|
|
.set('productList', productList)
|
|
|
.set('selectedProductList', selectedProductList);
|
|
|
.set('selectedProductList', selectedProductList)
|
|
|
.set('showEmpty', productList.size == 0);
|
|
|
|
|
|
let newState = state.set('commonProduct', newProduct).set('isDeleting', false);
|
|
|
return newState;
|
...
|
...
|
@@ -211,6 +216,7 @@ export default function productReducer(state=initialState, action) { |
|
|
let {globalProduct} = state;
|
|
|
let newProduct = globalProduct.set('isDeleting', false)
|
|
|
.set('productList', productList)
|
|
|
.set('showEmpty', productList.size == 0);
|
|
|
|
|
|
let newState = state.set('globalProduct', newProduct).set('isDeleting', false);
|
|
|
return newState;
|
...
|
...
|
|