...
|
...
|
@@ -23,7 +23,13 @@ export default function detailReducer(state=initialState, action) { |
|
|
.setIn(['unuseCoupon', 'error'], null);
|
|
|
}
|
|
|
case UNUSE_COUPON_LIST_SUCCESS: {
|
|
|
return state.set('unuseCoupon', action.payload);
|
|
|
return state.setIn(['unuseCoupon', 'isFetching'], false)
|
|
|
.setIn(['unuseCoupon', 'currentPage'], action.payload.currentPage)
|
|
|
.setIn(['unuseCoupon', 'pageSize'], action.payload.pageSize)
|
|
|
.setIn(['unuseCoupon', 'total'], action.payload.total)
|
|
|
.setIn(['unuseCoupon', 'endReached'], action.payload.endReached)
|
|
|
.setIn(['unuseCoupon', 'couponList'], Immutable.fromJS(action.payload.couponList))
|
|
|
.setIn(['unuseCoupon', 'error'], null);
|
|
|
}
|
|
|
case UNUSE_COUPON_LIST_FAILURE: {
|
|
|
return state.setIn(['unuseCoupon', 'isFetching'], false)
|
...
|
...
|
@@ -34,7 +40,13 @@ export default function detailReducer(state=initialState, action) { |
|
|
.setIn(['usedCoupon', 'error'], null);
|
|
|
}
|
|
|
case USED_COUPON_LIST_SUCCESS: {
|
|
|
return state.set('usedCoupon', action.payload);
|
|
|
return state.setIn(['usedCoupon', 'isFetching'], false)
|
|
|
.setIn(['usedCoupon', 'currentPage'], action.payload.currentPage)
|
|
|
.setIn(['usedCoupon', 'pageSize'], action.payload.pageSize)
|
|
|
.setIn(['usedCoupon', 'total'], action.payload.total)
|
|
|
.setIn(['usedCoupon', 'endReached'], action.payload.endReached)
|
|
|
.setIn(['usedCoupon', 'couponList'], Immutable.fromJS(action.payload.couponList))
|
|
|
.setIn(['usedCoupon', 'error'], null);
|
|
|
}
|
|
|
case USED_COUPON_LIST_FAILURE: {
|
|
|
return state.setIn(['usedCoupon', 'isFetching'], false)
|
...
|
...
|
|