aboutsummaryrefslogtreecommitdiff
path: root/modern/src/reports
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-06-15 18:49:15 -0700
committerAnton Tananaev <anton@traccar.org>2022-06-15 18:49:15 -0700
commit5154c9be13ad1446b09feaaa843e621555ac7581 (patch)
treeb6af81051fb500cb228476a64f90b1fe376ae5e3 /modern/src/reports
parentc407acaadc5dadbc7db917a11c8294aa7710b2cc (diff)
downloadtrackermap-web-5154c9be13ad1446b09feaaa843e621555ac7581.tar.gz
trackermap-web-5154c9be13ad1446b09feaaa843e621555ac7581.tar.bz2
trackermap-web-5154c9be13ad1446b09feaaa843e621555ac7581.zip
Address for trips and stops
Diffstat (limited to 'modern/src/reports')
-rw-r--r--modern/src/reports/StopReportPage.js3
-rw-r--r--modern/src/reports/TripReportPage.js5
2 files changed, 8 insertions, 0 deletions
diff --git a/modern/src/reports/StopReportPage.js b/modern/src/reports/StopReportPage.js
index c5bb1003..9e42cb33 100644
--- a/modern/src/reports/StopReportPage.js
+++ b/modern/src/reports/StopReportPage.js
@@ -20,6 +20,7 @@ import useReportStyles from './common/useReportStyles';
import MapPositions from '../map/MapPositions';
import MapView from '../map/core/MapView';
import MapCamera from '../map/MapCamera';
+import AddressValue from '../common/components/AddressValue';
const columnsArray = [
['startTime', 'reportStartTime'],
@@ -73,6 +74,8 @@ const StopReportPage = () => {
return formatHours(item[key]);
case 'spentFuel':
return formatVolume(item[key], volumeUnit, t);
+ case 'address':
+ return (<AddressValue latitude={item.latitude} longitude={item.longitude} originalAddress={item[key]} />);
default:
return item[key];
}
diff --git a/modern/src/reports/TripReportPage.js b/modern/src/reports/TripReportPage.js
index 4b8f4d40..d2b4d9ef 100644
--- a/modern/src/reports/TripReportPage.js
+++ b/modern/src/reports/TripReportPage.js
@@ -18,6 +18,7 @@ import { useCatch, useEffectAsync } from '../reactHelper';
import useReportStyles from './common/useReportStyles';
import MapView from '../map/core/MapView';
import MapRoutePath from '../map/MapRoutePath';
+import AddressValue from '../common/components/AddressValue';
const columnsArray = [
['startTime', 'reportStartTime'],
@@ -103,6 +104,10 @@ const TripReportPage = () => {
return formatHours(item[key]);
case 'spentFuel':
return formatVolume(item[key], volumeUnit, t);
+ case 'startAddress':
+ return (<AddressValue latitude={item.startLat} longitude={item.startLon} originalAddress={item[key]} />);
+ case 'endAddress':
+ return (<AddressValue latitude={item.endLat} longitude={item.endLon} originalAddress={item[key]} />);
default:
return item[key];
}