fleetmap-reports 1.0.314 → 1.0.319
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/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/jsLibraryMappings.xml +6 -0
- package/.idea/modules.xml +1 -1
- package/.idea/vcs.xml +1 -1
- package/{.idea/fleetmap-reports.iml → fleetmap-reports.iml} +1 -2
- package/package.json +1 -1
- package/src/activity-report.js +1 -1
- package/src/idle-report.js +7 -5
- package/.idea/aws.xml +0 -17
- package/.idea/runConfigurations.xml +0 -10
package/.idea/modules.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<project version="4">
|
|
3
3
|
<component name="ProjectModuleManager">
|
|
4
4
|
<modules>
|
|
5
|
-
<module fileurl="file://$PROJECT_DIR
|
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/fleetmap-reports.iml" filepath="$PROJECT_DIR$/fleetmap-reports.iml" />
|
|
6
6
|
</modules>
|
|
7
7
|
</component>
|
|
8
8
|
</project>
|
package/.idea/vcs.xml
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="
|
|
2
|
+
<module type="WEB_MODULE" version="4">
|
|
3
3
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
4
|
<exclude-output />
|
|
5
5
|
<content url="file://$MODULE_DIR$" />
|
|
6
|
-
<orderEntry type="inheritedJdk" />
|
|
7
6
|
<orderEntry type="sourceFolder" forTests="false" />
|
|
8
7
|
</component>
|
|
9
8
|
</module>
|
package/package.json
CHANGED
package/src/activity-report.js
CHANGED
|
@@ -348,7 +348,7 @@ function exportActivityReportToPDF_Vehicle(doc, translations, reportData, userDa
|
|
|
348
348
|
getSumAvgSpeed(reportData.devices, userData),
|
|
349
349
|
getSumMaxSpeed(reportData.devices, userData),
|
|
350
350
|
convertMS(reportData.devices.reduce((a, b) => a + b.summary[0].engineHours, 0)),
|
|
351
|
-
getSumSpentFuel(reportData.devices,
|
|
351
|
+
getSumSpentFuel(reportData.devices, userData)]
|
|
352
352
|
|
|
353
353
|
const style = getStyle(getUserPartner(userData.user))
|
|
354
354
|
addTable(doc, headers, data, footValues, style, 35)
|
package/src/idle-report.js
CHANGED
|
@@ -45,7 +45,7 @@ async function createTripReportByGroup(from, to, userData, traccarInstance) {
|
|
|
45
45
|
|
|
46
46
|
if (routes.length > 0) {
|
|
47
47
|
console.log('Routes:' + routes.length)
|
|
48
|
-
groupData.devices = processDevices(from, to, devices, routes)
|
|
48
|
+
groupData.devices = processDevices(from, to, devices, routes, userData)
|
|
49
49
|
|
|
50
50
|
reportData.push(groupData)
|
|
51
51
|
}
|
|
@@ -76,13 +76,13 @@ async function createTripReportByDevice(from, to, devices, userData, traccarInst
|
|
|
76
76
|
console.log('Route:' + route.length)
|
|
77
77
|
|
|
78
78
|
if (route.length > 0) {
|
|
79
|
-
allData.devices = processDevices(from, to, devices, route)
|
|
79
|
+
allData.devices = processDevices(from, to, devices, route, userData)
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
return allData
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
function processDevices(from, to, devices, routes) {
|
|
85
|
+
function processDevices(from, to, devices, routes, userData) {
|
|
86
86
|
const devicesResult = []
|
|
87
87
|
|
|
88
88
|
devices.forEach(d => {
|
|
@@ -107,10 +107,12 @@ function processDevices(from, to, devices, routes) {
|
|
|
107
107
|
}
|
|
108
108
|
})
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
const filteredEvents = idleEvents.filter(e => userData.minimumIdleMinutes ? e.idleTime > userData.minimumIdleMinutes*60*1000 : true)
|
|
111
|
+
|
|
112
|
+
if(filteredEvents.length) {
|
|
111
113
|
const deviceData = {
|
|
112
114
|
device: d,
|
|
113
|
-
idleEvents:
|
|
115
|
+
idleEvents: filteredEvents
|
|
114
116
|
}
|
|
115
117
|
devicesResult.push(deviceData)
|
|
116
118
|
}
|
package/.idea/aws.xml
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="accountSettings">
|
|
4
|
-
<option name="activeProfile" value="profile:default" />
|
|
5
|
-
<option name="activeRegion" value="us-east-1" />
|
|
6
|
-
<option name="recentlyUsedProfiles">
|
|
7
|
-
<list>
|
|
8
|
-
<option value="profile:default" />
|
|
9
|
-
</list>
|
|
10
|
-
</option>
|
|
11
|
-
<option name="recentlyUsedRegions">
|
|
12
|
-
<list>
|
|
13
|
-
<option value="us-east-1" />
|
|
14
|
-
</list>
|
|
15
|
-
</option>
|
|
16
|
-
</component>
|
|
17
|
-
</project>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="RunConfigurationProducerService">
|
|
4
|
-
<option name="ignoredProducers">
|
|
5
|
-
<set>
|
|
6
|
-
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
|
|
7
|
-
</set>
|
|
8
|
-
</option>
|
|
9
|
-
</component>
|
|
10
|
-
</project>
|