fleetmap-reports 1.0.365 → 1.0.368

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/esCL.js CHANGED
@@ -192,7 +192,7 @@ module.exports = {
192
192
  stopTime: 'Parada',
193
193
  distance: 'Distancia',
194
194
  speed: 'Velocidad',
195
- overspeed: 'Alerta Ligado',
195
+ overspeed: 'Inicio del Alerta',
196
196
  roadSpeedLimit: 'Limite en la calle',
197
197
  avgSpeed: 'Vel.Média',
198
198
  maxSpeed: 'Vel.Max',
@@ -207,7 +207,7 @@ module.exports = {
207
207
  geofence: 'Geocerca',
208
208
  duration: 'Duracción',
209
209
  vehicles: 'Vehículos',
210
- vehicle: 'Vehicle',
210
+ vehicle: 'Vehículo',
211
211
  odometer: 'Cuentaquilómetros',
212
212
  startOdometer: 'Start (Km)',
213
213
  endOdometer: 'End (Km)',
@@ -220,7 +220,7 @@ module.exports = {
220
220
  totalFuelDropLiters: 'Total Fuel Lost',
221
221
  speedLimit: 'Límite de Velocidad',
222
222
  eventType: 'Evento',
223
- info: 'Informação',
223
+ info: 'Información',
224
224
  event_ignitionOff: 'Motor Apagado',
225
225
  event_ignitionOn: 'Motor Encendido',
226
226
  event_deviceOverspeed: 'Traspassos de velocidad',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetmap-reports",
3
- "version": "1.0.365",
3
+ "version": "1.0.368",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -205,7 +205,7 @@ async function exportSpeedingReportToPDF(userData, reportData) {
205
205
  }
206
206
 
207
207
  function exportSpeedingReportToExcel(userData, reportData) {
208
- console.log('Export to Excel')
208
+ console.log('exportSpeedingReportToExcel')
209
209
 
210
210
  const translations = getTranslations(userData)
211
211
 
@@ -226,7 +226,7 @@ function exportSpeedingReportToExcel(userData, reportData) {
226
226
  data = data.concat(d.alerts.map(a => {
227
227
  return {
228
228
  name: d.device.name,
229
- eventType: a.type === 'alarm' ? translations.report['event_'+a.attributes.alarm] : translations.report['event'+a.type],
229
+ eventType: a.type === 'alarm' ? translations.report['event_'+a.attributes.alarm] : translations.report['event_'+a.type],
230
230
  fixTime: getAlertDate(userData.user, a),
231
231
  address: a.geofenceName || (a.position ? a.position.address : ''),
232
232
  info: getAlertInfo(userData.drivers, a)
@@ -54,7 +54,10 @@ async function createLocationReport(from, to, userData, traccar) {
54
54
 
55
55
  const arrayOfArrays = automaticReports.sliceArray(devicesToSlice)
56
56
  let data = []
57
+ let i = 0
57
58
  for (const a of arrayOfArrays) {
59
+ console.log(`PROGRESS_PERC:${++i/arrayOfArrays.length*100}`)
60
+ console.log('LOADING_MESSAGE:' + a.map(d => d.name).join(', '))
58
61
  const response = await traccar.reports.reportsRouteGet(from, to, a.map(d => d.id))
59
62
  data = data.concat(response.data)
60
63
  }
@@ -95,7 +95,7 @@ async function createSpeedingReportByDevice(from, to, userData, traccarInstance)
95
95
  }
96
96
  }
97
97
 
98
- async function createSpeedingReportByDriver(from, to, userData) {
98
+ async function createSpeedingReportByDriver(from, to, userData, traccarInstance) {
99
99
  const devices = await drivers.devicesByDriver(traccarInstance, from, to, userData.drivers, userData.devices)
100
100
  console.log('Devices with driver',devices.length)
101
101