fleetmap-reports 1.0.796 → 1.0.798

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": "1.0.796",
3
+ "version": "1.0.798",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -94,7 +94,7 @@ async function createActivityReportByDevice (from, to, userData, traccarInstance
94
94
  to
95
95
  }
96
96
 
97
- if (isClientSide() && allDevices.length > 200) {
97
+ if (isClientSide() && allDevices.length > 20) {
98
98
  const sliced = automaticReports.sliceArray(allDevices, 10)
99
99
  await executeServerSide(allData, sliced, from, to, userData, allDevices.length)
100
100
  } else {
@@ -160,7 +160,7 @@ function processDevices (from, to, devices, data, userData) {
160
160
  if (userData.groupByDay) {
161
161
  const trips = deviceTrips.filter(t => userData.allWeek || !userData.weekDays || isInsideTimetable(t, userData) || isPartialInsideTimetable(t, userData, deviceRoute))
162
162
 
163
- const dates = getDates(from, to)
163
+ const dates = getDates(from, to, userData.user.attributes.timezone)
164
164
  for (const date of dates) {
165
165
  const fromByDay = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0)
166
166
  const toByDay = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 23, 59, 59)