busiInsurance.js
2.0 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
import * as types from '../constants/ActionTypes'
const initialState = {
productsList: {},
productsDetails: {},
programmesList: {},
programmesDetails: {},
setProgrammesList: {},
insurancesCount: {},
personInsurancesList: {},
personDetails: {},
dealList: {},
importRecordList: {},
importRecordDetails: {},
}
export default function attendance(state = initialState, action) {
switch (action.type) {
case types.GET_PRODUCTS_LIST:
return Object.assign({}, state, {
productsList: action.productsList,
})
break
case types.GET_PRODUCTS_DETAILS:
return Object.assign({}, state, {
productsDetails: action.productsDetails,
})
break
case types.GET_PROGRAMMES_LIST:
return Object.assign({}, state, {
programmesList: action.programmesList,
})
break
case types.GET_PROGRAMMES_DETAILS:
return Object.assign({}, state, {
programmesDetails: action.programmesDetails,
})
break
case types.GET_SET_PROGRAMMES_LIST:
return Object.assign({}, state, {
setProgrammesList: action.setProgrammesList,
})
break
case types.GET_INSURANCES_COUNT:
return Object.assign({}, state, {
insurancesCount: action.insurancesCount,
})
break
case types.GET_PERSON_INSURANCES_LIST:
return Object.assign({}, state, {
personInsurancesList: action.personInsurancesList,
})
break
case types.GET_PERSON_INSURANCES_DETAILS:
return Object.assign({}, state, {
personDetails: action.personDetails,
})
break
case types.GET_DEAL_LIST:
return Object.assign({}, state, {
dealList: action.dealList,
})
case types.GET_IMPORT_RECORD_LIST:
return Object.assign({}, state, {
importRecordList: action.importRecordList,
})
break
case types.GET_IMPORT_RECORD_DETAILS:
return Object.assign({}, state, {
importRecordDetails: action.importRecordDetails,
})
break
default:
return state
}
}