import { routerRedux } from 'dva/router';
import * as flowService from '../../services/PF/flow';

export default {

  namespace: 'PFFlow',
  state: {
  },

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

    },
  },

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

  },

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

};
