fleetmap-reports 1.0.886 → 1.0.887
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 +1 -1
- package/src/speeding-report.js +1 -2
- package/src/util/utils.js +3 -1
package/package.json
CHANGED
package/src/speeding-report.js
CHANGED
|
@@ -357,7 +357,7 @@ async function invokeValhalla (route, i, chunk, country, threshold, results, ret
|
|
|
357
357
|
const edge = edges[mp.edge_index]
|
|
358
358
|
const position = route[mIndex + i]
|
|
359
359
|
if (edge && (edge.speed_limit + (threshold || 0)) < position.speed * 1.852) {
|
|
360
|
-
results.push({ ...mp, ...edge, ...position })
|
|
360
|
+
results.push({ ...mp, ...edge, ...position, position })
|
|
361
361
|
}
|
|
362
362
|
})
|
|
363
363
|
} catch (e) {
|
|
@@ -392,7 +392,6 @@ async function getOSMSpeedingEvents (devices, routes, threshold, minimumMinutes
|
|
|
392
392
|
cur.attributes = { speedLimit: cur.speed_limit, speed: cur.speed, maxSpeed: cur.speed }
|
|
393
393
|
cur.eventTime = 0
|
|
394
394
|
cur.distance = 0
|
|
395
|
-
cur.position = { ...cur }
|
|
396
395
|
acc.push(cur)
|
|
397
396
|
}
|
|
398
397
|
return acc
|
package/src/util/utils.js
CHANGED
|
@@ -254,4 +254,6 @@ exports.calculateDistance = (positions) => {
|
|
|
254
254
|
|
|
255
255
|
exports.sortPositions = (a, b) => new Date(a.fixTime).getTime() - new Date(b.fixTime).getTime()
|
|
256
256
|
exports.getLogoUrl = getLogoUrl
|
|
257
|
-
exports.convertFromUTCDate = (value, user) =>
|
|
257
|
+
exports.convertFromUTCDate = (value, user) => {
|
|
258
|
+
return convertFromUTC(value, user.attributes.timezone || getUserPartner(user).timezone)
|
|
259
|
+
}
|