From 805d50ac020dec042bfc94a1f17869372f7eff0e Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Wed, 12 Jul 2017 16:37:06 +0500 Subject: Implement Driver Unauthorized event and driverName field in Trip report --- web/app/store/PositionAttributes.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'web/app/store/PositionAttributes.js') diff --git a/web/app/store/PositionAttributes.js b/web/app/store/PositionAttributes.js index 0a6572dd..44bfa92f 100644 --- a/web/app/store/PositionAttributes.js +++ b/web/app/store/PositionAttributes.js @@ -233,6 +233,11 @@ Ext.define('Traccar.store.PositionAttributes', { key: 'result', name: Strings.eventCommandResult, valueType: 'string' + }, { + key: 'driverUniqueId', + name: Strings.positionDriverUniqueId, + valueType: 'string', + dataType: 'driverUniqueId' }], getAttributeName: function (key, capitalize) { -- cgit v1.2.3 From d40b862b56075e1544d3ed117576e05354b398a1 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Fri, 14 Jul 2017 12:39:04 +0500 Subject: Implement driverChanged event instead of driverUnauthorized --- web/app/model/Event.js | 4 ++-- web/app/store/PositionAttributes.js | 4 ---- web/l10n/en.json | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) (limited to 'web/app/store/PositionAttributes.js') diff --git a/web/app/model/Event.js b/web/app/model/Event.js index da866b4c..9455b0dd 100644 --- a/web/app/model/Event.js +++ b/web/app/model/Event.js @@ -51,8 +51,8 @@ Ext.define('Traccar.model.Event', { text = Strings[alarmKey] || alarmKey; } else if (rec.get('type') === 'textMessage') { text = Strings.eventTextMessage + ': ' + rec.get('attributes')['message']; - } else if (rec.get('type') === 'driverUnauthorized') { - text = Strings.eventDriverUnauthorized + ': ' + Traccar.AttributeFormatter.driverUniqueIdFormatter( + } else if (rec.get('type') === 'driverChanged') { + text = Strings.eventDriverChanged + ': ' + Traccar.AttributeFormatter.driverUniqueIdFormatter( rec.get('attributes')['driverUniqueId']); } else { text = Traccar.app.getEventString(rec.get('type')); diff --git a/web/app/store/PositionAttributes.js b/web/app/store/PositionAttributes.js index 44bfa92f..c3d6d180 100644 --- a/web/app/store/PositionAttributes.js +++ b/web/app/store/PositionAttributes.js @@ -120,10 +120,6 @@ Ext.define('Traccar.store.PositionAttributes', { name: Strings.positionFuelConsumption, valueType: 'number', dataType: 'consumption' - }, { - key: 'rfid', - name: Strings.positionRfid, - valueType: 'string' }, { key: 'versionFw', name: Strings.positionVersionFw, diff --git a/web/l10n/en.json b/web/l10n/en.json index 404b26f7..ba34d066 100644 --- a/web/l10n/en.json +++ b/web/l10n/en.json @@ -272,7 +272,7 @@ "eventIgnitionOff": "Ignition is OFF", "eventMaintenance": "Maintenance required", "eventTextMessage": "Text message received", - "eventDriverUnauthorized": "Driver Unauthorized", + "eventDriverChanged": "Driver has changed", "eventsScrollToLast": "Scroll To Last", "alarmSos": "SOS Alarm", "alarmVibration": "Vibration Alarm", -- cgit v1.2.3