add date range picker to the incidents screen

This commit is contained in:
Bilal Catic
2019-06-17 20:10:57 +02:00
parent dc0efa5cea
commit 69cc120f54
6 changed files with 134 additions and 6 deletions

View File

@@ -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});
})