fleetmap-reports 2.0.267 → 2.0.268
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/location-report.js +5 -5
package/package.json
CHANGED
package/src/location-report.js
CHANGED
|
@@ -54,13 +54,13 @@ async function createLocationReportByDriver (from, to, userData, traccar) {
|
|
|
54
54
|
|
|
55
55
|
const sliced = automaticReports.sliceArray(devices, 1)
|
|
56
56
|
const deviceCount = 0
|
|
57
|
-
const promises = sliced.map(slice =>
|
|
57
|
+
const promises = sliced.map(slice => _getDriverRoute(traccar, from, to, slice, deviceCount, devices, userData))
|
|
58
58
|
const result = await Promise.all(promises)
|
|
59
59
|
return { drivers: result.flat() }
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
async function
|
|
63
|
-
const url = `https://${
|
|
62
|
+
async function _getDriverRoute (traccar, from, to, slice, deviceCount, devices, userData) {
|
|
63
|
+
const url = `https://${getDriverRoute.env.SERVER_HOST}/pinmeapi/process-report/get-driver-route'`
|
|
64
64
|
return traccar.axios.post(url, {
|
|
65
65
|
from,
|
|
66
66
|
to,
|
|
@@ -71,7 +71,7 @@ async function _process (traccar, from, to, slice, deviceCount, devices, userDat
|
|
|
71
71
|
}).then(d => d.data)
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
async function
|
|
74
|
+
async function getDriverRoute (traccar, from, to, slice, deviceCount, devices, userData) {
|
|
75
75
|
const allInOne = await traccarHelper.getAllInOne(
|
|
76
76
|
traccar, from, to, slice, true, false, false, false,
|
|
77
77
|
deviceCount,
|
|
@@ -496,4 +496,4 @@ exports.create = createLocationReport
|
|
|
496
496
|
exports.exportToPDF = exportLocationReportToPDF
|
|
497
497
|
exports.exportToExcel = exportLocationReportToExcel
|
|
498
498
|
exports.getDigitalPortValue = getDigitalPortValue
|
|
499
|
-
exports.
|
|
499
|
+
exports.getDriverRoute = getDriverRoute
|