fleetmap-reports 1.0.789 → 1.0.791
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/activity-report.js +5 -4
package/package.json
CHANGED
package/src/activity-report.js
CHANGED
|
@@ -81,11 +81,11 @@ async function executeServerSide (allData, sliced, from, to, userData, totalDevi
|
|
|
81
81
|
const data = await axios.post(url, {
|
|
82
82
|
from,
|
|
83
83
|
to,
|
|
84
|
-
|
|
85
|
-
userData,
|
|
84
|
+
devices,
|
|
85
|
+
userData: { ...userData, devices },
|
|
86
86
|
deviceCount,
|
|
87
87
|
totalDevices,
|
|
88
|
-
sliceSize:
|
|
88
|
+
sliceSize: 20
|
|
89
89
|
}, { withCredentials: true }).then(d => d.data)
|
|
90
90
|
|
|
91
91
|
allData.devices.push(...(data[0].devices))
|
|
@@ -103,11 +103,12 @@ async function createActivityReportByDevice (from, to, userData, traccarInstance
|
|
|
103
103
|
to
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
const sliced = automaticReports.sliceArray(allDevices, 50)
|
|
107
106
|
if (isClientSide() && allDevices.length > 200) {
|
|
107
|
+
const sliced = automaticReports.sliceArray(allDevices, 20)
|
|
108
108
|
await executeServerSide(allData, sliced, from, to, userData, allDevices.length)
|
|
109
109
|
} else {
|
|
110
110
|
let deviceCount = 0
|
|
111
|
+
const sliced = automaticReports.sliceArray(allDevices, 10)
|
|
111
112
|
for (const devices of sliced) {
|
|
112
113
|
let summaries = []
|
|
113
114
|
const needRoute = userData.groupByDay || !userData.allWeek
|