fleetmap-reports 1.0.606 → 1.0.607

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.606",
3
+ "version": "1.0.607",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -135,7 +135,7 @@ async function getEvents (traccarInstance, from, to, devices, userData, deviceCo
135
135
 
136
136
  const events = []
137
137
  if (userData.roadSpeedLimits) {
138
- const hereResults = await getHereEvents(devices, routes, userData.maxSpeedThreshold, userData.minimumIdleTime)
138
+ const hereResults = await getHereEvents(devices, routes, userData.maxSpeedThreshold, userData.minimumIdleMinutes)
139
139
  console.log('got', hereResults.length, 'from here')
140
140
  events.push(...hereResults)
141
141
  } else if (!userData.useVehicleSpeedLimit && userData.customSpeed) {
@@ -23,7 +23,7 @@ describe('speeding tests', function () {
23
23
  assert.equal(device.alerts.length, 104) // Total Alerts
24
24
  console.log(device.alerts)
25
25
 
26
- userData.minimumIdleTime = 1
26
+ userData.minimumIdleMinutes = 1
27
27
  const r = await getSpeedingReport(report, userData)
28
28
  r.device.alerts.forEach(a => assert.equal(true, a.eventTime >= 60000))
29
29
  assert.equal(r.device.alerts.length, 6) // Total Alerts
@@ -487,7 +487,9 @@ function getTripEnd (user, trip) {
487
487
  function getDriverName (drivers, driverUniqueId) {
488
488
  if (driverUniqueId) {
489
489
  const driver = drivers.find(d => d.uniqueId === driverUniqueId)
490
- return driver ? driver.name : driverUniqueId
490
+ return driver
491
+ ? driver.name + ' ' + ((driver.attributes && driver.attributes.notes) || '')
492
+ : driverUniqueId
491
493
  }
492
494
 
493
495
  return ''