fleetmap-reports 1.0.506 → 1.0.508
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 +1 -1
- package/src/speeding-report.js +2 -2
package/package.json
CHANGED
package/src/speeding-report.js
CHANGED
|
@@ -80,7 +80,7 @@ async function createSpeedingReportByDevice (from, to, userData, traccarInstance
|
|
|
80
80
|
xpert: devices.filter(d => d && d.attributes && d.attributes.xpert).length > 0
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
const _sliced = automaticReports.sliceArray(automaticReports.sliceArray(devices, 10),
|
|
83
|
+
const _sliced = automaticReports.sliceArray(automaticReports.sliceArray(devices, 10), 10)
|
|
84
84
|
|
|
85
85
|
let deviceCount = 0
|
|
86
86
|
for (const sliced of _sliced) {
|
|
@@ -241,7 +241,7 @@ async function findEventsPosition (from, to, devices, events, routes, userData)
|
|
|
241
241
|
const positions = routes.filter(p => p.deviceId === d.id)
|
|
242
242
|
for (const a of deviceEvents) {
|
|
243
243
|
const pIndex = positions.findIndex(p => p.id === a.positionId)
|
|
244
|
-
if (pIndex
|
|
244
|
+
if (pIndex >= 0) {
|
|
245
245
|
let geofence = null
|
|
246
246
|
if (a.geofenceId) {
|
|
247
247
|
geofence = userData.geofences.find(g => g.id === a.geofenceId)
|