fleetmap-reports 2.0.41 → 2.0.43

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": "2.0.41",
3
+ "version": "2.0.43",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -18,7 +18,7 @@
18
18
  "country-reverse-geocoding": "^0.2.2",
19
19
  "docx": "^7.3.0",
20
20
  "file-saver": "^2.0.5",
21
- "fleetmap-partners": "^1.0.160",
21
+ "fleetmap-partners": "1.0.161",
22
22
  "json-as-xlsx": "2.5.6",
23
23
  "jspdf": "^2.5.1",
24
24
  "jspdf-autotable": "3.8.1",
@@ -714,9 +714,11 @@ function exportZoneReportToExcel (userData, reportData) {
714
714
  { label: translations.report.vehicle, value: 'name' },
715
715
  { label: translations.report.date, value: 'date' }
716
716
  ])
717
- reportData.devices[0].days[0].geofences.forEach(g =>
718
- headers.push({ label: g.geofenceName, value: '' + g.geofenceId })
719
- )
717
+ if (reportData.devices.length) {
718
+ reportData.devices[0].days[0].geofences.forEach(g =>
719
+ headers.push({ label: g.geofenceName, value: '' + g.geofenceId })
720
+ )
721
+ }
720
722
  headers.push({ label: translations.report.distanceOut || 'Kms Afuera', value: 'distanceOut', format: '0' })
721
723
  } else if (userData.tripsBetweenZones) {
722
724
  headers.push(...[