fleetmap-reports 1.0.423 → 1.0.424

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.423",
3
+ "version": "1.0.424",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/index.test.js CHANGED
@@ -64,7 +64,7 @@ describe('Test_Reports', function () {
64
64
  const device = data[0].devices.find(d => d.device.id === 25808)
65
65
  assert.equal(device.trips.length, 11) // Total Trips
66
66
  console.log(device.trips[0])
67
- assert.equal(device.trips[0].endAddress, 'Rua Cláudio Manoel 184-314;Vera Cruz;Vera Cruz;96880-000;BR\n')
67
+ assert.equal(device.trips[0].endAddress, 'RS-409, 184-314 - Centro, Vera Cruz - RS, 96880-000, Brazil')
68
68
  assert.equal(device.trips[1].endPOIName, undefined)
69
69
  }, 20000)
70
70
  // eslint-disable-next-line no-undef
@@ -158,7 +158,7 @@ function processDevices (from, to, devices, data, userData, traccar) {
158
158
  trip.stopEngineHours = 0
159
159
  }
160
160
  if (trip.endAddress === null) {
161
- traccar.axios.get(`/server/geocode?latitude=${trip.latitude}&longitude=${trip.longitude}`)
161
+ traccar.axios.get(`/server/geocode?latitude=${trip.endLat}&longitude=${trip.endLon}`)
162
162
  .then(d => { trip.endAddress = d.data })
163
163
  }
164
164
  })