fleetmap-reports 1.0.378 → 1.0.379
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 +5 -2
package/package.json
CHANGED
package/src/speeding-report.js
CHANGED
|
@@ -72,7 +72,8 @@ async function createSpeedingReportByDevice(from, to, userData, traccarInstance)
|
|
|
72
72
|
|
|
73
73
|
devices.sort((a, b) => (a.name > b.name) ? 1 : -1)
|
|
74
74
|
|
|
75
|
-
const
|
|
75
|
+
const allInOne = await traccarHelper.getAllInOne(traccarInstance, from, to, devices, true, false, false, false)
|
|
76
|
+
const routes = allInOne.route
|
|
76
77
|
const events = []
|
|
77
78
|
if(!userData.useVehicleSpeedLimit && userData.customSpeed){
|
|
78
79
|
events.push(...await getCustomSpeedLimitEvents(devices, routes, userData.customSpeed))
|
|
@@ -104,7 +105,9 @@ async function createSpeedingReportByDriver(from, to, userData, traccarInstance)
|
|
|
104
105
|
return { drivers: [] }
|
|
105
106
|
}
|
|
106
107
|
|
|
107
|
-
const
|
|
108
|
+
const allInOne = await traccarHelper.getAllInOne(traccarInstance, from, to, devices, true, false, false, false)
|
|
109
|
+
const routes = allInOne.route
|
|
110
|
+
|
|
108
111
|
const events = []
|
|
109
112
|
if(!userData.useVehicleSpeedLimit && userData.customSpeed){
|
|
110
113
|
events.push(...await getCustomSpeedLimitEvents(devices, routes, userData.customSpeed))
|