aboutsummaryrefslogtreecommitdiff
path: root/modern/src/reports/RouteReportPage.js
diff options
context:
space:
mode:
authorAshutosh Bishnoi <mail2bishnoi@gmail.com>2021-03-16 15:45:54 +0530
committerAshutosh Bishnoi <mail2bishnoi@gmail.com>2021-03-16 15:45:54 +0530
commit1a8ce85b311b3e80aba5df573259e119ae18fa0c (patch)
tree23f8842bc76a596fdad3146ede5a1034a47266a7 /modern/src/reports/RouteReportPage.js
parent8de3b938369ea1e9437b4345d83a50e974f8a606 (diff)
downloadtrackermap-web-1a8ce85b311b3e80aba5df573259e119ae18fa0c.tar.gz
trackermap-web-1a8ce85b311b3e80aba5df573259e119ae18fa0c.tar.bz2
trackermap-web-1a8ce85b311b3e80aba5df573259e119ae18fa0c.zip
Minor code improvements
Diffstat (limited to 'modern/src/reports/RouteReportPage.js')
-rw-r--r--modern/src/reports/RouteReportPage.js17
1 files changed, 9 insertions, 8 deletions
diff --git a/modern/src/reports/RouteReportPage.js b/modern/src/reports/RouteReportPage.js
index ff4a0033..3b9e15cc 100644
--- a/modern/src/reports/RouteReportPage.js
+++ b/modern/src/reports/RouteReportPage.js
@@ -5,6 +5,7 @@ import { formatPosition, formatDistance } from '../common/formatter';
import ReportFilter from './ReportFilter';
import ReportLayoutPage from './ReportLayoutPage';
import { useAttributePreference } from '../common/preferences';
+import { columnWidthNormal } from '../common/style';
const Filter = ({ setItems }) => {
@@ -33,44 +34,44 @@ const RouteReportPage = () => {
{
headerName: t('positionFixTime'),
field: 'fixTime',
- width: 200,
+ width: columnWidthNormal * 2,
valueFormatter: params => formatPosition(params.value, 'fixTime'),
},
{
headerName: t('positionLatitude'),
field: 'latitude',
- width: 130,
+ width: columnWidthNormal,
valueFormatter: params => formatPosition(params.value, 'latitude'),
},
{
headerName: t('positionLongitude'),
field: 'longitude',
- width: 130,
+ width: columnWidthNormal,
valueFormatter: params => formatPosition(params.value, 'longitude'),
},
{
headerName: t('positionSpeed'),
field: 'speed',
- width: 130,
+ width: columnWidthNormal,
valueFormatter: params => formatPosition(params.value, 'speed'),
},
{
headerName: t('positionAddress'),
field: 'address',
- width: 130,
+ width: columnWidthNormal,
valueFormatter: params => formatPosition(params.value, 'address'),
},
{
headerName: t('positionIgnition'),
field: 'ignition',
- width: 130,
+ width: columnWidthNormal,
valueFormatter: params => params.getValue('attributes').ignition ? 'Yes' : 'No',
},
{
headerName: t('deviceTotalDistance'),
hide: true,
field: 'totalDistance',
- width: 160,
+ width: columnWidthNormal,
valueFormatter: params => formatDistance(params.getValue('attributes').totalDistance, distanceUnit),
},
]
@@ -79,7 +80,7 @@ const RouteReportPage = () => {
return (
<ReportLayoutPage filter={<Filter setItems={setItems} />}>
- <DataGrid rows={items} columns={columns} pageSize={25}/>
+ <DataGrid rows={items} columns={columns} hideFooter/>
</ReportLayoutPage>
);
};