import * as stackMaterialService from '../../services/MM/stackMaterialService';

export default {

    namespace: 'stackMaterial',
    state: {
    },
  
    subscriptions: {
      setup({ dispatch, history }) {  // eslint-disable-line
  
      },
    },
  
    effects: {
      *checkBOM ({ payload,onComplete }, { call, put }) {
        const ret = yield call(stackMaterialService.checkBOM, payload);
        if (typeof onComplete === 'function') {
          onComplete(ret)
        }
      },
    },
  
    reducers: {
      save(state, action) {
        return { ...state, ...action.payload };
      },
    },
  
  };