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/model/Event.js | 3 +++ web/app/model/ReportTrip.js | 3 +++ 2 files changed, 6 insertions(+) (limited to 'web/app/model') diff --git a/web/app/model/Event.js b/web/app/model/Event.js index 70fab17..da866b4 100644 --- a/web/app/model/Event.js +++ b/web/app/model/Event.js @@ -51,6 +51,9 @@ 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( + rec.get('attributes')['driverUniqueId']); } else { text = Traccar.app.getEventString(rec.get('type')); } diff --git a/web/app/model/ReportTrip.js b/web/app/model/ReportTrip.js index d243a8a..107008e 100644 --- a/web/app/model/ReportTrip.js +++ b/web/app/model/ReportTrip.js @@ -55,5 +55,8 @@ Ext.define('Traccar.model.ReportTrip', { }, { name: 'endAddress', type: 'string' + }, { + name: 'driverName', + type: 'string' }] }); -- cgit v1.2.3