fleetmap-reports 1.0.446 → 1.0.447

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.446",
3
+ "version": "1.0.447",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -219,6 +219,7 @@ function exportSpeedingReportToExcel (userData, reportData) {
219
219
  { label: translations.report.eventType, value: 'eventType' },
220
220
  { label: translations.report.date, value: 'fixTime' },
221
221
  { label: translations.report.address, value: 'address' },
222
+ { label: translations.report.driver, value: 'driver' },
222
223
  { label: translations.report.info, value: 'info' }
223
224
  ]
224
225
  let data = []
@@ -230,7 +231,8 @@ function exportSpeedingReportToExcel (userData, reportData) {
230
231
  eventType: a.type === 'alarm' ? translations.report['event_' + a.attributes.alarm] : translations.report['event_' + a.type],
231
232
  fixTime: getAlertDate(userData.user, a),
232
233
  address: a.geofenceName || (a.position ? a.position.address : ''),
233
- info: getAlertInfo(userData.drivers, a)
234
+ info: getAlertInfo(userData.drivers, a),
235
+ driver: a.driver
234
236
  }
235
237
  }))
236
238
  })
@@ -262,7 +264,7 @@ function getAlertInfo (drivers, alert) {
262
264
  const driver = drivers.find(d => d.uniqueId === alert.attributes.driverUniqueId)
263
265
  return driver ? driver.name : alert.attributes.driverUniqueId
264
266
  }
265
- return alert.driver
267
+ return ''
266
268
  }
267
269
 
268
270
  function getAlertDate (user, alert) {