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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetmap-reports",
3
- "version": "1.0.316",
3
+ "version": "1.0.317",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -107,10 +107,12 @@ function processDevices(from, to, devices, routes, userData) {
107
107
  }
108
108
  })
109
109
 
110
- if(idleEvents.length) {
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: idleEvents.filter(e => userData.minimumIdleMinutes ? e.idleTime > userData.minimumIdleMinutes*60*1000 : true)
115
+ idleEvents: filteredEvents
114
116
  }
115
117
  devicesResult.push(deviceData)
116
118
  }