company.js 7.4 KB
import * as types from '../constants/ActionTypes';

const initialState = {
    orderList: {},
    registerList: {},
    orderCount: {},
    fieldCount: {},
    dataCount: {},
    insuredMember    : {},
    customerCountList: {},
    historyList: {},
    frontProcessList: {},
    frontProcessDetail: {},
    dataNeeded: {},
    dataOther: {},
    dataInfoList: {},
    ajustAdminList: {},
    orderFormList: {},
    preseList: {},
    preseDetailList: {},
    opBackAdmin: {},
    getBackAdmin: {},
    getBackAccountCustomer: {},
    orderFormList: {},
    preseList: {},
    preseDetailList: {},
    addTem: '',
    orderListDetail: {},
    formTemList: {},
    customerStatisticsItems: {},
    insuredDetail: {},
    frontBaseConflict: {},
    accountsInfo: {},
    companyServerRecordList: {},
    companyServerFailRecordList: {},
    billDetail          :{},
    orderImportError    :'',
    insuranedImportError:'',
    historyDetail       :{},
    legalListAll    : [],
    limitRangeDetail: {},
    deleteOrderList : {},
    siEntIndPersonIns : {},
    hfEntIndPersonIns : {},
    getAssociatedRisksData : {},
    buildOrderIns:{}
};

export default function environment(state = initialState, action) {
    switch (action.type) {
        case types.GET_BUILD_ORDER_INS:
            return Object.assign({}, state, {
              buildOrderIns: action.buildOrderIns,
            });
        case types.SI_ENT_IND_INS:
            return Object.assign({}, state, {
              siEntIndPersonIns: action.siEntIndPersonIns,
            });
        case types.HF_ENT_IND_INS:
            return Object.assign({}, state, {
              hfEntIndPersonIns: action.hfEntIndPersonIns
            });
        case types.DELETE_ORDER_LIST:
            return Object.assign({}, state, {
                deleteOrderList: action.deleteOrderList
            });
        case types.LIMIT_RANGE_DETAIL:
            return Object.assign({}, state, {
                limitRangeDetail: action.limitRangeDetail
            });
        case types.HISTORY_DETAIL:
            return Object.assign({}, state, {
                historyDetail: action.historyDetail
            });
        case types.INSURANCE_IMPORT_ERROR:
            return Object.assign({}, state, {
                insuranedImportError: action.insuranedImportError
            });
        case types.ORDER_IMPORT_ERROR:
            return Object.assign({}, state, {
                orderImportError: action.orderImportError
            });
        case types.BILL_DETAIL:
            return Object.assign({}, state, {
                billDetail: action.billDetail
            });
        case types.LOAD_ORDER_LIST:
            return Object.assign({}, state, {
                orderList: action.orderList
            });
        case types.LOAD_GEGISTER_LIST:
            return Object.assign({}, state, {
                registerList: action.registerList
            });
        case types.LOAD_ORDER_COUNT:
            return Object.assign({}, state, {
                orderCount: action.orderCount
            });
        case types.LOAD_FIELD_COUNT:
            return Object.assign({}, state, {
                fieldCount: action.fieldCount
            });
        case types.LOAD_DATA_COUNT:
            return Object.assign({}, state, {
                dataCount: action.dataCount
            });
        case types.LOAD_INSURED_MEMBER:
            return Object.assign({}, state, {
                insuredMember: action.insuredMember
            });
        case types.LOAD_CUSTOMER_COUNT:
            return Object.assign({}, state, {
                customerCountList: action.customerCountList
            });
        case types.LOAD_DATA_INFO_LIST:
            return Object.assign({}, state, {
                dataInfoList: action.dataInfoList
            });
        case types.LOAD_HISTORY_LIST:
            return Object.assign({}, state, {
                historyList: action.historyList
            });
        case types.LOAD_PRESE_LIST:
            return Object.assign({}, state, {
                preseList: action.preseList
            });
        case types.FRONT_PROCESS_LIST:
            return Object.assign({}, state, {
                frontProcessList: action.frontProcessList
            });
        case types.FRONT_PROCESS_DETAIL:
            return Object.assign({}, state, {
                frontProcessDetail: action.frontProcessDetail
            });
        case types.LOAD_DATA_NEEDED:
            return Object.assign({}, state, {
                dataNeeded: action.dataNeeded
            });
        case types.LOAD_DATA_OTHER:
            return Object.assign({}, state, {
                dataOther: action.dataOther
            });
        case types.AJUST_ADMIN_LIST:
            return Object.assign({}, state, {
                ajustAdminList: action.ajustAdminList
            });
        case types.LOAD_ORDER_FORM_LIST:
            return Object.assign({}, state, {
                orderFormList: action.orderFormList
            });
        case types.LOAD_PRESE_DETAIL_LIST:
            return Object.assign({}, state, {
                preseDetailList: action.preseDetailList
            });
        case types.OP_BACK_ADMIN:
            return Object.assign({}, state, {
                opBackAdmin: action.opBackAdmin
            });
        case types.GET_BACK_ADMIN:
            return Object.assign({}, state, {
                getBackAdmin: action.getBackAdmin
            });
        case types.GET_BACK_ACCOUNT_CUSTOMER:
            return Object.assign({}, state, {
                getBackAccountCustomer: action.getBackAccountCustomer
            });
        case types.ADD_SOCIAL_ORDER_TEM:
            return Object.assign({}, state, {
                addTem: action.addTem,
                socialOrderTem: action.socialOrderTem
            });
        case types.LOAD_ORDER_LIST_DETAIL:
            return Object.assign({}, state, {
                orderListDetail: action.orderListDetail
            });
        case types.LOAD_FORM_TEM:
            return Object.assign({}, state, {
                formTemList: action.formTemList
            });
        case types.LOAD_CUSTOMER_STATISTICS:
            return Object.assign({}, state, {
                customerStatisticsItems: action.customerStatisticsItems
            });
        case types.LOAD_INSURED_DETAIL:
            return Object.assign({}, state, {
                insuredDetail: action.insuredDetail
            });
        case types.FRONT_BASE_CONFLICT:
            return Object.assign({}, state, {
                frontBaseConflict: action.frontBaseConflict
            });
        case types.LOAD_ACCOUNT_INFO:
            return Object.assign({}, state, {
                accountsInfo: action.accountsInfo
            });
        case types.COMPANY_SERVER_RECORD_LIST:
            return Object.assign({}, state, {
                companyServerRecordList: action.companyServerRecordList
            });
        case types.COMPANY_SERVER_FAIL_RECORD_LIST:
            return Object.assign({}, state, {
                companyServerFailRecordList: action.companyServerFailRecordList
            });
        case types.LEGAL_LIST_All:
            return Object.assign({}, state, {
                legalListAll: action.legalListAll
            });
        case types.GETASSOCIATEDRISKS:
            return Object.assign({}, state, {
                getAssociatedRisksData: action.getAssociatedRisksData
            });
        default:
            return state;
    }
}