fleetmap-reports 2.0.56 → 2.0.57

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": "2.0.56",
3
+ "version": "2.0.57",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -173,9 +173,15 @@ async function processDevices (from, to, devices, data, userData, traccarInstanc
173
173
  if (userData.groupByDay) {
174
174
  const trips = []
175
175
  for (const t of deviceTrips) {
176
- const isInside = isInsideTimetable(t, userData)
177
- const isPartialInside = await isPartialInsideTimetable(t, userData, deviceRoute)
178
- if (userData.allWeek || !userData.weekDays || isInside || isPartialInside) {
176
+ if (userData.allWeek || !userData.weekDays) {
177
+ trips.push(t)
178
+ continue
179
+ }
180
+ if (isInsideTimetable(t, userData)) {
181
+ trips.push(t)
182
+ continue
183
+ }
184
+ if (await isPartialInsideTimetable(t, userData, deviceRoute)) {
179
185
  trips.push(t)
180
186
  }
181
187
  }