diff options
Diffstat (limited to 'modern')
-rw-r--r-- | modern/src/common/style.js | 1 | ||||
-rw-r--r-- | modern/src/reports/RouteReportPage.js | 17 |
2 files changed, 10 insertions, 8 deletions
diff --git a/modern/src/common/style.js b/modern/src/common/style.js new file mode 100644 index 00000000..fa2e41ef --- /dev/null +++ b/modern/src/common/style.js @@ -0,0 +1 @@ +export const columnWidthNormal = 100;
\ No newline at end of file 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> ); }; |