aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-07-13 10:02:44 +0500
committerAbyss777 <abyss@fox5.ru>2017-07-13 12:55:55 +0500
commit4c5cfa14db69d4f7687c7187c81a36b959a0f415 (patch)
tree2fcddf4d1fc2a734534ca9e21e751a9ecd2eb7b5
parent805d50ac020dec042bfc94a1f17869372f7eff0e (diff)
downloadetbsa-traccar-web-4c5cfa14db69d4f7687c7187c81a36b959a0f415.tar.gz
etbsa-traccar-web-4c5cfa14db69d4f7687c7187c81a36b959a0f415.tar.bz2
etbsa-traccar-web-4c5cfa14db69d4f7687c7187c81a36b959a0f415.zip
Use driverUniqueId for trips
-rw-r--r--web/.jshintrc2
-rw-r--r--web/app/AttributeFormatter.js2
-rw-r--r--web/app/model/ReportTrip.js3
-rw-r--r--web/app/view/ReportController.js6
-rw-r--r--web/l10n/en.json1
5 files changed, 9 insertions, 5 deletions
diff --git a/web/.jshintrc b/web/.jshintrc
index cc0cdd4..67329cd 100644
--- a/web/.jshintrc
+++ b/web/.jshintrc
@@ -55,7 +55,7 @@
"proto" : false, // true: Tolerate using the `__proto__` property
"scripturl" : false, // true: Tolerate script-targeted URLs
"shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;`
- "sub" : true, // true: Tolerate using `[]` notation when it can still be expressed in dot notation
+ "sub" : true, // true: Tolerate using `[]` notation when it can still be expressed in dot notation
"supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;`
"validthis" : false, // true: Tolerate using this in a non-constructor function
diff --git a/web/app/AttributeFormatter.js b/web/app/AttributeFormatter.js
index 464314a..3e6758a 100644
--- a/web/app/AttributeFormatter.js
+++ b/web/app/AttributeFormatter.js
@@ -143,6 +143,8 @@ Ext.define('Traccar.AttributeFormatter', {
return this.lastUpdateFormatter;
} else if (key === 'spentFuel') {
return this.numberFormatterFactory(Traccar.Style.numberPrecision, Strings.sharedLiterAbbreviation);
+ } else if (key === 'driverUniqueId') {
+ return this.driverUniqueIdFormatter;
} else {
return this.defaultFormatter;
}
diff --git a/web/app/model/ReportTrip.js b/web/app/model/ReportTrip.js
index 107008e..edff02b 100644
--- a/web/app/model/ReportTrip.js
+++ b/web/app/model/ReportTrip.js
@@ -56,6 +56,9 @@ Ext.define('Traccar.model.ReportTrip', {
name: 'endAddress',
type: 'string'
}, {
+ name: 'driverUniqueId',
+ type: 'string'
+ }, {
name: 'driverName',
type: 'string'
}]
diff --git a/web/app/view/ReportController.js b/web/app/view/ReportController.js
index b478ae9..7dfeaf3 100644
--- a/web/app/view/ReportController.js
+++ b/web/app/view/ReportController.js
@@ -532,9 +532,9 @@ Ext.define('Traccar.view.ReportController', {
dataIndex: 'spentFuel',
renderer: Traccar.AttributeFormatter.getFormatter('spentFuel')
}, {
- text: Strings.reportDriverName,
- dataIndex: 'driverName',
- renderer: Traccar.AttributeFormatter.getFormatter('driverName')
+ text: Strings.sharedDriver,
+ dataIndex: 'driverUniqueId',
+ renderer: Traccar.AttributeFormatter.getFormatter('driverUniqueId')
}],
stopsColumns: [{
diff --git a/web/l10n/en.json b/web/l10n/en.json
index 823066d..404b26f 100644
--- a/web/l10n/en.json
+++ b/web/l10n/en.json
@@ -330,7 +330,6 @@
"reportEndTime": "End Time",
"reportEndAddress": "End Address",
"reportSpentFuel": "Spent Fuel",
- "reportDriverName": "Driver Name",
"statisticsTitle": "Statistics",
"statisticsCaptureTime": "Capture Time",
"statisticsActiveUsers": "Active Users",