provident.js
1.6 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
import * as types from '../constants/ActionTypes';
const initialState = {
customerProvidentListCount:0,
customerProvidentList:[],
payingList: [],
payingListCount: 0,
supplementList: [],
supplementListCount: 0,
stopList: [],
stopListCount: 0,
addList: [],
addListCount: 0
};
export default function environment(state = initialState, action) {
switch (action.type) {
case types.GET_CUSTOMER_PROVIDENT_LIST:
return Object.assign({}, state, {
customerProvidentList: action.customerProvidentList,
customerProvidentListCount: action.customerProvidentListCount
});
break;
case types.GET_PROVIDENT_PAYING_LIST:
return Object.assign({}, state, {
payingList: action.payingList,
payingListCount: action.payingListCount
});
break;
case types.GET_PROVIDENT_SUPPLEMENT_LIST:
return Object.assign({}, state, {
supplementList: action.supplementList,
supplementListCount: action.supplementListCount
});
break;
case types.GET_PROVIDENT_STOP_LIST:
return Object.assign({}, state, {
stopList: action.stopList,
stopListCount: action.stopListCount
});
break;
case types.GET_PROVIDENT_ADD_LIST:
return Object.assign({}, state, {
addList: action.addList,
addListCount: action.addListCount
});
break;
default:
return state;
}
}