aboutsummaryrefslogtreecommitdiff
path: root/modern/src/reports/SummaryReportPage.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/SummaryReportPage.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/SummaryReportPage.js')
-rw-r--r--modern/src/reports/SummaryReportPage.js19
1 files changed, 4 insertions, 15 deletions
diff --git a/modern/src/reports/SummaryReportPage.js b/modern/src/reports/SummaryReportPage.js
index e2f5e009..a66d1c61 100644
--- a/modern/src/reports/SummaryReportPage.js
+++ b/modern/src/reports/SummaryReportPage.js
@@ -2,11 +2,10 @@ import React, { useState } from 'react';
import {
FormControl, InputLabel, Select, MenuItem, Table, TableHead, TableRow, TableBody, TableCell,
} from '@mui/material';
-import { makeStyles } from '@mui/styles';
import {
formatDistance, formatHours, formatDate, formatSpeed, formatVolume,
} from '../common/util/formatter';
-import ReportFilter, { useFilterStyles } from './components/ReportFilter';
+import ReportFilter from './components/ReportFilter';
import { useAttributePreference } from '../common/util/preferences';
import { useTranslation } from '../common/components/LocalizationProvider';
import PageLayout from '../common/components/PageLayout';
@@ -14,6 +13,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 columnsArray = [
['startTime', 'reportStartDate'],
@@ -27,19 +27,8 @@ const columnsArray = [
];
const columnsMap = new Map(columnsArray);
-const useStyles = makeStyles(() => ({
- header: {
- position: 'sticky',
- left: 0,
- display: 'flex',
- flexDirection: 'column',
- alignItems: 'stretch',
- },
-}));
-
const SummaryReportPage = () => {
- const classes = useStyles();
- const filterClasses = useFilterStyles();
+ const classes = useReportStyles();
const t = useTranslation();
const distanceUnit = useAttributePreference('distanceUnit');
@@ -93,7 +82,7 @@ const SummaryReportPage = () => {
<PageLayout menu={<ReportsMenu />} breadcrumbs={['reportTitle', 'reportSummary']}>
<div className={classes.header}>
<ReportFilter handleSubmit={handleSubmit}>
- <div className={filterClasses.item}>
+ <div className={classes.filterItem}>
<FormControl fullWidth>
<InputLabel>{t('sharedType')}</InputLabel>
<Select label={t('sharedType')} value={daily} onChange={(e) => setDaily(e.target.value)}>