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 ++++++++++++++++++++ web/l10n/de.json | 4 +++- web/l10n/en.json | 4 +++- 6 files changed, 46 insertions(+), 2 deletions(-) (limited to 'web') diff --git a/web/app/model/ReportStop.js b/web/app/model/ReportStop.js index 1867f73b..9aaa58b0 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 4bc78731..dcc0365c 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 9004b86d..9d45fc87 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 42e099da..9ec75ce2 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', diff --git a/web/l10n/de.json b/web/l10n/de.json index 6f51ec30..9764737c 100644 --- a/web/l10n/de.json +++ b/web/l10n/de.json @@ -383,6 +383,8 @@ "reportEndTime": "Zielzeit", "reportEndAddress": "Zielort", "reportSpentFuel": "Kraftstoffverbrauch", + "reportStartOdometer": "Kilometerzähler Start", + "reportEndOdometer": "Kilometerzähler End", "statisticsTitle": "Statistiken", "statisticsCaptureTime": "Zeitpunkt", "statisticsActiveUsers": "Aktive Benutzer", @@ -410,4 +412,4 @@ "categoryTractor": "Traktor", "categoryTruck": "LKW", "categoryVan": "Van" -} \ No newline at end of file +} diff --git a/web/l10n/en.json b/web/l10n/en.json index 1ebccbd3..c13a5016 100644 --- a/web/l10n/en.json +++ b/web/l10n/en.json @@ -383,6 +383,8 @@ "reportEndTime": "End Time", "reportEndAddress": "End Address", "reportSpentFuel": "Spent Fuel", + "reportStartOdometer": "Odometer Start", + "reportEndOdometer": "Odometer End", "statisticsTitle": "Statistics", "statisticsCaptureTime": "Capture Time", "statisticsActiveUsers": "Active Users", @@ -410,4 +412,4 @@ "categoryTractor": "Tractor", "categoryTruck": "Truck", "categoryVan": "Van" -} \ No newline at end of file +} -- cgit v1.2.3 From 9accdf2c8c6873a4174f2da6ea89e6a7760e08e4 Mon Sep 17 00:00:00 2001 From: Christoph Krey Date: Mon, 16 Apr 2018 07:38:56 +0200 Subject: [NEW] add German for OdometerInReports --- web/l10n/de.json | 2 ++ 1 file changed, 2 insertions(+) (limited to 'web') diff --git a/web/l10n/de.json b/web/l10n/de.json index 9764737c..d7948e85 100644 --- a/web/l10n/de.json +++ b/web/l10n/de.json @@ -197,6 +197,8 @@ "positionOutput": "Output", "positionBatteryLevel": "Batteriestand", "positionFuelConsumption": "Kraftstoffverbrauch", + "reportStartOdometer": "Kilometerzähler Start", + "reportEndOdometer": "Kilometerzähler Ende", "positionRfid": "RFID", "positionVersionFw": "Firmware Version", "positionVersionHw": "Hardware Version", -- cgit v1.2.3 From 5defdfeb901434458dbcbc4ca7eb0c164a6f71c0 Mon Sep 17 00:00:00 2001 From: Christoph Krey Date: Mon, 16 Apr 2018 08:03:25 +0200 Subject: [FIX] no eol at end of xx.json --- web/l10n/de.json | 6 ++---- web/l10n/en.json | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'web') diff --git a/web/l10n/de.json b/web/l10n/de.json index d7948e85..f54a0aa1 100644 --- a/web/l10n/de.json +++ b/web/l10n/de.json @@ -197,8 +197,6 @@ "positionOutput": "Output", "positionBatteryLevel": "Batteriestand", "positionFuelConsumption": "Kraftstoffverbrauch", - "reportStartOdometer": "Kilometerzähler Start", - "reportEndOdometer": "Kilometerzähler Ende", "positionRfid": "RFID", "positionVersionFw": "Firmware Version", "positionVersionHw": "Hardware Version", @@ -386,7 +384,7 @@ "reportEndAddress": "Zielort", "reportSpentFuel": "Kraftstoffverbrauch", "reportStartOdometer": "Kilometerzähler Start", - "reportEndOdometer": "Kilometerzähler End", + "reportEndOdometer": "Kilometerzähler Ende", "statisticsTitle": "Statistiken", "statisticsCaptureTime": "Zeitpunkt", "statisticsActiveUsers": "Aktive Benutzer", @@ -414,4 +412,4 @@ "categoryTractor": "Traktor", "categoryTruck": "LKW", "categoryVan": "Van" -} +} \ No newline at end of file diff --git a/web/l10n/en.json b/web/l10n/en.json index c13a5016..920d6c88 100644 --- a/web/l10n/en.json +++ b/web/l10n/en.json @@ -412,4 +412,4 @@ "categoryTractor": "Tractor", "categoryTruck": "Truck", "categoryVan": "Van" -} +} \ No newline at end of file -- cgit v1.2.3