custome.js
4.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
import * as types from '../constants/ActionTypes';
const initialState = {
customList:{},
serverList:{},
serverListCustom:{},
serverListCustomSearch:{},
custom:{},
company:{},
legalEntities:{},
contacts:{},
serverContractInfo:{},
serverContractOwners:{},
serverContractItems:{},
formDefind :[],
adminDate :'',
is_fail :'',
add_custome_meg:'',
recordList :{},
failRecordList :{},
is_import :'init',
errorMeg :'',
remindSetting :{},
attachments :[],
customCommentsList:[],
formBasicList: []
};
export default function environment(state = initialState,action) {
switch(action.type) {
case types.CUSTOM_LIST:
return Object.assign({}, state, {
customList: action.customList
});
case types.SERVER_LIST:
return Object.assign({}, state, {
serverList: action.serverList
});
case types.SERVER_LIST_CUSTOME:
return Object.assign({}, state, {
serverListCustom: action.serverListCustom
});
case types.SERVER_LIST_CUSTOME_SEARCH:
return Object.assign({}, state, {
serverListCustomSearch: action.serverListCustomSearch
});
case types.GET_CUSTOM:
return Object.assign({}, state, {
custom: action.custom
});
case types.GET_COMPANY_INFO:
return Object.assign({}, state, {
company: action.company
});
case types.LOAD_CUSTOMER_LEGAL_ENTITIES:
return Object.assign({}, state, {
legalEntities: action.legalEntities
});
case types.LOAD_CONTACTS_CUSTOMER:
return Object.assign({}, state, {
contacts: action.contacts
});
case types.LOAD_CONTACTS_OWNERS:
return Object.assign({}, state, {
owners: action.owners
});
case types.SERVER_CONTRACT_INFO:
return Object.assign({}, state, {
serverContractInfo: action.serverContractInfo
});
case types.SERVER_CONTRACT_OWNERS:
return Object.assign({}, state, {
serverContractOwners: action.serverContractOwners
});
case types.SERVER_CONTRACT_ITEMS:
return Object.assign({}, state, {
serverContractItems: action.serverContractItems
});
case types.LOAD_FORM_DEFIND:
return Object.assign({}, state, {
formDefind: action.formDefind
});
case types.LOAD_CONTACTS_ADMIN:
return Object.assign({},state,{
adminDate: action.adminDate
});
case types.ADD_FAIL:
return Object.assign({},state,{
is_fail : action.is_fail,
add_custome_meg: action.add_custome_meg,
});
case types.FAIL_RECORD_LIST:
return Object.assign({},state,{
failRecordList: action.failRecordList
});
case types.GET_RECORD_LIST:
return Object.assign({},state,{
recordList: action.recordList
});
case types.IMPORT_CUSTOMER:
return Object.assign({},state,{
is_import: action.is_import,
errorMeg : action.errorMeg
});
case types.LOAD_REMIND_SETTING:
return Object.assign({},state,{
remindSetting : action.remindSetting
});
case types.LOAD_ATTACHMENTS:
return Object.assign({},state,{
attachments : action.attachments
});
case types.CUSTOM_COMMENTS_LIST:
return Object.assign({},state,{
customCommentsList : action.customCommentsList
});
case types.LOAD_CRM_FORM_LIST:
return Object.assign({},state,{
formBasicList : action.formBasicList
});
default:
return state;
}
}