import * as woService from '../../services/WO/WOOrderQuery';

export default {

  namespace: 'WOOrderQuery',
  state: {
  },

  subscriptions: {
    setup({ dispatch, history }) {  // eslint-disable-line

    },
  },

  effects: {
    *getOrderList ({ payload,onComplete }, { call, put }) {
      const ret = yield call(woService.getOrderList, payload);
      if (typeof onComplete === 'function') {
        onComplete(ret)
      }
    },
  },

  reducers: {
    save(state, action) {
      return { ...state, ...action.payload };
    },
  },

};
