fleetmap-reports 2.0.58 → 2.0.59
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/util/traccar.js +2 -0
package/package.json
CHANGED
package/src/util/traccar.js
CHANGED
|
@@ -132,6 +132,7 @@ async function getAllInOne (
|
|
|
132
132
|
async function getSummaryByDay (dates, userData, traccarInstance, allDevices, ignorePercentage = false, from, to) {
|
|
133
133
|
const days = []
|
|
134
134
|
let counter = 0
|
|
135
|
+
console.log('dates', dates.length)
|
|
135
136
|
for (const [index, date] of dates.entries()) {
|
|
136
137
|
let startDateLocal = new Date(convertFromUTC(date, userData.user.attributes.timezone).toISOString().split('T')[0] + ' ' + userData.dayHours.startTime)
|
|
137
138
|
if (index === 0) {
|
|
@@ -140,6 +141,7 @@ async function getSummaryByDay (dates, userData, traccarInstance, allDevices, ig
|
|
|
140
141
|
startDateLocal = startDateLocal.getTime() > _startDateLocal.getTime() ? startDateLocal : _startDateLocal
|
|
141
142
|
}
|
|
142
143
|
|
|
144
|
+
console.log(convertFromUTC(date, userData.user.attributes.timezone).toISOString().split('T')[0] + ' ' + userData.dayHours.endTime)
|
|
143
145
|
let endDateLocal = new Date(convertFromUTC(date, userData.user.attributes.timezone).toISOString().split('T')[0] + ' ' + userData.dayHours.endTime)
|
|
144
146
|
if (index === dates.length - 1) {
|
|
145
147
|
const _endDateLocal = new Date(convertFromUTC(date, userData.user.attributes.timezone).toISOString().split('T')[0] + ' ' + (isClientSide() ? to.toTimeString().slice(0, 8) : convertFromUTC(to, userData.user.attributes.timezone).toTimeString().slice(0, 8)))
|