fleetmap-reports 1.0.567 → 1.0.568
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 +1 -1
- package/src/events-report.js +3 -2
- package/src/location-report.js +1 -2
package/package.json
CHANGED
package/src/events-report.js
CHANGED
|
@@ -239,7 +239,9 @@ function exportSpeedingReportToExcel (userData, reportData) {
|
|
|
239
239
|
data = data.concat(d.alerts.map(a => {
|
|
240
240
|
return {
|
|
241
241
|
name: d.device.name,
|
|
242
|
-
eventType: a.type === 'alarm'
|
|
242
|
+
eventType: a.type === 'alarm'
|
|
243
|
+
? translations.report['event_' + a.attributes.alarm] || a.attributes.alarm
|
|
244
|
+
: translations.report['event_' + a.type],
|
|
243
245
|
fixTime: getAlertDate(userData.user, a),
|
|
244
246
|
address: a.geofenceName || (a.position ? a.position.address : ''),
|
|
245
247
|
info: getAlertInfo(userData.drivers, a, d.device, translations),
|
|
@@ -270,7 +272,6 @@ function deviceName (device) {
|
|
|
270
272
|
}
|
|
271
273
|
|
|
272
274
|
function getAlertInfo (drivers, alert, device, translations) {
|
|
273
|
-
console.log('getAlertInfo', drivers, alert, device, translations)
|
|
274
275
|
if (alert.type === 'alarm' && alert.position) {
|
|
275
276
|
return getDigitalPortValue(alert.position, 1, translations, device.attributes)
|
|
276
277
|
}
|
package/src/location-report.js
CHANGED
|
@@ -313,8 +313,7 @@ function getDigitalPort2Label (row, translations) {
|
|
|
313
313
|
return row.attributes.door2 || translations.report.digital_ports2
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
function getDigitalPortValue (row, index, translations, dAttributes) {
|
|
317
|
-
console.log('getDigitalPortValue', row, index, translations, dAttributes)
|
|
316
|
+
export function getDigitalPortValue (row, index, translations, dAttributes) {
|
|
318
317
|
switch (index) {
|
|
319
318
|
case 1:
|
|
320
319
|
if (row.attributes && row.attributes.door1 !== undefined) {
|