aboutsummaryrefslogtreecommitdiff
path: root/modern/src/reports/EventReportPage.js
diff options
context:
space:
mode:
authorAshutosh Bishnoi <mail2bishnoi@gmail.com>2020-11-05 17:04:13 +0530
committerAshutosh Bishnoi <mail2bishnoi@gmail.com>2020-11-05 17:04:13 +0530
commitb217a08d311a7c21e88594894c01651c31cbf18e (patch)
tree06c41262aa486d87a81ebea2aef30631d9db7a0d /modern/src/reports/EventReportPage.js
parent3780cf9986947e409ffccd9e7a06d9554ce3cdcf (diff)
downloadetbsa-traccar-web-b217a08d311a7c21e88594894c01651c31cbf18e.tar.gz
etbsa-traccar-web-b217a08d311a7c21e88594894c01651c31cbf18e.tar.bz2
etbsa-traccar-web-b217a08d311a7c21e88594894c01651c31cbf18e.zip
adding custome field to Report Filter on the basis of report type
Diffstat (limited to 'modern/src/reports/EventReportPage.js')
-rw-r--r--modern/src/reports/EventReportPage.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/modern/src/reports/EventReportPage.js b/modern/src/reports/EventReportPage.js
index fce9597..6aaf4c5 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 = () => {
<Grid container spacing={2}>
<Grid item xs={12} md={3} lg={2}>
<Paper className={classes.form}>
- <ReportFilter handleSubmit={handleSubmit} />
+ <ReportFilter reportType='event' handleSubmit={handleSubmit} />
</Paper>
</Grid>
<Grid item xs={12} md={9} lg={10}>