fleetmap-reports 1.0.606 → 1.0.608
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/trip-report.js +6 -2
package/package.json
CHANGED
package/src/trip-report.js
CHANGED
|
@@ -292,7 +292,9 @@ async function exportTripReportToPDF (userData, reportData) {
|
|
|
292
292
|
|
|
293
293
|
tripsData.forEach(function (d, index) {
|
|
294
294
|
const data = []
|
|
295
|
-
const name = userData.byDriver
|
|
295
|
+
const name = userData.byDriver
|
|
296
|
+
? d.driver.name + ((d.driver.attributes && d.driver.attributes.notes) || '')
|
|
297
|
+
: deviceName(d.device)
|
|
296
298
|
const group = userData.byDriver ? userData.groups.find(g => g.drivers && g.drivers.includes(d.id)) : userData.groups.find(g => d.device.groupId === g.id)
|
|
297
299
|
|
|
298
300
|
const space = index === 0 ? 8 : 0
|
|
@@ -487,7 +489,9 @@ function getTripEnd (user, trip) {
|
|
|
487
489
|
function getDriverName (drivers, driverUniqueId) {
|
|
488
490
|
if (driverUniqueId) {
|
|
489
491
|
const driver = drivers.find(d => d.uniqueId === driverUniqueId)
|
|
490
|
-
return driver
|
|
492
|
+
return driver
|
|
493
|
+
? driver.name + ' ' + ((driver.attributes && driver.attributes.notes) || '')
|
|
494
|
+
: driverUniqueId
|
|
491
495
|
}
|
|
492
496
|
|
|
493
497
|
return ''
|