fleetmap-reports 2.0.67 → 2.0.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetmap-reports",
3
- "version": "2.0.67",
3
+ "version": "2.0.69",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -497,7 +497,7 @@ function exportActivityReportToPDFVehicleGroupByDay (doc, translations, reportDa
497
497
  getSumAvgSpeed(d.summary, userData),
498
498
  getSumMaxSpeed(d.summary, userData),
499
499
  convertMS(d.summary.reduce((a, b) => a + b.engineHours, 0)),
500
- getSumSpentFuel(d.summary, userData)]
500
+ Math.round(getSumSpentFuel(d.summary, userData))]
501
501
 
502
502
  const style = getStyle(getUserPartner(userData.user))
503
503
  addTable(doc, headers, data, footValues, style, 40)
package/src/index.js CHANGED
@@ -203,5 +203,15 @@ function Reports (config, axios) {
203
203
  this.dailyUseReportToExcel = (userData, reportData) => {
204
204
  return require('./partnerReports/dailyuse-report').exportDailyUseReportToExcel(userData, reportData)
205
205
  }
206
+
207
+ this.gpsJumpReport = (from, to, userData) => {
208
+ return require('./partnerReports/gpsjump-report').createGPSJumpReport(from, to, userData, this.traccar)
209
+ }
210
+ this.gpsJumpReportToPDF = (userData, reportData) => {
211
+ return require('./partnerReports/gpsjump-report').exportGPSJumpReportToPDF(userData, reportData)
212
+ }
213
+ this.gpsJumpReportToExcel = (userData, reportData) => {
214
+ return require('./partnerReports/gpsjump-report').exportGPSJumpReportToExcel(userData, reportData)
215
+ }
206
216
  }
207
217
  module.exports = Reports
@@ -53,4 +53,14 @@ function getDeviceData (allInOne, d, user, minDistance) {
53
53
  }).filter(a => a)
54
54
  }
55
55
 
56
+ async function exportGPSJumpReportToPDF (userData, reportData) {
57
+
58
+ }
59
+
60
+ async function exportGPSJumpReportToExcel (userData, reportData) {
61
+
62
+ }
63
+
56
64
  exports.createGPSJumpReport = createGPSJumpReport
65
+ exports.exportGPSJumpReportToPDF = exportGPSJumpReportToPDF
66
+ exports.exportGPSJumpReportToExcel = exportGPSJumpReportToExcel