fleetmap-reports 2.0.17 → 2.0.19
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/kms-report.js +1 -1
- package/src/util/utils.js +1 -2
package/package.json
CHANGED
package/src/kms-report.js
CHANGED
|
@@ -45,7 +45,7 @@ async function createKmsReportByDevice (from, to, userData, traccarInstance) {
|
|
|
45
45
|
|
|
46
46
|
if (isClientSide() && (allDevices.length > 50 || ((new Date(to).getTime() - new Date(from).getTime()) > (1000 * 60 * 60 * 24 * 15))) && userData.groupByDay) {
|
|
47
47
|
const sliced = automaticReports.sliceArray(allDevices, 1)
|
|
48
|
-
await executeServerSide('kms-report', allData, sliced, from, to, userData, allDevices.length)
|
|
48
|
+
await executeServerSide('kms-report', allData, sliced, from, to, userData, allDevices.length, traccarInstance)
|
|
49
49
|
} else {
|
|
50
50
|
if (userData.allWeek && userData.groupByDay) {
|
|
51
51
|
const dates = getDates(from, to, userData.user.attributes.timezone || getUserPartner(userData.user).timezone)
|
package/src/util/utils.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
const axios = require('axios')
|
|
2
1
|
const turf = require('@turf/helpers')
|
|
3
2
|
const { getUserPartner } = require('fleetmap-partners')
|
|
4
3
|
const messages = require('../../lang')
|
|
@@ -228,7 +227,7 @@ function weekDaySelected (date, weekDays) {
|
|
|
228
227
|
(date.getDay() === 6 && weekDays.saturday))
|
|
229
228
|
}
|
|
230
229
|
|
|
231
|
-
async function executeServerSide (type, allData, sliced, from, to, userData, totalDevices) {
|
|
230
|
+
async function executeServerSide (type, allData, sliced, from, to, userData, totalDevices, { axios }) {
|
|
232
231
|
let deviceCount = 0
|
|
233
232
|
console.log('PROGRESS_PERC:1')
|
|
234
233
|
const maxRequests = 10
|