add date range picker to the incidents screen
This commit is contained in:
@@ -36,9 +36,11 @@ export const addNewMapping = (dispatch, mapping) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const fetchIncidents = (dispatch) => {
|
||||
export const fetchIncidents = (dispatch, dateRange) => {
|
||||
dispatch({type: FETCH_INCIDENTS_PENDING});
|
||||
API.get('integration/report/allIncidents')
|
||||
API.get('integration/report/allIncidents', {
|
||||
dateRange
|
||||
})
|
||||
.then(response => {
|
||||
dispatch({type: FETCH_INCIDENTS_SUCCESS, payload: response.data});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user