aboutsummaryrefslogtreecommitdiff
path: root/web/app/model
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-07-12 16:37:06 +0500
committerAbyss777 <abyss@fox5.ru>2017-07-12 16:37:06 +0500
commit805d50ac020dec042bfc94a1f17869372f7eff0e (patch)
tree23b6796be4ef9cc53ba27f04911b1634762a3dca /web/app/model
parenteea84149b22ed25fa530bbb4159683f802c4dee1 (diff)
downloadetbsa-traccar-web-805d50ac020dec042bfc94a1f17869372f7eff0e.tar.gz
etbsa-traccar-web-805d50ac020dec042bfc94a1f17869372f7eff0e.tar.bz2
etbsa-traccar-web-805d50ac020dec042bfc94a1f17869372f7eff0e.zip
Implement Driver Unauthorized event and driverName field in Trip report
Diffstat (limited to 'web/app/model')
-rw-r--r--web/app/model/Event.js3
-rw-r--r--web/app/model/ReportTrip.js3
2 files changed, 6 insertions, 0 deletions
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'
}]
});