fleetmap-reports 1.0.857 → 1.0.859

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/lang/frFR.json CHANGED
@@ -169,6 +169,7 @@
169
169
  "digital_ports1": "Ports numériques 1",
170
170
  "digital_ports2": "Portes numériques 2",
171
171
  "temperature": "Température",
172
+ "temperature2": "Température 2",
172
173
  "select_vehicles": "sélectionner des véhicules",
173
174
  "select_vehicles_placeholder": "Véhicules",
174
175
  "select_geofences": "sélectionner les balises",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetmap-reports",
3
- "version": "1.0.857",
3
+ "version": "1.0.859",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -203,6 +203,7 @@ async function exportLocationReportToPDF (userData, reportData) {
203
203
 
204
204
  if (userData.includeTemperature) {
205
205
  headers.push(translations.report.temperature)
206
+ headers.push(translations.report.temperature2 || 'Temperature 2')
206
207
  }
207
208
 
208
209
  if (positionsData) {
@@ -254,7 +255,8 @@ async function exportLocationReportToPDF (userData, reportData) {
254
255
  ]
255
256
 
256
257
  if (userData.includeTemperature) {
257
- temp.push(getTempValue(a))
258
+ temp.push(getTempValue(a, 'temp1'))
259
+ temp.push(getTempValue(a, 'temp2'))
258
260
  }
259
261
 
260
262
  if (userData.includeDigitalPorts) {
@@ -300,11 +302,8 @@ async function exportLocationReportToPDF (userData, reportData) {
300
302
  }
301
303
  }
302
304
 
303
- function getTempValue (row) {
304
- return (row.attributes && (
305
- (row.attributes.temp1 !== 175 && row.attributes.temp1) ||
306
- (row.attributes.temp2 !== 175 && row.attributes.temp2)
307
- )) || ''
305
+ function getTempValue (row, sensor) {
306
+ return (row.attributes[sensor] !== 175 && row.attributes[sensor]) || ''
308
307
  }
309
308
 
310
309
  function getDigitalPort1Label (row, translations, dAttributes) {
@@ -375,6 +374,7 @@ function exportLocationReportToExcel (userData, reportData) {
375
374
 
376
375
  if (userData.includeTemperature) {
377
376
  headers.push({ label: translations.report.temperature, value: 'temperature' })
377
+ headers.push({ label: translations.report.temperature2, value: 'temperature2' })
378
378
  }
379
379
 
380
380
  headers.push({ label: 'Latitude', value: 'latitude' })
@@ -397,7 +397,8 @@ function exportLocationReportToExcel (userData, reportData) {
397
397
  speed: Math.round(a.speed * 1.85200),
398
398
  ignition: a.attributes.ignition ? translations.report.ignitionOn : translations.report.ignitionOff,
399
399
  driver: userData.byDriver ? d.driver.name : getDriverName(a.attributes.driverUniqueId, a.fixTime, userData),
400
- temperature: getTempValue(a),
400
+ temperature: getTempValue(a, 'temp1'),
401
+ temperature2: getTempValue(a, 'temp2'),
401
402
  digitalport1: getDigitalPortValue(a, 1, translations, d.device.attributes),
402
403
  digitalport2: getDigitalPortValue(a, 2, translations, d.device.attributes),
403
404
  latitude: a.latitude,