fleetmap-reports 2.0.298 → 2.0.300

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.298",
3
+ "version": "2.0.300",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -330,7 +330,10 @@ function getAlertInfo (drivers, alert, device, translations) {
330
330
  if (alert.type === 'alarm' && alert.attributes.alarm === 'sensor') {
331
331
  return device ? device.attributes.sensor1on : ''
332
332
  }
333
- if (alert.type === 'alarm' && alert.position && !alert.attributes.alarm.startsWith('hard')) {
333
+ if (alert.attributes.alarm && alert.attributes.alarm.startsWith('hard')) {
334
+ return ''
335
+ }
336
+ if (alert.type === 'alarm' && alert.position) {
334
337
  return getDigitalPortValue(alert.position, 1, translations, device.attributes)
335
338
  }
336
339
  if (alert.type === 'deviceOverspeed') {
@@ -14,7 +14,7 @@ function processDevices (from, to, devices, data, userData) {
14
14
  const result = []
15
15
 
16
16
  for (const d of devices) {
17
- const positions = data.route.filter(t => t.deviceId === d.id)
17
+ const positions = data.route.filter(t => t.deviceId === d.id).filter(t => t.attributes.motion)
18
18
 
19
19
  const rows = []
20
20
  const currentStatus = {}