fleetmap-reports 1.0.653 → 1.0.655

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/ptBR.js CHANGED
@@ -153,6 +153,8 @@ module.exports = {
153
153
  delete_geofence: 'Apagar'
154
154
  },
155
155
  report: {
156
+ 'Kms Adentro': 'Kms Dentro',
157
+ 'Kms Afuera': 'Kms Fora',
156
158
  closed: 'Porta fechada',
157
159
  opened: 'Porta aberta',
158
160
  sun: 'Sol',
package/lang/ptPT.js CHANGED
@@ -157,6 +157,8 @@ module.exports = {
157
157
  delete_geofence: 'Apagar'
158
158
  },
159
159
  report: {
160
+ 'Kms Adentro': 'Kms Dentro',
161
+ 'Kms Afuera': 'Kms Fora',
160
162
  closed: 'Porta fechada',
161
163
  opened: 'Porta aberta',
162
164
  sun: 'Sol',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetmap-reports",
3
- "version": "1.0.653",
3
+ "version": "1.0.655",
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 && a.distanceIn.toLocaleString(userData.user.attributes.lang, { maximumFractionDigits: 1 }),
272
+ a.distanceOut && a.distanceOut.toLocaleString(userData.user.attributes.lang, { maximumFractionDigits: 1 }),
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),