fleetmap-reports 1.0.472 → 1.0.473

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.472",
3
+ "version": "1.0.473",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/index.test.js CHANGED
@@ -15,7 +15,6 @@ async function getSpeedingReport (report, userData) {
15
15
 
16
16
  // eslint-disable-next-line no-undef
17
17
  describe('Test_Reports', function () {
18
- this.timeout(500000)
19
18
  // eslint-disable-next-line no-undef
20
19
  it('Speeding by device', async () => {
21
20
  const report = await getReports()
@@ -301,7 +301,7 @@ async function getHereEvents (devices, routes, threshold) {
301
301
  ? hereAlerts
302
302
  : hereAlerts.reduce((acc, cur, idx, src) => {
303
303
  if (idx === 1) {
304
- return [cur]
304
+ return [acc]
305
305
  }
306
306
  if (cur.timestamp - src[idx - 1].timestamp > 300000 || cur.roadSpeedLimit !== src[idx - 1].roadSpeedLimit) {
307
307
  return acc.concat(cur)
package/src/util/odoo.js CHANGED
@@ -1,16 +1,14 @@
1
1
 
2
- async function getOdooFuelServices (traccar, from, to) {
3
- const url = `/odoo/reports/refuelingServices?startDate=${from.toDateString()}&endDate=${to.toDateString()}`
2
+ async function getOdooFuelServices(traccar, from, to) {
3
+ const url = `/odoo/reports/refuelingServices?startDate=${from.toDateString()}&endDate=${to.toDateString()}`
4
4
 
5
- console.log('LOADING_MESSAGE:' + url)
6
- const { data } = await traccar.axios.get(url, {
7
- jar: traccar.cookieJar,
8
- withCredentials: true
9
- })
5
+ const {data} = await traccar.axios.get(url,{
6
+ jar: traccar.cookieJar,
7
+ withCredentials: true })
10
8
 
11
- console.log(data)
9
+ console.log(data)
12
10
 
13
- return data
11
+ return data
14
12
  }
15
13
 
16
14
  exports.getOdooFuelServices = getOdooFuelServices