fleetmap-reports 2.0.91 → 2.0.93

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.91",
3
+ "version": "2.0.93",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -69,15 +69,15 @@ function Reports (config, axios) {
69
69
  }
70
70
 
71
71
  this.fuelDropReport = (from, to, userData) => {
72
- return require('./fueldrop-report').createFuelDropReport(from, to, userData, this.traccar)
72
+ return require('./fuel-drop-report').createFuelDropReport(from, to, userData, this.traccar)
73
73
  }
74
74
 
75
75
  this.fuelDropReportToExcel = (userData, reportData) => {
76
- return require('./fueldrop-report').exportFuelDropReportToExcel(userData, reportData)
76
+ return require('./fuel-drop-report').exportFuelDropReportToExcel(userData, reportData)
77
77
  }
78
78
 
79
79
  this.fuelDropReportToPDF = (userData, reportData) => {
80
- return require('./fueldrop-report').exportFuelDropReportToPDF(userData, reportData)
80
+ return require('./fuel-drop-report').exportFuelDropReportToPDF(userData, reportData)
81
81
  }
82
82
 
83
83
  this.eventsReport = (from, to, userData) => {
@@ -93,15 +93,15 @@ function Reports (config, axios) {
93
93
  }
94
94
 
95
95
  this.fuelConsumptionReport = (from, to, userData) => {
96
- return require('./fuelconsumption-report').createFuelConsumptionReport(from, to, userData, this.traccar)
96
+ return require('./fuel-consumption-report').createFuelConsumptionReport(from, to, userData, this.traccar)
97
97
  }
98
98
 
99
99
  this.fuelConsumptionReportToPDF = (userData, reportData) => {
100
- return require('./fuelconsumption-report').exportFuelConsumptionReportToPDF(userData, reportData)
100
+ return require('./fuel-consumption-report').exportFuelConsumptionReportToPDF(userData, reportData)
101
101
  }
102
102
 
103
103
  this.fuelConsumptionReportToExcel = (userData, reportData) => {
104
- return require('./fuelconsumption-report').exportFuelConsumptionReportToExcel(userData, reportData)
104
+ return require('./fuel-consumption-report').exportFuelConsumptionReportToExcel(userData, reportData)
105
105
  }
106
106
 
107
107
  this.locationReport = (from, to, userData) => {
@@ -126,8 +126,9 @@ async function createSpeedingReportByDriver (from, to, userData, traccarInstance
126
126
 
127
127
  async function getEvents (traccarInstance, from, to, devices, userData, deviceCount, totalDevices, sliceSize) {
128
128
  if (processServerSide()) {
129
+ const cookie = await axios.get('/pinmeapi/cookie/get', { withCredentials: true }).then(d => d.data)
129
130
  const url = `https://${getServerHost()}/pinmeapi/reports/speeding-report/getEvents`
130
- return axios.post(url, { from, to, devices, userData, deviceCount, totalDevices, sliceSize }, { withCredentials: true }).then(d => d.data)
131
+ return axios.post(url, { from, to, devices, userData, deviceCount, totalDevices, sliceSize, cookie }, { withCredentials: true }).then(d => d.data)
131
132
  } else {
132
133
  const geofencesFeatures = userData.geofences.filter(g => g.area.startsWith('POLYGON') &&
133
134
  g.attributes.speedLimit).map(g => convertToFeature(g))
File without changes