outSourcing.js 3.5 KB
import * as types from '../constants/ActionTypes';

const initialState = {
    // formDefind         :[],
    // providerList       :{},
    // recruitProviderList:{},
    // providerDel     :{},
    // is_import       :'init',
    // errorMeg        :'',
    // provider_is_ok  :'init',
    // providerAccount :{},
    outSouringList       : {}
};

export default function environment(state = initialState,action) {
    switch(action.type) {
        // case types.DETAIL_RANGE_AGENTS:
        //     return Object.assign({}, state, {
        //         agentDetailList: action.agentDetailList,
        //         total_direct: action.total_direct,
        //         total_bylower: action.total_bylower,
        //         total_count: action.total_count,
        //     });
        case types.LIST_OUTSOURCING:
            return Object.assign({}, state, {
                outSouringList: action.outSouringList,

            });
        case types.LIST_OUTSOURCING_STORE:
            return Object.assign({}, state, {
                outSouringStoreList: action.outSouringStoreList,

            });
        case types.DETAIL_OUTSOURCING_STORE:
            return Object.assign({}, state, {
                outSouringStoreDetail: action.outSouringStoreDetail,

            });
        case types.LIST_OUTSOURCING_SKU:
            return Object.assign({}, state, {
                outSouringSkuList: action.outSouringSkuList,

            });
        case types.LIST_OUTSOURCING_HUMAN:
            return Object.assign({}, state, {
                outSouringCheckerList: action.outSouringCheckerList,

            });
        case types.LIST_OUTSOURCING_INSPECTOR:
            return Object.assign({}, state, {
                outSouringInspectorList: action.outSouringInspectorList,

            });
        case types.LIST_OUTSOURCING_CLERK:
            return Object.assign({}, state, {
                outSouringClerkList: action.outSouringClerkList,

            });
        case types.LIST_CASCADER_SKU:
            return Object.assign({}, state, {
                skuCascaderList: action.skuCascaderList,

            });
        case types.LIST_CHECK:
            return Object.assign({}, state, {
                outSouringCheckList: action.outSouringCheckList,

            });
        case types.LIST_CHECK_DETAIL:
            return Object.assign({}, state, {
                outSouringCheckDetail: action.outSouringCheckDetail,

            });
        case types.LIST_ATTENDENCE:
            return Object.assign({}, state, {
                outSouringAttendenceList: action.outSouringAttendenceList,

            });
        case types.LIST_ATTENDENCE_PRIVATE:
            return Object.assign({}, state, {
                outSouringAttendencePrivateList: action.outSouringAttendencePrivateList,

            });
        case types.LIST_ATTENDENCE_DETAIL:
            return Object.assign({}, state, {
                outSouringAttendenceDetailList: action.outSouringAttendenceDetailList,

            });
        case types.LIST_BRAND_OPTION:
            return Object.assign({}, state, {
                outSouringBrandOptionsList: action.outSouringBrandOptionsList,

            });
        case types.LIST_STORE_OPTION:
            return Object.assign({}, state, {
                outSouringStoreOptionsList: action.outSouringStoreOptionsList,

            });
        case types.PROJECT_NAME:
            return Object.assign({}, state, {
                project_name: action.project_name,

            });
        default:
            return state;
    }
}