From be47d612285d484e2d0a2aa43174fb8e36acd816 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Thu, 14 Sep 2017 09:38:14 +0500 Subject: Improve command type formatting --- web/app/AttributeFormatter.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'web/app/AttributeFormatter.js') diff --git a/web/app/AttributeFormatter.js b/web/app/AttributeFormatter.js index 8a9e3dc..289aff9 100644 --- a/web/app/AttributeFormatter.js +++ b/web/app/AttributeFormatter.js @@ -130,6 +130,11 @@ Ext.define('Traccar.AttributeFormatter', { return null; }, + commandTypeFormatter: function (value) { + var name = Strings['command' + value.charAt(0).toUpperCase() + value.slice(1)]; + return name ? name : value; + }, + defaultFormatter: function (value) { if (typeof value === 'number') { return Number(value.toFixed(Traccar.Style.numberPrecision)); @@ -175,6 +180,8 @@ Ext.define('Traccar.AttributeFormatter', { return this.volumeFormatter; case 'driverUniqueId': return this.driverUniqueIdFormatter; + case 'commandType': + return this.commandTypeFormatter; default: return this.defaultFormatter; } -- cgit v1.2.3