aboutsummaryrefslogtreecommitdiff
path: root/modern/src/reports/EventReportPage.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-05-28 06:58:47 -0700
committerAnton Tananaev <anton@traccar.org>2022-05-28 06:58:47 -0700
commitab26340ead6eba063734286a374101951d08688b (patch)
treed4a66f1ce400f2922d701aae1d5f8d0b59d383c2 /modern/src/reports/EventReportPage.js
parent01c61772eef07a7a9aa1beb9d99ed801721e456a (diff)
downloadtrackermap-web-ab26340ead6eba063734286a374101951d08688b.tar.gz
trackermap-web-ab26340ead6eba063734286a374101951d08688b.tar.bz2
trackermap-web-ab26340ead6eba063734286a374101951d08688b.zip
Unify report styles
Diffstat (limited to 'modern/src/reports/EventReportPage.js')
-rw-r--r--modern/src/reports/EventReportPage.js19
1 files changed, 4 insertions, 15 deletions
diff --git a/modern/src/reports/EventReportPage.js b/modern/src/reports/EventReportPage.js
index 504534a2..447adaef 100644
--- a/modern/src/reports/EventReportPage.js
+++ b/modern/src/reports/EventReportPage.js
@@ -3,9 +3,8 @@ import {
FormControl, InputLabel, Select, MenuItem, Table, TableHead, TableRow, TableCell, TableBody,
} from '@mui/material';
import { useSelector } from 'react-redux';
-import { makeStyles } from '@mui/styles';
import { formatDate } from '../common/util/formatter';
-import ReportFilter, { useFilterStyles } from './components/ReportFilter';
+import ReportFilter from './components/ReportFilter';
import { prefixString } from '../common/util/stringUtils';
import { useTranslation } from '../common/components/LocalizationProvider';
import PageLayout from '../common/components/PageLayout';
@@ -13,6 +12,7 @@ import ReportsMenu from './components/ReportsMenu';
import usePersistedState from '../common/util/usePersistedState';
import ColumnSelect from './components/ColumnSelect';
import { useCatch } from '../reactHelper';
+import useReportStyles from './common/useReportStyles';
const typesArray = [
['allEvents', 'eventAll'],
@@ -44,19 +44,8 @@ const columnsArray = [
];
const columnsMap = new Map(columnsArray);
-const useStyles = makeStyles(() => ({
- header: {
- position: 'sticky',
- left: 0,
- display: 'flex',
- flexDirection: 'column',
- alignItems: 'stretch',
- },
-}));
-
const EventReportPage = () => {
- const classes = useStyles();
- const filterClasses = useFilterStyles();
+ const classes = useReportStyles();
const t = useTranslation();
const geofences = useSelector((state) => state.geofences.items);
@@ -110,7 +99,7 @@ const EventReportPage = () => {
<PageLayout menu={<ReportsMenu />} breadcrumbs={['reportTitle', 'reportEvents']}>
<div className={classes.header}>
<ReportFilter handleSubmit={handleSubmit}>
- <div className={filterClasses.item}>
+ <div className={classes.filterItem}>
<FormControl fullWidth>
<InputLabel>{t('reportEventTypes')}</InputLabel>
<Select