From b217a08d311a7c21e88594894c01651c31cbf18e Mon Sep 17 00:00:00 2001 From: Ashutosh Bishnoi Date: Thu, 5 Nov 2020 17:04:13 +0530 Subject: adding custome field to Report Filter on the basis of report type --- modern/src/reports/EventReportPage.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modern/src/reports/EventReportPage.js') diff --git a/modern/src/reports/EventReportPage.js b/modern/src/reports/EventReportPage.js index fce9597f..6aaf4c55 100644 --- a/modern/src/reports/EventReportPage.js +++ b/modern/src/reports/EventReportPage.js @@ -25,13 +25,13 @@ const EventReportPage = () => { const classes = useStyles(); const [data, setData] = useState([]); - const handleSubmit = async (deviceId, from, to) => { + const handleSubmit = async (deviceId, from, to, type) => { const query = new URLSearchParams({ deviceId, from: from.toISOString(), to: to.toISOString(), }); - + type.map(t=>query.append('type',t)); const response = await fetch(`/api/reports/events?${query.toString()}`, { headers: { Accept: 'application/json' } }) if(response.ok) { @@ -47,7 +47,7 @@ const EventReportPage = () => { - + -- cgit v1.2.3