fleetmap-reports 1.0.561 → 1.0.563

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.561",
3
+ "version": "1.0.563",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -229,7 +229,9 @@ function exportSpeedingReportToExcel (userData, reportData) {
229
229
  { label: translations.report.date, value: 'fixTime' },
230
230
  { label: translations.report.address, value: 'address' },
231
231
  { label: translations.report.driver, value: 'driver' },
232
- { label: translations.report.info, value: 'info' }
232
+ { label: translations.report.info, value: 'info' },
233
+ { label: 'Latitude', value: 'latitude' },
234
+ { label: 'Longitude', value: 'longitude' }
233
235
  ]
234
236
  let data = []
235
237
  if (reportData.devices) {
@@ -241,7 +243,9 @@ function exportSpeedingReportToExcel (userData, reportData) {
241
243
  fixTime: getAlertDate(userData.user, a),
242
244
  address: a.geofenceName || (a.position ? a.position.address : ''),
243
245
  info: getAlertInfo(userData.drivers, a),
244
- driver: a.driver
246
+ driver: a.driver,
247
+ latitude: a.position && a.position.latitude,
248
+ longitude: a.position && a.position.longitude
245
249
  }
246
250
  }))
247
251
  })
@@ -107,7 +107,7 @@ async function createLocationReportByDevice (from, to, userData, traccar) {
107
107
  return allData
108
108
  }
109
109
 
110
- function processDevices (from, to, devices, data, userData) {
110
+ function processDevices (from, to, devices, data) {
111
111
  const devicesResult = []
112
112
 
113
113
  for (const d of devices) {
@@ -313,7 +313,7 @@ function getDigitalPort2Label (row, translations) {
313
313
  return row.attributes.door2 || translations.report.digital_ports2
314
314
  }
315
315
 
316
- export function getDigitalPortValue (row, index, translations, dAttributes) {
316
+ function getDigitalPortValue (row, index, translations, dAttributes) {
317
317
  switch (index) {
318
318
  case 1:
319
319
  if (row.attributes && row.attributes.door1 !== undefined) {
@@ -450,3 +450,4 @@ function getMaxSpeed (data) {
450
450
  exports.createLocationReport = createLocationReport
451
451
  exports.exportLocationReportToPDF = exportLocationReportToPDF
452
452
  exports.exportLocationReportToExcel = exportLocationReportToExcel
453
+ exports.getDigitalPortValue = getDigitalPortValue