From 6422cbef5728dd18dfe22f1cc02e72e7ae0a8f60 Mon Sep 17 00:00:00 2001 From: Christoph Krey Date: Sat, 14 Apr 2018 18:48:41 +0200 Subject: [NEW] Feature Request: Add Odometer to Summary, Trips, and Stops Reports #652 --- web/app/model/ReportStop.js | 4 ++++ web/app/model/ReportSummary.js | 8 ++++++++ web/app/model/ReportTrip.js | 8 ++++++++ web/app/view/ReportController.js | 20 ++++++++++++++++++++ 4 files changed, 40 insertions(+) (limited to 'web/app') diff --git a/web/app/model/ReportStop.js b/web/app/model/ReportStop.js index 1867f73..9aaa58b 100644 --- a/web/app/model/ReportStop.js +++ b/web/app/model/ReportStop.js @@ -33,6 +33,10 @@ Ext.define('Traccar.model.ReportStop', { name: 'startTime', type: 'date', dateFormat: 'c' + }, { + name: 'startOdometer', + type: 'float', + convert: Traccar.AttributeFormatter.getConverter('distance') }, { name: 'address', type: 'string' diff --git a/web/app/model/ReportSummary.js b/web/app/model/ReportSummary.js index 4bc7873..dcc0365 100644 --- a/web/app/model/ReportSummary.js +++ b/web/app/model/ReportSummary.js @@ -38,6 +38,14 @@ Ext.define('Traccar.model.ReportSummary', { name: 'distance', type: 'float', convert: Traccar.AttributeFormatter.getConverter('distance') + }, { + name: 'startOdometer', + type: 'float', + convert: Traccar.AttributeFormatter.getConverter('distance') + }, { + name: 'endOdometer', + type: 'float', + convert: Traccar.AttributeFormatter.getConverter('distance') }, { name: 'engineHours', type: 'int' diff --git a/web/app/model/ReportTrip.js b/web/app/model/ReportTrip.js index 9004b86..9d45fc8 100644 --- a/web/app/model/ReportTrip.js +++ b/web/app/model/ReportTrip.js @@ -38,6 +38,14 @@ Ext.define('Traccar.model.ReportTrip', { name: 'distance', type: 'float', convert: Traccar.AttributeFormatter.getConverter('distance') + }, { + name: 'startOdometer', + type: 'float', + convert: Traccar.AttributeFormatter.getConverter('distance') + }, { + name: 'endOdometer', + type: 'float', + convert: Traccar.AttributeFormatter.getConverter('distance') }, { name: 'duration', type: 'int' diff --git a/web/app/view/ReportController.js b/web/app/view/ReportController.js index 42e099d..9ec75ce 100644 --- a/web/app/view/ReportController.js +++ b/web/app/view/ReportController.js @@ -520,6 +520,14 @@ Ext.define('Traccar.view.ReportController', { text: Strings.sharedDistance, dataIndex: 'distance', renderer: Traccar.AttributeFormatter.getFormatter('distance') + }, { + text: Strings.reportStartOdometer, + dataIndex: 'startOdometer', + renderer: Traccar.AttributeFormatter.getFormatter('distance'), + }, { + text: Strings.reportEndOdometer, + dataIndex: 'endOdometer', + renderer: Traccar.AttributeFormatter.getFormatter('distance'), }, { text: Strings.reportAverageSpeed, dataIndex: 'averageSpeed', @@ -547,6 +555,10 @@ Ext.define('Traccar.view.ReportController', { dataIndex: 'startTime', xtype: 'datecolumn', renderer: Traccar.AttributeFormatter.getFormatter('startTime') + }, { + text: Strings.reportStartOdometer, + dataIndex: 'startOdometer', + renderer: Traccar.AttributeFormatter.getFormatter('distance'), }, { text: Strings.reportStartAddress, dataIndex: 'startAddress', @@ -556,6 +568,10 @@ Ext.define('Traccar.view.ReportController', { dataIndex: 'endTime', xtype: 'datecolumn', renderer: Traccar.AttributeFormatter.getFormatter('endTime') + }, { + text: Strings.reportEndOdometer, + dataIndex: 'endOdometer', + renderer: Traccar.AttributeFormatter.getFormatter('distance'), }, { text: Strings.reportEndAddress, dataIndex: 'endAddress', @@ -595,6 +611,10 @@ Ext.define('Traccar.view.ReportController', { dataIndex: 'startTime', xtype: 'datecolumn', renderer: Traccar.AttributeFormatter.getFormatter('startTime') + }, { + text: Strings.reportStartOdometer, + dataIndex: 'startOdometer', + renderer: Traccar.AttributeFormatter.getFormatter('distance'), }, { text: Strings.positionAddress, dataIndex: 'address', -- cgit v1.2.3