fleetmap-reports 2.0.218 → 2.0.219

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.218",
3
+ "version": "2.0.219",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -120,7 +120,8 @@ async function getAllInOne (
120
120
  sliceSize = 5,
121
121
  devicesPerRequest = 1,
122
122
  counter = undefined,
123
- ignorePercentage = false) {
123
+ ignorePercentage = false,
124
+ filter) {
124
125
  let url = `/reports/allinone?from=${from.toISOString()}&to=${to.toISOString()}`
125
126
  if (getRoutes) url += '&type=route'
126
127
  if (getTrips) url += '&type=trips'
@@ -136,7 +137,7 @@ async function getAllInOne (
136
137
  console.log(u)
137
138
  requests.push(
138
139
  getItems(traccar, u, _chunk, counter, devicesPerRequest, ignorePercentage, totalDevices, currentDeviceCount,
139
- !getTrips && !getStops && !getSummary)
140
+ !getTrips && !getStops && !getSummary, filter)
140
141
  )
141
142
  }
142
143
  const now = new Date()
@@ -30,7 +30,7 @@ const fileName = 'ZoneReport'
30
30
  async function process (traccar, from, to, slice, deviceCount, devices, reportRangeDays, userData) {
31
31
  const data = await traccarHelper.getAllInOne(
32
32
  traccar, from, to, slice, true, false, false, false,
33
- deviceCount, devices.length, sliceSize, reportRangeDays > 29 ? 1 : deviceChunk, undefined, filterPositions)
33
+ deviceCount, devices.length, sliceSize, reportRangeDays > 29 ? 1 : deviceChunk, undefined, true)
34
34
 
35
35
  const route = filterPositions(data.route)
36
36
  const alerts = []