fleetmap-reports 2.0.348 → 2.0.350
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
package/src/refueling-report.js
CHANGED
|
@@ -198,7 +198,7 @@ function analyseRouteRefueling (data, d, refuelingPositions) {
|
|
|
198
198
|
if (diff > 5 && !refuelingActivated) {
|
|
199
199
|
refuelingActivated = true
|
|
200
200
|
currentValue = diff
|
|
201
|
-
} else if (refuelingActivated && currentValue
|
|
201
|
+
} else if (refuelingActivated && currentValue < diff) {
|
|
202
202
|
currentValue = diff
|
|
203
203
|
} else {
|
|
204
204
|
if (currentValue > 20) {
|
package/src/speeding-report.js
CHANGED
|
@@ -134,7 +134,7 @@ async function getEvents (traccarInstance, from, to, devices, userData, deviceCo
|
|
|
134
134
|
const url = `https://${getServerHost()}/pinmeapi/reports/speeding-report/getEvents`
|
|
135
135
|
return axios.post(url, { from, to, devices, userData, deviceCount, totalDevices, sliceSize, cookie }, { withCredentials: true }).then(d => d.data)
|
|
136
136
|
} else {
|
|
137
|
-
const geofencesFeatures = userData.geofences.filter(g => g.area.startsWith('POLYGON') &&
|
|
137
|
+
const geofencesFeatures = userData.geofences.filter(g => g.area && g.area.startsWith('POLYGON') &&
|
|
138
138
|
g.attributes.speedLimit).map(g => convertToFeature(g))
|
|
139
139
|
|
|
140
140
|
const allInOne = await traccarHelper.getAllInOne(traccarInstance, from, to, devices, true, false,
|