blob: abd7dd1458a7a7aed26287710dec5a642dd8a7ca (
plain)
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
|
import actions from '../../actions'
import { connect } from 'react-redux'
import ShiftVJComponent from '../../components/tools/ShiftVehicleJourney'
const mapStateToProps = (state, ownProps) => {
return {
modal: state.modal,
vehicleJourneys: state.vehicleJourneys,
status: state.status,
disabled: ownProps.disabled
}
}
const mapDispatchToProps = (dispatch) => {
return {
onModalClose: () =>{
dispatch(actions.closeModal())
},
onOpenShiftModal: () =>{
dispatch(actions.openShiftModal())
},
onShiftVehicleJourney: (data) =>{
dispatch(actions.shiftVehicleJourney(data))
}
}
}
const ShiftVehicleJourney = connect(mapStateToProps, mapDispatchToProps)(ShiftVJComponent)
export default ShiftVehicleJourney
|