fleetmap-reports 1.0.878 → 1.0.880
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
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
|
|
2
|
+
async function createDailyUseReport (from, to, userData, traccar) {
|
|
3
|
+
const reportData = []
|
|
4
|
+
|
|
5
|
+
const devices = userData.devices
|
|
6
|
+
|
|
7
|
+
for (const d of devices) {
|
|
8
|
+
reportData.push({
|
|
9
|
+
device: d.name,
|
|
10
|
+
licensePlate: d.attributes.license_plate,
|
|
11
|
+
group: 'group',
|
|
12
|
+
morningStart: new Date(),
|
|
13
|
+
morningEnd: new Date(),
|
|
14
|
+
morningTime: 5000 * 60,
|
|
15
|
+
lunch: 6000 * 60,
|
|
16
|
+
afternoonStart: new Date(),
|
|
17
|
+
afternoonEnd: new Date(),
|
|
18
|
+
afternoonTime: 5000 * 60,
|
|
19
|
+
totalTime: 10000 * 60,
|
|
20
|
+
totalDrivingTime: 3000 * 60,
|
|
21
|
+
totalStops: 10,
|
|
22
|
+
totalDistance: 60000
|
|
23
|
+
})
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return reportData
|
|
27
|
+
}
|