aboutsummaryrefslogtreecommitdiff
path: root/modern/src/reports/EventReportPage.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-05-14 16:58:54 -0700
committerAnton Tananaev <anton@traccar.org>2022-05-14 16:58:54 -0700
commit41244e5354fd05ef92d94fda0ceab36b2c23e88d (patch)
tree9b653faf3d10ca083aa5cc5da962dc8716770246 /modern/src/reports/EventReportPage.js
parent8091d156d3379784d8d2f023c0a26944274542fd (diff)
downloadtrackermap-web-41244e5354fd05ef92d94fda0ceab36b2c23e88d.tar.gz
trackermap-web-41244e5354fd05ef92d94fda0ceab36b2c23e88d.tar.bz2
trackermap-web-41244e5354fd05ef92d94fda0ceab36b2c23e88d.zip
Improve report filter
Diffstat (limited to 'modern/src/reports/EventReportPage.js')
-rw-r--r--modern/src/reports/EventReportPage.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/modern/src/reports/EventReportPage.js b/modern/src/reports/EventReportPage.js
index 71ca08d9..33f656b6 100644
--- a/modern/src/reports/EventReportPage.js
+++ b/modern/src/reports/EventReportPage.js
@@ -1,18 +1,19 @@
import React, { useState } from 'react';
import { DataGrid } from '@material-ui/data-grid';
import {
- Grid, FormControl, InputLabel, Select, MenuItem,
+ FormControl, InputLabel, Select, MenuItem,
} from '@material-ui/core';
import { useTheme } from '@material-ui/core/styles';
import { useSelector } from 'react-redux';
import { formatDate } from '../common/util/formatter';
-import ReportFilter from './components/ReportFilter';
+import ReportFilter, { useFilterStyles } from './components/ReportFilter';
import { prefixString } from '../common/util/stringUtils';
import { useTranslation } from '../common/components/LocalizationProvider';
import PageLayout from '../common/components/PageLayout';
import ReportsMenu from './components/ReportsMenu';
const Filter = ({ setItems }) => {
+ const classes = useFilterStyles();
const t = useTranslation();
const [eventTypes, setEventTypes] = useState(['allEvents']);
@@ -37,7 +38,7 @@ const Filter = ({ setItems }) => {
return (
<ReportFilter handleSubmit={handleSubmit}>
- <Grid item xs={12} sm={6}>
+ <div className={classes.item}>
<FormControl variant="filled" fullWidth>
<InputLabel>{t('reportEventTypes')}</InputLabel>
<Select value={eventTypes} onChange={(e) => setEventTypes(e.target.value)} multiple>
@@ -61,7 +62,7 @@ const Filter = ({ setItems }) => {
<MenuItem value="driverChanged">{t('eventDriverChanged')}</MenuItem>
</Select>
</FormControl>
- </Grid>
+ </div>
</ReportFilter>
);
};