aboutsummaryrefslogtreecommitdiff
path: root/modern/src/common/components/PositionValue.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/common/components/PositionValue.jsx')
-rw-r--r--modern/src/common/components/PositionValue.jsx16
1 files changed, 11 insertions, 5 deletions
diff --git a/modern/src/common/components/PositionValue.jsx b/modern/src/common/components/PositionValue.jsx
index 64f9dc04..b1f8f656 100644
--- a/modern/src/common/components/PositionValue.jsx
+++ b/modern/src/common/components/PositionValue.jsx
@@ -25,6 +25,7 @@ import { useTranslation } from './LocalizationProvider';
import { useAdministrator } from '../util/permissions';
import AddressValue from './AddressValue';
import GeofencesValue from './GeofencesValue';
+import DriverValue from './DriverValue';
const PositionValue = ({ position, property, attribute }) => {
const t = useTranslation();
@@ -97,26 +98,31 @@ const PositionValue = ({ position, property, attribute }) => {
case 'image':
case 'video':
case 'audio':
- return (<Link href={`/api/media/${device.uniqueId}/${value}`} target="_blank">{value}</Link>);
+ return <Link href={`/api/media/${device.uniqueId}/${value}`} target="_blank">{value}</Link>;
case 'totalDistance':
case 'hours':
return (
<>
{formatValue(value)}
&nbsp;&nbsp;
- {admin && (<Link component={RouterLink} underline="none" to={`/settings/accumulators/${position.deviceId}`}>&#9881;</Link>)}
+ {admin && <Link component={RouterLink} underline="none" to={`/settings/accumulators/${position.deviceId}`}>&#9881;</Link>}
</>
);
case 'address':
- return (<AddressValue latitude={position.latitude} longitude={position.longitude} originalAddress={value} />);
+ return <AddressValue latitude={position.latitude} longitude={position.longitude} originalAddress={value} />;
case 'network':
if (value) {
- return (<Link component={RouterLink} underline="none" to={`/network/${position.id}`}>{t('sharedInfoTitle')}</Link>);
+ return <Link component={RouterLink} underline="none" to={`/network/${position.id}`}>{t('sharedInfoTitle')}</Link>;
}
return '';
case 'geofenceIds':
if (value) {
- return (<GeofencesValue geofenceIds={value} />);
+ return <GeofencesValue geofenceIds={value} />;
+ }
+ return '';
+ case 'driverUniqueId':
+ if (value) {
+ return <DriverValue driverUniqueId={value} />;
}
return '';
default: