recruit.js 13.3 KB
import * as types from '../constants/ActionTypes';

const initialState = {
    candidateRecordList    :{},
    candidateFailRecordList:{},
    simpleList        :{},
    customList        :{},
    pstDetail         :{},
    afterOnboardRatios:[],
    pstList           :{},
    addPst            :{},
    add_failed        :'init',
    updateInfo        :{},
    updateRequire     :{},
    updateInterview   :{},
    positionDown      :{},
    recruitList       :{},
    setRecruit        :{},
    getReward         :{},
    setReward         :{},
    getQuestion       :{},
    addQuestion       :{},
    delQuestion       :{},
    getCandidate      :{},
    countCandidates   :{},
    getCandidateDet   :{},
    switchPosition    :{},
    recruitPerfs      :{},
    resumes           :{},
    resume            :{},
    rewards           :{},
    reward            :{},
    rewardItems       :{},
    rewardStats       :{},
    interviewContactList        :[],
    interviewContactListCount   :0,
    interviewCandidatesList     :[],
    interviewCandidatesListCount:0,
    import_resume               :'init',
    messageAll                  :'',
    statusResumeList            :{},
    historyResumeList           :{},
    startAnalyze    :false,
    resumeNum       :{},
    recruitNum      :{},
    recruitManageNum:{},
    is_recommend    :'init',
    providerNeedLoad:false,
    emailList       :{},
    addEmail        :{},
    reloadPositionDetailStatus:false,
    postionNameOptions:[],
    brokersData:{},
    postionNameListSerach: [],
    positionsCustomerList: {},
    autoSelectNum:{},
    autoSelectList:{},
    RobotData:[],
    addRobotOutboundData:{},
    addRobotOutboundListData:[],
    getRobotDetailsData:{},
    getOutboundRecordsListData:[],
    geTchatContentData:[],
    getRobotNumberData:{},
    getRobotAllSetData:{},
    getRobotSetListData:[],
    getDialogueProcessData:[],
    getRobotListData:[],
    getRobotTimeData:{},
    getSceneData:[],
    followOwnerData:{},
    can_batch_all_interview:'',
    filterParams: {},
    position_rule_details:{},
    settlement_setting_list:[],
    settlement_setting_detail:{},
    nail_approval_list:[],
    nail_approval_detail:{}
};

export default function environment(state = initialState,action) {
    switch(action.type) {
        case types.CANDIDATE_RECORD_LIST:
            return Object.assign({}, state, {
                candidateRecordList: action.candidateRecordList
            });
        case types.CANDIDATE_FAIL_RECORD_LIST:
            return Object.assign({}, state, {
                candidateFailRecordList: action.candidateFailRecordList
            });
        case types.SIMPLE_LIST:
            return Object.assign({}, state, {
                simpleList: action.simpleList
            });
        case types.CUSTOM_LIST:
            return Object.assign({}, state, {
                customList: action.customList
            });
        case types.POSITION_DETAIL:
            return Object.assign({}, state, {
                pstDetail         : action.pstDetail,
                afterOnboardRatios:action.afterOnboardRatios
            });
        case types.POSITION_LIST:
            return Object.assign({}, state, {
                pstList: action.pstList
            });
        case types.ADD_POSITION:
            return Object.assign({}, state, {
                addPst    : action.addPst,
                add_failed: action.add_failed
            });
        case types.UPDATE_INFO:
            return Object.assign({}, state, {
                updateInfo: action.updateInfo
            });
        case types.UPDATE_REQUIRE:
            return Object.assign({}, state, {
                updateRequire: action.updateRequire
            });
        case types.UPDATE_INTERVIEW:
            return Object.assign({}, state, {
                updateInterview: action.updateInterview
            });
        case types.POSITION_DOWN:
            return Object.assign({}, state, {
                positionDown: action.positionDown
            });
        case types.REQUIRE_LIST:
            return Object.assign({}, state, {
                recruitList: action.recruitList
            });
        case types.SET_RECRUIT:
            return Object.assign({}, state, {
                setRecruit: action.setRecruit
            });
        case types.GET_REWARD:
            return Object.assign({}, state, {
                getReward: action.getReward
            });
        case types.SET_REWARD:
            return Object.assign({}, state, {
                setReward: action.setReward
            });
        case types.GET_QUESTION:
            return Object.assign({}, state, {
                getQuestion: action.getQuestion
            });
        case types.ADD_QUESTION:
            return Object.assign({}, state, {
                addQuestion: action.addQuestion
            });
        case types.DEL_QUESTION:
            return Object.assign({}, state, {
                delQuestion: action.delQuestion
            });
        case types.GET_CANDIDATE:
            return Object.assign({}, state, {
                getCandidate: action.getCandidate
            });
        case types.GET_CANDIDATE_COUNT:
            return Object.assign({}, state, {
                countCandidates: action.countCandidates
            });
        case types.GET_CANDIDATE_DET:
            return Object.assign({}, state, {
                getCandidateDet: action.getCandidateDet
            });
        case types.SWITCH_POSITION:
            return Object.assign({}, state, {
                switchPosition: action.switchPosition
            });
        case types.RECRUIT_PERFS_LIST:
            return Object.assign({}, state, {
                recruitPerfs: action.recruitPerfs
            });
        case types.LOAD_RESUMES:
            return Object.assign({}, state, {
                resumes: action.resumes
            });
        case types.LOAD_POSITION_NAME:
            return Object.assign({}, state, {
                postionNameList: action.postionNameList,
                postionNameOptions:action.postionNameOptions
            });
        case types.LOAD_POSITION_NAME_SERACH:
            return Object.assign({}, state, {
                postionNameListSerach: action.postionNameListSerach,
            });
        case types.LOAD_RESUME:
            return Object.assign({}, state, {
                resume: action.resume
            });
        case types.LOAD_REWARDS:
            return Object.assign({}, state, {
                rewards: action.rewards
            });
        case types.LOAD_REWARD:
            return Object.assign({}, state, {
                reward: action.reward
            });
      case types.LOAD_REWARD_STATS:
            return Object.assign({}, state, {
                rewardStats: action.rewardStats
          });
        case types.LOAD_REWARD_ITEMS:
            return Object.assign({}, state, {
                rewardItems: action.rewardItems
            });
        case types.LOAD_INTERVIEW_CONTACT:
              return Object.assign({}, state, {
                interviewContactList: action.interviewContactList,
                  interviewContactListCount:action.interviewContactListCount
            });
        case types.LOAD_INTERVIEW_CANDIDATES:
              return Object.assign({}, state, {
                interviewCandidatesList: action.interviewCandidatesList,
                interviewCandidatesListCount:action.interviewCandidatesListCount
          });
        case types.IMPORT_RESUME:
            return Object.assign({}, state, {
              import_resume: action.import_resume,
              messageAll   : action.messageAll,
        });
        case types.STATUS_RESUME_LIST:
            return Object.assign({}, state, {
              statusResumeList: action.statusResumeList
        });
        case types.HISTORY_RESUME_LIST:
            return Object.assign({}, state, {
              historyResumeList: action.historyResumeList
        });
        case types.START_ANALYZE:
            return Object.assign({}, state, {
              startAnalyze: action.startAnalyze
        });
        case types.RESUME_NUM:
            return Object.assign({}, state, {
              resumeNum: action.resumeNum
        });
        case types.RECRUIT_NUM:
            return Object.assign({}, state, {
              recruitNum: action.recruitNum
        });
        case types.PROVIDER_RECRUIT:
            return Object.assign({}, state, {
              providerRecruit: action.providerRecruit
        });
        case types.RECRUIT_MANAGE_NUM:
            return Object.assign({}, state, {
              recruitManageNum: action.recruitManageNum
        });
        case types.RESUME_RECOMMEND:
            return Object.assign({}, state, {
              is_recommend: action.is_recommend
        });
        case types.CHANGE_PROVIDER_NEED_LOAD:
            return Object.assign({}, state, {
              providerNeedLoad: action.providerNeedLoad
        });
        case types.EMAIL_LIST:
            return Object.assign({}, state, {
              emailList: action.emailList
        });
        case types.ADD_EMAIL:
            return Object.assign({}, state, {
              addEmail: action.addEmail
        });
        case types.RELOAD_POSITION_DETAIL:
            return Object.assign({}, state, {
              reloadPositionDetailStatus: action.reloadPositionDetailStatus
        });
        case types.ADD_EWM:
            return Object.assign({}, state, {
                addEWMValue: action.addEWMValue
        });
        case types.GET_BROKERS_SETTING:
            return Object.assign({}, state, {
                brokersData: action.brokersData
        });
        case types.POSITION_CUSTOMER_LIST:
            return Object.assign({}, state, {
                positionsCustomerList: action.positionsCustomerList
        });
        case types.GET_AUTOSELECT_NUM:
            return Object.assign({}, state, {
                autoSelectNum: action.autoSelectNum
        });
        case types.GET_AUTOSELECT_LIST:
            return Object.assign({}, state, {
                autoSelectList: action.autoSelectList
            })
        case types.ADDROBOTACTION:
            return Object.assign({}, state, {
                RobotData: action.RobotData
        });
        case types.ADDROBOTOUTBOUND:
            return Object.assign({}, state, {
                addRobotOutboundData: action.addRobotOutboundData
        });
        case types.ADDROBOTOUTBOUNDLIST:
            return Object.assign({}, state, {
                addRobotOutboundListData: action.addRobotOutboundListData
        });
        case types.GETROBOTDETAILS:
            return Object.assign({}, state, {
                getRobotDetailsData: action.getRobotDetailsData
        });
        case types.GETOUTBOUNDRECORDSLIST:
            return Object.assign({}, state, {
                getOutboundRecordsListData: action.getOutboundRecordsListData
        });
        case types.GETCHATCONTENT:
            return Object.assign({}, state, {
                geTchatContentData: action.geTchatContentData
        });
        case types.GETROBOTNUMBER:
            return Object.assign({}, state, {
                getRobotNumberData: action.getRobotNumberData
        });
        case types.GETROBOTALLSET:
            return Object.assign({}, state, {
                getRobotAllSetData: action.getRobotAllSetData
        });
        case types.GETROBOTSETLIST:
            return Object.assign({}, state, {
                getRobotSetListData: action.getRobotSetListData
        });
        case types.GETDIALOGUEPROCESS:
            return Object.assign({}, state, {
                getDialogueProcessData: action.getDialogueProcessData
        });
        case types.GETROBOTLIST:
            return Object.assign({}, state, {
                getRobotListData: action.getRobotListData
        });
        case types.GETROBOTTIME:
            return Object.assign({}, state, {
                getRobotTimeData: action.getRobotTimeData
        });
        case types.GETSCENE:
            return Object.assign({}, state, {
                getSceneData: action.getSceneData
        });
        case types.GET_FOLLOW_OWNER:
            return Object.assign({}, state, {
                followOwnerData: action.followOwnerData
        });
        case types.CAN_BATCH_ALL_INTERVIEW:
            return Object.assign({}, state, {
                can_batch_all_interview: action.can_batch_all_interview
        });
        case types.LOAD_RESUMES_SEARCH_PARAMS:
            return Object.assign({}, state, {
                filterParams: action.filterParams
        });
        case types.POSITION_RULE_DETAIL:
            return Object.assign({}, state, {
                position_rule_details: action.position_rule_details
        });
        case types.SETTLEMENTSETTINGLIST:
            return Object.assign({}, state, {
                settlement_setting_list: action.settlement_setting_list
        });
        case types.SETTLEMENTSETTINGDETAIL:
            return Object.assign({}, state, {
                settlement_setting_detail: action.settlement_setting_detail
        });
        case types.GET_NAILAPPROVAL_LIST:
            return Object.assign({}, state, {
                nail_approval_list: action.nail_approval_list
        });
        case types.GET_NAILAPPROVAL_DETAIL:
            return Object.assign({}, state, {
                nail_approval_detail: action.nail_approval_detail
        });
        default:
            return state;
    }
}