From 1a7f95baad1939589e6a23bd31b42b8e094a736a Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Thu, 25 Apr 2024 20:18:35 -0600 Subject: Modifications for clients --- src/common/components/PositionValue.jsx | 5 +- src/main/DeviceRow.jsx | 3 +- src/resources/images/icon/car.svg | 76 +-------------------- src/resources/images/icon/pickup.svg | 99 +-------------------------- src/resources/images/icon/tractor.svg | 64 +----------------- src/resources/images/icon/truck.svg | 116 +------------------------------- 6 files changed, 13 insertions(+), 350 deletions(-) diff --git a/src/common/components/PositionValue.jsx b/src/common/components/PositionValue.jsx index b1f8f656..8be686e3 100644 --- a/src/common/components/PositionValue.jsx +++ b/src/common/components/PositionValue.jsx @@ -83,7 +83,10 @@ const PositionValue = ({ position, property, attribute }) => { case 'totalDistance': return value != null ? formatDistance(value, distanceUnit, t) : ''; case 'hours': - return value != null ? formatNumericHours(value, t) : ''; + const v = position.attributes.hasOwnProperty('io16') + ? (parseInt(position.attributes.io16) * 60 * 1000) + : value; + return v != null ? formatNumericHours(v, t) : ''; default: if (typeof value === 'number') { return formatNumber(value); diff --git a/src/main/DeviceRow.jsx b/src/main/DeviceRow.jsx index bf0103cc..d9357c9d 100644 --- a/src/main/DeviceRow.jsx +++ b/src/main/DeviceRow.jsx @@ -114,8 +114,7 @@ const DeviceRow = ({ data, index, style }) => { } return ( <> - {deviceSecondary && item[deviceSecondary] && `${item[deviceSecondary]} • `} - {status} + {deviceSecondary && item[deviceSecondary] && item[deviceSecondary]} {/* RATIONALE: clients want more info in the list */} {position && positionItems.split(',').filter((key) => position.hasOwnProperty(key) || position.attributes.hasOwnProperty(key)).map((key) => ( - + + diff --git a/src/resources/images/icon/pickup.svg b/src/resources/images/icon/pickup.svg index f38ec291..db4494b7 100644 --- a/src/resources/images/icon/pickup.svg +++ b/src/resources/images/icon/pickup.svg @@ -1,97 +1,2 @@ - - + + diff --git a/src/resources/images/icon/tractor.svg b/src/resources/images/icon/tractor.svg index 42ed763d..3a9e9f25 100644 --- a/src/resources/images/icon/tractor.svg +++ b/src/resources/images/icon/tractor.svg @@ -1,62 +1,2 @@ - - + + diff --git a/src/resources/images/icon/truck.svg b/src/resources/images/icon/truck.svg index 481d89a2..df5c164c 100644 --- a/src/resources/images/icon/truck.svg +++ b/src/resources/images/icon/truck.svg @@ -1,114 +1,2 @@ - - + + -- cgit v1.2.3