diff --git a/src/settings/MaintenancePage.jsx b/src/settings/MaintenancePage.jsx index 491a0d3bd0..c88c1ced67 100644 --- a/src/settings/MaintenancePage.jsx +++ b/src/settings/MaintenancePage.jsx @@ -53,11 +53,14 @@ const MaintenancePage = () => { setLabels({ ...labels, start: null, period: t('sharedDays') }); } else if (attribute && attribute.dataType) { switch (attribute.dataType) { + case 'speed': + setLabels({ ...labels, start: t(prefixString('shared', speedUnit)), period: t(prefixString('shared', speedUnit)) }); + break; case 'distance': setLabels({ ...labels, start: t(prefixString('shared', distanceUnit)), period: t(prefixString('shared', distanceUnit)) }); break; - case 'speed': - setLabels({ ...labels, start: t(prefixString('shared', speedUnit)), period: t(prefixString('shared', speedUnit)) }); + case 'hours': + setLabels({ ...labels, start: t('sharedHours'), period: t('sharedHours') }); break; default: setLabels({ ...labels, start: null, period: null }); @@ -82,6 +85,8 @@ const MaintenancePage = () => { return speedFromKnots(value, speedUnit); case 'distance': return distanceFromMeters(value, distanceUnit); + case 'hours': + return value / 3600000; default: return value; } @@ -102,6 +107,8 @@ const MaintenancePage = () => { return speedToKnots(value, speedUnit); case 'distance': return distanceToMeters(value, distanceUnit); + case 'hours': + return value * 3600000; default: return value; }