diff options
author | Ashutosh Bishnoi <mail2bishnoi@gmail.com> | 2020-11-27 16:31:49 +0530 |
---|---|---|
committer | Ashutosh Bishnoi <mail2bishnoi@gmail.com> | 2020-11-27 16:31:49 +0530 |
commit | 9c2dbcf00b944cca546875af4f0bcab695119a40 (patch) | |
tree | a6ff401d8ccd615abfd9166f1d45a5626c479ac1 /modern/src/common/formatter.js | |
parent | 032d1a787384430a5bd93a3caf7e92bb0a5fa8aa (diff) | |
download | etbsa-traccar-web-9c2dbcf00b944cca546875af4f0bcab695119a40.tar.gz etbsa-traccar-web-9c2dbcf00b944cca546875af4f0bcab695119a40.tar.bz2 etbsa-traccar-web-9c2dbcf00b944cca546875af4f0bcab695119a40.zip |
Chart report code improvements and refactoring
Diffstat (limited to 'modern/src/common/formatter.js')
-rw-r--r-- | modern/src/common/formatter.js | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/modern/src/common/formatter.js b/modern/src/common/formatter.js index b2f305a..e41e591 100644 --- a/modern/src/common/formatter.js +++ b/modern/src/common/formatter.js @@ -80,26 +80,3 @@ export const formatVolume = (value, unit) => { export const formatHours = (value) => { return moment.duration(value).humanize(); }; - -const speedConverter = (value, unit) => { - switch (unit) { - case 'kmh': - return (value * 1.852).toFixed(2); - case 'mph': - return (value * 1.15078).toFixed(2); - case 'kn': - default: - return (value * 1).toFixed(2); - } -}; - -export const getConverter = (key) => { - switch (key) { - case 'speed': - return speedConverter; - default: - return function (value) { - return value; - } - } -}; |