fleetmap-reports 1.0.522 → 1.0.524
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/index.test.js +1 -1
- package/src/speeding-report.js +2 -2
package/package.json
CHANGED
package/src/index.test.js
CHANGED
|
@@ -28,7 +28,7 @@ describe('Test_Reports', function () {
|
|
|
28
28
|
new Date(Date.UTC(2022, 9, 22, 23, 59, 59, 0)),
|
|
29
29
|
userData)
|
|
30
30
|
console.log(await report.speedingReportToPDF(userData, data))
|
|
31
|
-
},
|
|
31
|
+
}, 40000)
|
|
32
32
|
|
|
33
33
|
it('converts madrid time', async () => {
|
|
34
34
|
assert.equal(false, utils.isClientSide())
|
package/src/speeding-report.js
CHANGED
|
@@ -80,7 +80,7 @@ async function createSpeedingReportByDevice (from, to, userData, traccarInstance
|
|
|
80
80
|
xpert: devices.filter(d => d && d.attributes && d.attributes.xpert).length > 0
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
const _sliced = automaticReports.sliceArray(automaticReports.sliceArray(devices,
|
|
83
|
+
const _sliced = automaticReports.sliceArray(automaticReports.sliceArray(devices, 5), 5)
|
|
84
84
|
|
|
85
85
|
let deviceCount = 0
|
|
86
86
|
for (const sliced of _sliced) {
|
|
@@ -105,7 +105,7 @@ async function createSpeedingReportByDriver (from, to, userData, traccarInstance
|
|
|
105
105
|
const devices = await drivers.devicesByDriver(traccarInstance, from, to, userData.drivers, userData.devices)
|
|
106
106
|
console.log('Devices with driver', devices.length)
|
|
107
107
|
const _drivers = []
|
|
108
|
-
const sliced = automaticReports.sliceArray(devices,
|
|
108
|
+
const sliced = automaticReports.sliceArray(devices, 5)
|
|
109
109
|
let deviceCount = 0
|
|
110
110
|
for (const slice of sliced) {
|
|
111
111
|
const { routes, events } = await getEvents(traccarInstance, from, to, slice, userData, deviceCount, devices.length, slice.length)
|