fleetmap-reports 1.0.556 → 1.0.558

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.556",
3
+ "version": "1.0.558",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -256,8 +256,8 @@ async function exportLocationReportToPDF (userData, reportData) {
256
256
  }
257
257
 
258
258
  if (userData.includeDigitalPorts) {
259
- temp.push(getDigitalPortValue(a, 1, translations, d.attributes))
260
- temp.push(getDigitalPortValue(a, 2, translations, d.attributes))
259
+ temp.push(getDigitalPortValue(a, 1, translations, d.device.attributes))
260
+ temp.push(getDigitalPortValue(a, 2, translations, d.device.attributes))
261
261
  }
262
262
  temp.push(a.latitude)
263
263
  temp.push(a.longitude)
@@ -320,7 +320,9 @@ function getDigitalPortValue (row, index, translations, dAttributes) {
320
320
  return translations.report[row.attributes.door1]
321
321
  }
322
322
  if (row.attributes && row.attributes.sensor !== undefined) {
323
- return dAttributes.sensor1On || row.attributes.sensor
323
+ return row.attributes.sensor
324
+ ? dAttributes.sensor1on || row.attributes.sensor
325
+ : dAttributes.sensor1off || row.attributes.sensor
324
326
  }
325
327
  break
326
328
  case 2: