fleetmap-reports 1.0.653 → 1.0.654

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.653",
3
+ "version": "1.0.654",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -234,6 +234,8 @@ async function exportZoneReportToPDF (userData, reportData) {
234
234
  translations.report.exit,
235
235
  translations.report.stopped,
236
236
  translations.report.duration,
237
+ translations.report.distanceIn || 'Kms Adentro',
238
+ translations.report.distanceOut || 'Kms Afuera',
237
239
  translations.report.geofence,
238
240
  translations.report.driver
239
241
  ]
@@ -266,6 +268,8 @@ async function exportZoneReportToPDF (userData, reportData) {
266
268
  geofenceExit(userData.user, a),
267
269
  a.stopped ? translations.report.yes : translations.report.no,
268
270
  a.totalTime ? convertMS(a.totalTime * 1000, true) : '',
271
+ a.distanceIn,
272
+ a.distanceOut,
269
273
  a.geofenceName,
270
274
  a.driverName
271
275
  ]
@@ -320,15 +324,17 @@ function exportZoneReportToExcel (userData, reportData) {
320
324
  { label: translations.report.exit, value: 'exit' },
321
325
  { label: translations.report.stopped, value: 'stopped' },
322
326
  { label: translations.report.duration, value: 'duration' },
327
+ { label: translations.report.distanceIn || 'Kms Adentro', value: 'distanceIn' },
328
+ { label: translations.report.distanceOut || 'Kms Afuera', value: 'distanceOut' },
323
329
  { label: translations.report.geofence, value: 'zone' },
324
330
  { label: translations.report.driver, value: 'driver' }
325
331
  ]
326
332
  let data = []
327
333
  if (reportData.devices) {
328
334
  reportData.devices.forEach(d => {
329
- data = data.concat([{}])
330
335
  data = data.concat(d.geofences.map(a => {
331
336
  return {
337
+ ...a,
332
338
  name: d.device.name,
333
339
  enter: geofenceEnter(userData.user, a),
334
340
  exit: geofenceExit(userData.user, a),