From fac4b2c8679f459a184c41eeee18f81edbd1ee77 Mon Sep 17 00:00:00 2001 From: Ashutosh Bishnoi Date: Wed, 17 Mar 2021 14:41:21 +0530 Subject: removing hardcoded width value --- modern/src/reports/RouteReportPage.js | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'modern/src/reports') diff --git a/modern/src/reports/RouteReportPage.js b/modern/src/reports/RouteReportPage.js index 3b9e15cc..48a13737 100644 --- a/modern/src/reports/RouteReportPage.js +++ b/modern/src/reports/RouteReportPage.js @@ -5,7 +5,6 @@ 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 }) => { @@ -34,44 +33,44 @@ const RouteReportPage = () => { { headerName: t('positionFixTime'), field: 'fixTime', - width: columnWidthNormal * 2, + flex: 1, valueFormatter: params => formatPosition(params.value, 'fixTime'), }, { headerName: t('positionLatitude'), field: 'latitude', - width: columnWidthNormal, + flex: 1, valueFormatter: params => formatPosition(params.value, 'latitude'), }, { headerName: t('positionLongitude'), field: 'longitude', - width: columnWidthNormal, + flex: 1, valueFormatter: params => formatPosition(params.value, 'longitude'), }, { headerName: t('positionSpeed'), field: 'speed', - width: columnWidthNormal, + flex: 1, valueFormatter: params => formatPosition(params.value, 'speed'), }, { headerName: t('positionAddress'), field: 'address', - width: columnWidthNormal, + flex: 1, valueFormatter: params => formatPosition(params.value, 'address'), }, { headerName: t('positionIgnition'), field: 'ignition', - width: columnWidthNormal, + flex: 1, valueFormatter: params => params.getValue('attributes').ignition ? 'Yes' : 'No', }, { headerName: t('deviceTotalDistance'), hide: true, field: 'totalDistance', - width: columnWidthNormal, + flex: 1, valueFormatter: params => formatDistance(params.getValue('attributes').totalDistance, distanceUnit), }, ] @@ -80,7 +79,11 @@ const RouteReportPage = () => { return ( }> - + ); }; -- cgit v1.2.3