fleetmap-reports 1.0.316 → 1.0.317
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/idle-report.js +4 -2
package/package.json
CHANGED
package/src/idle-report.js
CHANGED
|
@@ -107,10 +107,12 @@ function processDevices(from, to, devices, routes, userData) {
|
|
|
107
107
|
}
|
|
108
108
|
})
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
const filteredEvents = idleEvents.filter(e => userData.minimumIdleMinutes ? e.idleTime > userData.minimumIdleMinutes*60*1000 : true)
|
|
111
|
+
|
|
112
|
+
if(filteredEvents.length) {
|
|
111
113
|
const deviceData = {
|
|
112
114
|
device: d,
|
|
113
|
-
idleEvents:
|
|
115
|
+
idleEvents: filteredEvents
|
|
114
116
|
}
|
|
115
117
|
devicesResult.push(deviceData)
|
|
116
118
|
}
|