fleetmap-reports 1.0.441 → 1.0.444
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/events-report.js +1 -1
- package/src/speeding-report.js +1 -1
- package/src/trip-report.js +1 -1
package/package.json
CHANGED
package/src/events-report.js
CHANGED
|
@@ -261,7 +261,7 @@ function getAlertInfo (drivers, alert) {
|
|
|
261
261
|
const driver = drivers.find(d => d.uniqueId === alert.attributes.driverUniqueId)
|
|
262
262
|
return driver ? driver.name : alert.attributes.driverUniqueId
|
|
263
263
|
}
|
|
264
|
-
return
|
|
264
|
+
return alert.driver
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
function getAlertDate (user, alert) {
|
package/src/speeding-report.js
CHANGED
|
@@ -76,7 +76,7 @@ async function createSpeedingReportByDevice (from, to, userData, traccarInstance
|
|
|
76
76
|
xpert: devices.filter(d => d && d.attributes && d.attributes.xpert).length > 0
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
const sliced = automaticReports.sliceArray(devices,
|
|
79
|
+
const sliced = automaticReports.sliceArray(devices, 10)
|
|
80
80
|
|
|
81
81
|
let deviceCount = 0
|
|
82
82
|
for (const slice of sliced) {
|
package/src/trip-report.js
CHANGED
|
@@ -276,7 +276,7 @@ async function exportTripReportToPDF (userData, reportData) {
|
|
|
276
276
|
tripsData.forEach(function (d, index) {
|
|
277
277
|
const data = []
|
|
278
278
|
const name = userData.byDriver ? d.driver.name : deviceName(d.device)
|
|
279
|
-
const group = userData.byDriver ? userData.groups.find(g => g.drivers.includes(d.id)) : userData.groups.find(g => d.device.groupId === g.id)
|
|
279
|
+
const group = userData.byDriver ? userData.groups.find(g => g.drivers && g.drivers.includes(d.id)) : userData.groups.find(g => d.device.groupId === g.id)
|
|
280
280
|
|
|
281
281
|
const space = index === 0 ? 8 : 0
|
|
282
282
|
if (index) {
|