mirror of
https://github.com/traccar/traccar-web.git
synced 2025-01-08 12:07:27 +08:00
Fix number formatting
This commit is contained in:
parent
860e980c17
commit
f6d15a1a44
@ -23,11 +23,11 @@ export const formatNumber = (value, precision = 1) => Number(value.toFixed(preci
|
||||
|
||||
export const formatPercentage = (value) => `${value}%`;
|
||||
|
||||
export const formatTemperature = (value) => `${value}°C`;
|
||||
export const formatTemperature = (value) => `${value.toFixed(1)}°C`;
|
||||
|
||||
export const formatVoltage = (value, t) => `${value} ${t('sharedVoltAbbreviation')}`;
|
||||
export const formatVoltage = (value, t) => `${value.toFixed(2)} ${t('sharedVoltAbbreviation')}`;
|
||||
|
||||
export const formatConsumption = (value, t) => `${value} ${t('sharedLiterPerHourAbbreviation')}`;
|
||||
export const formatConsumption = (value, t) => `${value.toFixed(2)} ${t('sharedLiterPerHourAbbreviation')}`;
|
||||
|
||||
export const formatTime = (value, format, hours12) => {
|
||||
if (value) {
|
||||
|
Loading…
Reference in New Issue
Block a user