aboutsummaryrefslogtreecommitdiff
path: root/modern/src/reports/RouteReportPage.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-09-03 09:41:20 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-09-03 09:41:20 -0700
commit6ac6ceaed16b2ae5ef58ba599d24a868ac2f816a (patch)
treeedd24c732d6439e6fb3c03f021d9f0842468d474 /modern/src/reports/RouteReportPage.js
parent105e4ec887e249ec47db83095504012bad22df80 (diff)
downloadetbsa-traccar-web-6ac6ceaed16b2ae5ef58ba599d24a868ac2f816a.tar.gz
etbsa-traccar-web-6ac6ceaed16b2ae5ef58ba599d24a868ac2f816a.tar.bz2
etbsa-traccar-web-6ac6ceaed16b2ae5ef58ba599d24a868ac2f816a.zip
Finish migrations
Diffstat (limited to 'modern/src/reports/RouteReportPage.js')
-rw-r--r--modern/src/reports/RouteReportPage.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/modern/src/reports/RouteReportPage.js b/modern/src/reports/RouteReportPage.js
index fe43342..3be2107 100644
--- a/modern/src/reports/RouteReportPage.js
+++ b/modern/src/reports/RouteReportPage.js
@@ -32,12 +32,12 @@ const Filter = ({ setItems }) => {
};
const RouteReportPage = () => {
+ const theme = useTheme();
const t = useTranslation();
const distanceUnit = useAttributePreference('distanceUnit');
const speedUnit = useAttributePreference('speedUnit');
const coordinateFormat = usePreference('coordinateFormat');
- const theme = useTheme();
const columns = [{
headerName: t('positionFixTime'),
@@ -62,7 +62,7 @@ const RouteReportPage = () => {
field: 'speed',
type: 'number',
width: theme.dimensions.columnWidthString,
- valueFormatter: ({ value }) => formatSpeed(value, speedUnit),
+ valueFormatter: ({ value }) => formatSpeed(value, speedUnit, t),
}, {
headerName: t('positionAddress'),
field: 'address',
@@ -74,7 +74,7 @@ const RouteReportPage = () => {
type: 'boolean',
width: theme.dimensions.columnWidthBoolean,
valueGetter: ({ row }) => row.attributes.ignition,
- valueFormatter: ({ value }) => formatBoolean(value),
+ valueFormatter: ({ value }) => formatBoolean(value, t),
}, {
headerName: t('deviceTotalDistance'),
field: 'totalDistance',
@@ -82,7 +82,7 @@ const RouteReportPage = () => {
hide: true,
width: theme.dimensions.columnWidthNumber,
valueGetter: ({ row }) => row.attributes.totalDistance,
- valueFormatter: ({ value }) => formatDistance(value, distanceUnit),
+ valueFormatter: ({ value }) => formatDistance(value, distanceUnit, t),
}];
const [items, setItems] = useState([]);