fleetmap-reports 1.0.762 → 1.0.763
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/zone-report.js +10 -8
package/package.json
CHANGED
package/src/zone-report.js
CHANGED
|
@@ -131,7 +131,7 @@ async function processDevices (from, to, devices, userData, data) {
|
|
|
131
131
|
geofencesData.push({
|
|
132
132
|
geofenceId: geofence.id,
|
|
133
133
|
geofenceName: geofence.name,
|
|
134
|
-
days: dataByDay
|
|
134
|
+
days: userData.onlyWithKmsOut ? dataByDay.filter(d => d.distanceOut) : dataByDay
|
|
135
135
|
})
|
|
136
136
|
}
|
|
137
137
|
|
|
@@ -154,12 +154,14 @@ async function processDevices (from, to, devices, userData, data) {
|
|
|
154
154
|
}
|
|
155
155
|
})
|
|
156
156
|
|
|
157
|
-
if (distanceOut || geofences.filter(g => g.distanceIn).length) {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
157
|
+
if (distanceOut > 0.01 || geofences.filter(g => g.distanceIn > 0.01).length) {
|
|
158
|
+
if (!userData.onlyWithKmsOut || distanceOut) {
|
|
159
|
+
groupByDay.push({
|
|
160
|
+
date,
|
|
161
|
+
geofences,
|
|
162
|
+
distanceOut
|
|
163
|
+
})
|
|
164
|
+
}
|
|
163
165
|
}
|
|
164
166
|
}
|
|
165
167
|
|
|
@@ -187,7 +189,7 @@ async function processDevices (from, to, devices, userData, data) {
|
|
|
187
189
|
device: d,
|
|
188
190
|
from,
|
|
189
191
|
to,
|
|
190
|
-
geofences: zoneInOutData
|
|
192
|
+
geofences: userData.onlyWithKmsOut ? zoneInOutData.filter(a => a.distanceOut) : zoneInOutData
|
|
191
193
|
})
|
|
192
194
|
}
|
|
193
195
|
}
|