diff options
author | Anton Tananaev <anton@traccar.org> | 2022-08-02 07:50:08 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-08-02 07:50:08 -0700 |
commit | 0d9573c2145a6e2df3d43ef4e192529654bc65de (patch) | |
tree | 55394bbf7fdad784331cc7781454e791ccf8172b /modern/src/reports/SummaryReportPage.js | |
parent | f57d9020d5031744e3e0e19ac8178cc8f7010f03 (diff) | |
download | trackermap-web-0d9573c2145a6e2df3d43ef4e192529654bc65de.tar.gz trackermap-web-0d9573c2145a6e2df3d43ef4e192529654bc65de.tar.bz2 trackermap-web-0d9573c2145a6e2df3d43ef4e192529654bc65de.zip |
Multi device route (fix #998)
Diffstat (limited to 'modern/src/reports/SummaryReportPage.js')
-rw-r--r-- | modern/src/reports/SummaryReportPage.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modern/src/reports/SummaryReportPage.js b/modern/src/reports/SummaryReportPage.js index b8ec9283..77c42cba 100644 --- a/modern/src/reports/SummaryReportPage.js +++ b/modern/src/reports/SummaryReportPage.js @@ -18,7 +18,6 @@ import useReportStyles from './common/useReportStyles'; import TableShimmer from '../common/components/TableShimmer'; const columnsArray = [ - ['deviceId', 'sharedDevice'], ['startTime', 'reportStartDate'], ['distance', 'sharedDistance'], ['startOdometer', 'reportStartOdometer'], @@ -40,7 +39,7 @@ const SummaryReportPage = () => { const speedUnit = useAttributePreference('speedUnit'); const volumeUnit = useAttributePreference('volumeUnit'); - const [columns, setColumns] = usePersistedState('summaryColumns', ['deviceId', 'startTime', 'distance', 'averageSpeed']); + const [columns, setColumns] = usePersistedState('summaryColumns', ['startTime', 'distance', 'averageSpeed']); const [daily, setDaily] = useState(false); const [items, setItems] = useState([]); const [loading, setLoading] = useState(false); @@ -98,7 +97,7 @@ const SummaryReportPage = () => { return ( <PageLayout menu={<ReportsMenu />} breadcrumbs={['reportTitle', 'reportSummary']}> <div className={classes.header}> - <ReportFilter handleSubmit={handleSubmit} multiDevice> + <ReportFilter handleSubmit={handleSubmit} multiDevice includeGroups> <div className={classes.filterItem}> <FormControl fullWidth> <InputLabel>{t('sharedType')}</InputLabel> @@ -114,12 +113,14 @@ const SummaryReportPage = () => { <Table> <TableHead> <TableRow> + <TableCell>{t('sharedDevice')}</TableCell> {columns.map((key) => (<TableCell key={key}>{t(columnsMap.get(key))}</TableCell>))} </TableRow> </TableHead> <TableBody> {!loading ? items.map((item) => ( <TableRow key={(`${item.deviceId}_${Date.parse(item.startTime)}`)}> + <TableCell>{devices[item.deviceId].name}</TableCell> {columns.map((key) => ( <TableCell key={key}> {formatValue(item, key)} |