fleetmap-reports 1.0.317 → 1.0.322
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/events-report.js +1 -1
- package/src/kms-report.js +1 -1
- package/src/speeding-report.js +1 -1
- package/src/word/index.js +13 -2
- 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/events-report.js
CHANGED
|
@@ -25,7 +25,7 @@ async function createEventsReport(from, to, userData, traccar) {
|
|
|
25
25
|
xpert: devices.filter(d => d.attributes.xpert).length > 0
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
const data = await getReportData(from, to, devices, userData.eventTypes)
|
|
28
|
+
const data = await getReportData(from, to, devices, userData.eventTypes, traccar)
|
|
29
29
|
|
|
30
30
|
devices.sort((a, b) => (a.name > b.name) ? 1 : -1)
|
|
31
31
|
|
package/src/kms-report.js
CHANGED
|
@@ -103,7 +103,7 @@ async function createKmsReportByGroup(from, to, userData, traccarInstance) {
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
const withoutGroupData = await createKmsReportByDevice(from, to)
|
|
106
|
+
const withoutGroupData = await createKmsReportByDevice(from, to, userData, traccarInstance)
|
|
107
107
|
reportData.push(withoutGroupData)
|
|
108
108
|
|
|
109
109
|
return reportData
|
package/src/speeding-report.js
CHANGED
|
@@ -63,7 +63,7 @@ async function createSpeedingReportByGroup(from, to, userData, traccarInstance){
|
|
|
63
63
|
const groupIds = userData.groups.map(g => g.id)
|
|
64
64
|
const withoutGroupDevices = userData.devices.filter(d => !groupIds.includes(d.groupId))
|
|
65
65
|
|
|
66
|
-
const withoutGroupData = await createSpeedingReportByDevice(from, to, withoutGroupDevices)
|
|
66
|
+
const withoutGroupData = await createSpeedingReportByDevice(from, to, withoutGroupDevices, userData, traccarInstance)
|
|
67
67
|
reportData.push(withoutGroupData)
|
|
68
68
|
|
|
69
69
|
return reportData
|
package/src/word/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const {Document, Paragraph, Packer, TableRow, TableCell, Table, WidthType, ImageRun, Header, TextRun, HeadingLevel,
|
|
2
|
-
AlignmentType
|
|
2
|
+
AlignmentType, Footer
|
|
3
3
|
} = require("docx")
|
|
4
4
|
const { saveAs } = require('file-saver')
|
|
5
5
|
const utils = require('../util/utils')
|
|
6
6
|
const {getPartnerData} = require("fleetmap-partners");
|
|
7
|
-
const colWidth =
|
|
7
|
+
const colWidth = 2000
|
|
8
8
|
|
|
9
9
|
function formatCellValue(value) {
|
|
10
10
|
return value.toLocaleDateString ? value.toLocaleDateString() : value + ''
|
|
@@ -61,6 +61,17 @@ exports.reportToWord = async (userData, dateRange, excel, title) => {
|
|
|
61
61
|
]
|
|
62
62
|
})
|
|
63
63
|
},
|
|
64
|
+
footers: {
|
|
65
|
+
default: new Footer({
|
|
66
|
+
children: [
|
|
67
|
+
new Paragraph({
|
|
68
|
+
children: [
|
|
69
|
+
new TextRun('Relatório gerado a ' + new Date().toLocaleString())
|
|
70
|
+
]
|
|
71
|
+
})
|
|
72
|
+
]
|
|
73
|
+
})
|
|
74
|
+
},
|
|
64
75
|
properties: {},
|
|
65
76
|
children: [
|
|
66
77
|
new Paragraph({
|
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>
|