attendance.js
1.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
import * as types from '../constants/ActionTypes'
const initialState = {
attendanceRecordAbsentData: [],
attendanceRecordClockData: [],
attendanceStatistics_list: [],
attendanceDetaileData: null,
attendanceWayListData: [],
}
export default function attendance(state = initialState, action) {
switch (action.type) {
case types.GET_ATTENDANCE_RECORD_ABSENT:
return Object.assign({}, state, {
attendanceRecordAbsentData: action.attendanceRecordAbsentData
})
break
case types.GET_ATTENDANCE_RECORD_CLOCK:
return Object.assign({}, state, {
attendanceRecordClockData: action.attendanceRecordClockData
})
break
case types.ATTENDANCESTATISTICS_LIST:
return Object.assign({}, state, {
attendanceStatistics_list: action.attendanceStatistics_list
})
break
case types.ATTENDANCE_DETAILE_DATA:
return Object.assign({}, state, {
attendanceDetaileData: action.attendanceDetaileData
})
break
case types.GET_ATTENDANCE_WAY_LIST:
return Object.assign({}, state, {
attendanceWayListData: action.attendanceWayListData
})
break
default:
return state
}
}