fleetmap-reports 1.0.272 → 1.0.273
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/runConfigurations.xml +10 -0
- package/.idea/workspace.xml +463 -0
- package/package.json +1 -1
- package/src/index.test.js +43 -3
- package/src/kms-report.js +55 -24
- package/src/speeding-report.js +0 -2
- package/.idea/codeStyles/Project.xml +0 -7
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/jsLibraryMappings.xml +0 -6
|
@@ -0,0 +1,10 @@
|
|
|
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>
|
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ChangeListManager">
|
|
4
|
+
<list default="true" id="eb665c86-c893-4333-bd2a-721dc27980b9" name="Changes" comment="fix trip report">
|
|
5
|
+
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
|
|
6
|
+
<change beforePath="$PROJECT_DIR$/src/index.test.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/index.test.js" afterDir="false" />
|
|
7
|
+
<change beforePath="$PROJECT_DIR$/src/kms-report.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/kms-report.js" afterDir="false" />
|
|
8
|
+
</list>
|
|
9
|
+
<option name="SHOW_DIALOG" value="false" />
|
|
10
|
+
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
11
|
+
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
12
|
+
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
13
|
+
</component>
|
|
14
|
+
<component name="FileTemplateManagerImpl">
|
|
15
|
+
<option name="RECENT_TEMPLATES">
|
|
16
|
+
<list>
|
|
17
|
+
<option value="JavaScript File" />
|
|
18
|
+
</list>
|
|
19
|
+
</option>
|
|
20
|
+
</component>
|
|
21
|
+
<component name="Git.Settings">
|
|
22
|
+
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
|
23
|
+
</component>
|
|
24
|
+
<component name="GitSEFilterConfiguration">
|
|
25
|
+
<file-type-list>
|
|
26
|
+
<filtered-out-file-type name="LOCAL_BRANCH" />
|
|
27
|
+
<filtered-out-file-type name="REMOTE_BRANCH" />
|
|
28
|
+
<filtered-out-file-type name="TAG" />
|
|
29
|
+
<filtered-out-file-type name="COMMIT_BY_MESSAGE" />
|
|
30
|
+
</file-type-list>
|
|
31
|
+
</component>
|
|
32
|
+
<component name="ProjectId" id="20NIxbej0qfi8RaO3jr1XOU0xol" />
|
|
33
|
+
<component name="ProjectViewState">
|
|
34
|
+
<option name="hideEmptyMiddlePackages" value="true" />
|
|
35
|
+
<option name="showLibraryContents" value="true" />
|
|
36
|
+
</component>
|
|
37
|
+
<component name="PropertiesComponent">
|
|
38
|
+
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
|
|
39
|
+
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
|
|
40
|
+
<property name="WebServerToolWindowFactoryState" value="false" />
|
|
41
|
+
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
|
42
|
+
<property name="nodejs.mocha.mocha_node_package_dir" value="$PROJECT_DIR$/node_modules/mocha" />
|
|
43
|
+
<property name="nodejs_package_manager_path" value="npm" />
|
|
44
|
+
<property name="ts.external.directory.path" value="$APPLICATION_HOME_DIR$/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external" />
|
|
45
|
+
<property name="vue.rearranger.settings.migration" value="true" />
|
|
46
|
+
</component>
|
|
47
|
+
<component name="RunManager" selected="Mocha.Reports.test event report">
|
|
48
|
+
<configuration name="Reports.test event report" type="mocha-javascript-test-runner" temporary="true" nameIsGenerated="true">
|
|
49
|
+
<node-interpreter>project</node-interpreter>
|
|
50
|
+
<node-options />
|
|
51
|
+
<mocha-package>$PROJECT_DIR$/node_modules/mocha</mocha-package>
|
|
52
|
+
<working-directory>$PROJECT_DIR$</working-directory>
|
|
53
|
+
<pass-parent-env>true</pass-parent-env>
|
|
54
|
+
<envs>
|
|
55
|
+
<env name="email" value="jppenas@gmail.com" />
|
|
56
|
+
<env name="password" value="penas46881" />
|
|
57
|
+
</envs>
|
|
58
|
+
<ui>bdd</ui>
|
|
59
|
+
<extra-mocha-options />
|
|
60
|
+
<test-kind>TEST</test-kind>
|
|
61
|
+
<test-file>$PROJECT_DIR$/src/index.test.js</test-file>
|
|
62
|
+
<test-names>
|
|
63
|
+
<name value="Reports" />
|
|
64
|
+
<name value="test event report" />
|
|
65
|
+
</test-names>
|
|
66
|
+
<method v="2" />
|
|
67
|
+
</configuration>
|
|
68
|
+
<configuration name="Reports.test trip report" type="mocha-javascript-test-runner" temporary="true" nameIsGenerated="true">
|
|
69
|
+
<node-interpreter>project</node-interpreter>
|
|
70
|
+
<node-options />
|
|
71
|
+
<mocha-package>$PROJECT_DIR$/node_modules/mocha</mocha-package>
|
|
72
|
+
<working-directory>$PROJECT_DIR$</working-directory>
|
|
73
|
+
<pass-parent-env>true</pass-parent-env>
|
|
74
|
+
<envs>
|
|
75
|
+
<env name="email" value="jppenas@gmail.com" />
|
|
76
|
+
<env name="password" value="penas46881" />
|
|
77
|
+
</envs>
|
|
78
|
+
<ui>bdd</ui>
|
|
79
|
+
<extra-mocha-options />
|
|
80
|
+
<test-kind>TEST</test-kind>
|
|
81
|
+
<test-file>$PROJECT_DIR$/src/index.test.js</test-file>
|
|
82
|
+
<test-names>
|
|
83
|
+
<name value="Reports" />
|
|
84
|
+
<name value="test trip report" />
|
|
85
|
+
</test-names>
|
|
86
|
+
<method v="2" />
|
|
87
|
+
</configuration>
|
|
88
|
+
<configuration name="speedingReport.test kmsReport by day" type="mocha-javascript-test-runner" temporary="true" nameIsGenerated="true">
|
|
89
|
+
<node-interpreter>project</node-interpreter>
|
|
90
|
+
<node-options />
|
|
91
|
+
<mocha-package>$PROJECT_DIR$/node_modules/mocha</mocha-package>
|
|
92
|
+
<working-directory>$PROJECT_DIR$</working-directory>
|
|
93
|
+
<pass-parent-env>true</pass-parent-env>
|
|
94
|
+
<envs>
|
|
95
|
+
<env name="email" value="jppenas@gmail.com" />
|
|
96
|
+
<env name="password" value="penas46881" />
|
|
97
|
+
</envs>
|
|
98
|
+
<ui>bdd</ui>
|
|
99
|
+
<extra-mocha-options />
|
|
100
|
+
<test-kind>TEST</test-kind>
|
|
101
|
+
<test-file>$PROJECT_DIR$/src/index.test.js</test-file>
|
|
102
|
+
<test-names>
|
|
103
|
+
<name value="speedingReport" />
|
|
104
|
+
<name value="test kmsReport by day" />
|
|
105
|
+
</test-names>
|
|
106
|
+
<method v="2" />
|
|
107
|
+
</configuration>
|
|
108
|
+
<configuration name="speedingReport.test speeding" type="mocha-javascript-test-runner" temporary="true" nameIsGenerated="true">
|
|
109
|
+
<node-interpreter>project</node-interpreter>
|
|
110
|
+
<node-options />
|
|
111
|
+
<mocha-package>$PROJECT_DIR$/node_modules/mocha</mocha-package>
|
|
112
|
+
<working-directory>$PROJECT_DIR$</working-directory>
|
|
113
|
+
<pass-parent-env>true</pass-parent-env>
|
|
114
|
+
<envs>
|
|
115
|
+
<env name="email" value="jppenas@gmail.com" />
|
|
116
|
+
<env name="password" value="penas46881" />
|
|
117
|
+
</envs>
|
|
118
|
+
<ui>bdd</ui>
|
|
119
|
+
<extra-mocha-options />
|
|
120
|
+
<test-kind>TEST</test-kind>
|
|
121
|
+
<test-file>$PROJECT_DIR$/src/index.test.js</test-file>
|
|
122
|
+
<test-names>
|
|
123
|
+
<name value="speedingReport" />
|
|
124
|
+
<name value="test speeding" />
|
|
125
|
+
</test-names>
|
|
126
|
+
<method v="2" />
|
|
127
|
+
</configuration>
|
|
128
|
+
<configuration name="test reports" type="mocha-javascript-test-runner" temporary="true" nameIsGenerated="true">
|
|
129
|
+
<node-interpreter>project</node-interpreter>
|
|
130
|
+
<node-options />
|
|
131
|
+
<mocha-package>$PROJECT_DIR$/node_modules/mocha</mocha-package>
|
|
132
|
+
<working-directory>$PROJECT_DIR$</working-directory>
|
|
133
|
+
<pass-parent-env>true</pass-parent-env>
|
|
134
|
+
<envs>
|
|
135
|
+
<env name="email" value="jppenas@gmail.com" />
|
|
136
|
+
<env name="password" value="penas46881" />
|
|
137
|
+
</envs>
|
|
138
|
+
<ui>bdd</ui>
|
|
139
|
+
<extra-mocha-options />
|
|
140
|
+
<test-kind>SUITE</test-kind>
|
|
141
|
+
<test-file>$PROJECT_DIR$/src/index.test.js</test-file>
|
|
142
|
+
<test-names>
|
|
143
|
+
<name value="test reports" />
|
|
144
|
+
</test-names>
|
|
145
|
+
<method v="2" />
|
|
146
|
+
</configuration>
|
|
147
|
+
<list>
|
|
148
|
+
<item itemvalue="Mocha.test reports" />
|
|
149
|
+
<item itemvalue="Mocha.speedingReport.test kmsReport by day" />
|
|
150
|
+
<item itemvalue="Mocha.speedingReport.test speeding" />
|
|
151
|
+
<item itemvalue="Mocha.Reports.test trip report" />
|
|
152
|
+
<item itemvalue="Mocha.Reports.test event report" />
|
|
153
|
+
</list>
|
|
154
|
+
<recent_temporary>
|
|
155
|
+
<list>
|
|
156
|
+
<item itemvalue="Mocha.Reports.test event report" />
|
|
157
|
+
<item itemvalue="Mocha.Reports.test trip report" />
|
|
158
|
+
<item itemvalue="Mocha.speedingReport.test speeding" />
|
|
159
|
+
<item itemvalue="Mocha.speedingReport.test kmsReport by day" />
|
|
160
|
+
<item itemvalue="Mocha.test reports" />
|
|
161
|
+
</list>
|
|
162
|
+
</recent_temporary>
|
|
163
|
+
</component>
|
|
164
|
+
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
|
165
|
+
<component name="TaskManager">
|
|
166
|
+
<task active="true" id="Default" summary="Default task">
|
|
167
|
+
<changelist id="eb665c86-c893-4333-bd2a-721dc27980b9" name="Changes" comment="" />
|
|
168
|
+
<created>1635878866368</created>
|
|
169
|
+
<option name="number" value="Default" />
|
|
170
|
+
<option name="presentableId" value="Default" />
|
|
171
|
+
<updated>1635878866368</updated>
|
|
172
|
+
<workItem from="1635878870054" duration="105000" />
|
|
173
|
+
<workItem from="1635943211865" duration="371000" />
|
|
174
|
+
<workItem from="1636030918716" duration="808000" />
|
|
175
|
+
<workItem from="1636366400735" duration="3018000" />
|
|
176
|
+
<workItem from="1636371409243" duration="45000" />
|
|
177
|
+
<workItem from="1636371621773" duration="4750000" />
|
|
178
|
+
<workItem from="1636623371114" duration="675000" />
|
|
179
|
+
<workItem from="1636624396937" duration="1987000" />
|
|
180
|
+
<workItem from="1636627666406" duration="1616000" />
|
|
181
|
+
<workItem from="1636647112207" duration="1748000" />
|
|
182
|
+
<workItem from="1636981640447" duration="4315000" />
|
|
183
|
+
<workItem from="1637009407292" duration="1470000" />
|
|
184
|
+
<workItem from="1637012863006" duration="5376000" />
|
|
185
|
+
<workItem from="1637087797229" duration="5701000" />
|
|
186
|
+
<workItem from="1637227826845" duration="1275000" />
|
|
187
|
+
<workItem from="1637441942952" duration="4543000" />
|
|
188
|
+
<workItem from="1637670815688" duration="2973000" />
|
|
189
|
+
<workItem from="1637674107929" duration="13419000" />
|
|
190
|
+
<workItem from="1637756665591" duration="4742000" />
|
|
191
|
+
<workItem from="1637841765985" duration="10197000" />
|
|
192
|
+
<workItem from="1637868513425" duration="1650000" />
|
|
193
|
+
<workItem from="1637928687573" duration="37000" />
|
|
194
|
+
<workItem from="1637931438656" duration="621000" />
|
|
195
|
+
<workItem from="1637952151523" duration="17766000" />
|
|
196
|
+
<workItem from="1638270786569" duration="6960000" />
|
|
197
|
+
<workItem from="1638455902437" duration="120000" />
|
|
198
|
+
<workItem from="1638486745343" duration="4126000" />
|
|
199
|
+
<workItem from="1638792860278" duration="2140000" />
|
|
200
|
+
<workItem from="1638839462028" duration="50000" />
|
|
201
|
+
<workItem from="1638840110567" duration="597000" />
|
|
202
|
+
<workItem from="1638888787940" duration="19894000" />
|
|
203
|
+
<workItem from="1639074912454" duration="257000" />
|
|
204
|
+
<workItem from="1639090037682" duration="2514000" />
|
|
205
|
+
<workItem from="1639135460686" duration="3092000" />
|
|
206
|
+
<workItem from="1639151097761" duration="13703000" />
|
|
207
|
+
<workItem from="1639246310204" duration="628000" />
|
|
208
|
+
<workItem from="1639247624979" duration="13040000" />
|
|
209
|
+
<workItem from="1639489940902" duration="18224000" />
|
|
210
|
+
<workItem from="1639591829775" duration="681000" />
|
|
211
|
+
<workItem from="1639592539998" duration="27141000" />
|
|
212
|
+
<workItem from="1639766010908" duration="4991000" />
|
|
213
|
+
<workItem from="1639872937953" duration="1438000" />
|
|
214
|
+
<workItem from="1639954341221" duration="11986000" />
|
|
215
|
+
<workItem from="1640272520380" duration="2253000" />
|
|
216
|
+
<workItem from="1640789226071" duration="1935000" />
|
|
217
|
+
<workItem from="1640794844118" duration="10128000" />
|
|
218
|
+
<workItem from="1640866364417" duration="67000" />
|
|
219
|
+
<workItem from="1640866782794" duration="123000" />
|
|
220
|
+
<workItem from="1640866964393" duration="1022000" />
|
|
221
|
+
<workItem from="1640870147277" duration="8236000" />
|
|
222
|
+
<workItem from="1641321068227" duration="14805000" />
|
|
223
|
+
<workItem from="1641387675790" duration="32947000" />
|
|
224
|
+
<workItem from="1641509412324" duration="41000" />
|
|
225
|
+
<workItem from="1641510744190" duration="1404000" />
|
|
226
|
+
<workItem from="1641526151665" duration="1679000" />
|
|
227
|
+
<workItem from="1641640203903" duration="5320000" />
|
|
228
|
+
<workItem from="1641740608739" duration="1844000" />
|
|
229
|
+
<workItem from="1641775506363" duration="646000" />
|
|
230
|
+
<workItem from="1641819557952" duration="1002000" />
|
|
231
|
+
</task>
|
|
232
|
+
<task id="LOCAL-00001" summary="Fix getStyle">
|
|
233
|
+
<created>1636983717385</created>
|
|
234
|
+
<option name="number" value="00001" />
|
|
235
|
+
<option name="presentableId" value="LOCAL-00001" />
|
|
236
|
+
<option name="project" value="LOCAL" />
|
|
237
|
+
<updated>1636983717385</updated>
|
|
238
|
+
</task>
|
|
239
|
+
<task id="LOCAL-00002" summary="Fix getStyle in all reports">
|
|
240
|
+
<created>1637020728356</created>
|
|
241
|
+
<option name="number" value="00002" />
|
|
242
|
+
<option name="presentableId" value="LOCAL-00002" />
|
|
243
|
+
<option name="project" value="LOCAL" />
|
|
244
|
+
<updated>1637020728356</updated>
|
|
245
|
+
</task>
|
|
246
|
+
<task id="LOCAL-00003" summary="try catch on pdf addImage">
|
|
247
|
+
<created>1637247013210</created>
|
|
248
|
+
<option name="number" value="00003" />
|
|
249
|
+
<option name="presentableId" value="LOCAL-00003" />
|
|
250
|
+
<option name="project" value="LOCAL" />
|
|
251
|
+
<updated>1637247013211</updated>
|
|
252
|
+
</task>
|
|
253
|
+
<task id="LOCAL-00004" summary="Kms report grouped by day">
|
|
254
|
+
<created>1637715473148</created>
|
|
255
|
+
<option name="number" value="00004" />
|
|
256
|
+
<option name="presentableId" value="LOCAL-00004" />
|
|
257
|
+
<option name="project" value="LOCAL" />
|
|
258
|
+
<updated>1637715473149</updated>
|
|
259
|
+
</task>
|
|
260
|
+
<task id="LOCAL-00005" summary="Fix pdf logo">
|
|
261
|
+
<created>1637849206762</created>
|
|
262
|
+
<option name="number" value="00005" />
|
|
263
|
+
<option name="presentableId" value="LOCAL-00005" />
|
|
264
|
+
<option name="project" value="LOCAL" />
|
|
265
|
+
<updated>1637849206762</updated>
|
|
266
|
+
</task>
|
|
267
|
+
<task id="LOCAL-00006" summary="kms report with parallel requests">
|
|
268
|
+
<created>1637858604089</created>
|
|
269
|
+
<option name="number" value="00006" />
|
|
270
|
+
<option name="presentableId" value="LOCAL-00006" />
|
|
271
|
+
<option name="project" value="LOCAL" />
|
|
272
|
+
<updated>1637858604089</updated>
|
|
273
|
+
</task>
|
|
274
|
+
<task id="LOCAL-00007" summary="Kms Report - Calculate distance with traccar trips">
|
|
275
|
+
<created>1638179219255</created>
|
|
276
|
+
<option name="number" value="00007" />
|
|
277
|
+
<option name="presentableId" value="LOCAL-00007" />
|
|
278
|
+
<option name="project" value="LOCAL" />
|
|
279
|
+
<updated>1638179219256</updated>
|
|
280
|
+
</task>
|
|
281
|
+
<task id="LOCAL-00008" summary="fix speeding report">
|
|
282
|
+
<created>1638186780966</created>
|
|
283
|
+
<option name="number" value="00008" />
|
|
284
|
+
<option name="presentableId" value="LOCAL-00008" />
|
|
285
|
+
<option name="project" value="LOCAL" />
|
|
286
|
+
<updated>1638186780967</updated>
|
|
287
|
+
</task>
|
|
288
|
+
<task id="LOCAL-00009" summary="refactor speeding and trip report">
|
|
289
|
+
<created>1638288337133</created>
|
|
290
|
+
<option name="number" value="00009" />
|
|
291
|
+
<option name="presentableId" value="LOCAL-00009" />
|
|
292
|
+
<option name="project" value="LOCAL" />
|
|
293
|
+
<updated>1638288337135</updated>
|
|
294
|
+
</task>
|
|
295
|
+
<task id="LOCAL-00010" summary="Kms report with time period">
|
|
296
|
+
<created>1639057192380</created>
|
|
297
|
+
<option name="number" value="00010" />
|
|
298
|
+
<option name="presentableId" value="LOCAL-00010" />
|
|
299
|
+
<option name="project" value="LOCAL" />
|
|
300
|
+
<updated>1639057192382</updated>
|
|
301
|
+
</task>
|
|
302
|
+
<task id="LOCAL-00011" summary="kms report - show every selected day">
|
|
303
|
+
<created>1639139696407</created>
|
|
304
|
+
<option name="number" value="00011" />
|
|
305
|
+
<option name="presentableId" value="LOCAL-00011" />
|
|
306
|
+
<option name="project" value="LOCAL" />
|
|
307
|
+
<updated>1639139696408</updated>
|
|
308
|
+
</task>
|
|
309
|
+
<task id="LOCAL-00012" summary="speeding report with customSpeed">
|
|
310
|
+
<created>1639238286381</created>
|
|
311
|
+
<option name="number" value="00012" />
|
|
312
|
+
<option name="presentableId" value="LOCAL-00012" />
|
|
313
|
+
<option name="project" value="LOCAL" />
|
|
314
|
+
<updated>1639238286382</updated>
|
|
315
|
+
</task>
|
|
316
|
+
<task id="LOCAL-00013" summary="fix speeding report">
|
|
317
|
+
<created>1639248407781</created>
|
|
318
|
+
<option name="number" value="00013" />
|
|
319
|
+
<option name="presentableId" value="LOCAL-00013" />
|
|
320
|
+
<option name="project" value="LOCAL" />
|
|
321
|
+
<updated>1639248407782</updated>
|
|
322
|
+
</task>
|
|
323
|
+
<task id="LOCAL-00014" summary="Trip and activity report with time period">
|
|
324
|
+
<created>1639873766070</created>
|
|
325
|
+
<option name="number" value="00014" />
|
|
326
|
+
<option name="presentableId" value="LOCAL-00014" />
|
|
327
|
+
<option name="project" value="LOCAL" />
|
|
328
|
+
<updated>1639873766072</updated>
|
|
329
|
+
</task>
|
|
330
|
+
<task id="LOCAL-00015" summary="Fix trips distance because imported positions generate trips with 0 kms">
|
|
331
|
+
<created>1640000462824</created>
|
|
332
|
+
<option name="number" value="00015" />
|
|
333
|
+
<option name="presentableId" value="LOCAL-00015" />
|
|
334
|
+
<option name="project" value="LOCAL" />
|
|
335
|
+
<updated>1640000462825</updated>
|
|
336
|
+
</task>
|
|
337
|
+
<task id="LOCAL-00016" summary="Fix reports by driver">
|
|
338
|
+
<created>1640274171902</created>
|
|
339
|
+
<option name="number" value="00016" />
|
|
340
|
+
<option name="presentableId" value="LOCAL-00016" />
|
|
341
|
+
<option name="project" value="LOCAL" />
|
|
342
|
+
<updated>1640274171902</updated>
|
|
343
|
+
</task>
|
|
344
|
+
<task id="LOCAL-00017" summary="location report - check if it's running on client side">
|
|
345
|
+
<created>1640795243287</created>
|
|
346
|
+
<option name="number" value="00017" />
|
|
347
|
+
<option name="presentableId" value="LOCAL-00017" />
|
|
348
|
+
<option name="project" value="LOCAL" />
|
|
349
|
+
<updated>1640795243288</updated>
|
|
350
|
+
</task>
|
|
351
|
+
<task id="LOCAL-00018" summary="timezone - check if it's running on client side">
|
|
352
|
+
<created>1640825795052</created>
|
|
353
|
+
<option name="number" value="00018" />
|
|
354
|
+
<option name="presentableId" value="LOCAL-00018" />
|
|
355
|
+
<option name="project" value="LOCAL" />
|
|
356
|
+
<updated>1640825795053</updated>
|
|
357
|
+
</task>
|
|
358
|
+
<task id="LOCAL-00019" summary="calculate avg speed">
|
|
359
|
+
<created>1640867522437</created>
|
|
360
|
+
<option name="number" value="00019" />
|
|
361
|
+
<option name="presentableId" value="LOCAL-00019" />
|
|
362
|
+
<option name="project" value="LOCAL" />
|
|
363
|
+
<updated>1640867522438</updated>
|
|
364
|
+
</task>
|
|
365
|
+
<task id="LOCAL-00020" summary="fix activity report by driver">
|
|
366
|
+
<created>1640872780966</created>
|
|
367
|
+
<option name="number" value="00020" />
|
|
368
|
+
<option name="presentableId" value="LOCAL-00020" />
|
|
369
|
+
<option name="project" value="LOCAL" />
|
|
370
|
+
<updated>1640872780968</updated>
|
|
371
|
+
</task>
|
|
372
|
+
<task id="LOCAL-00021" summary="activity report by driver grouped by day">
|
|
373
|
+
<created>1640878664617</created>
|
|
374
|
+
<option name="number" value="00021" />
|
|
375
|
+
<option name="presentableId" value="LOCAL-00021" />
|
|
376
|
+
<option name="project" value="LOCAL" />
|
|
377
|
+
<updated>1640878664617</updated>
|
|
378
|
+
</task>
|
|
379
|
+
<task id="LOCAL-00022" summary="fix kms-report by driver and fix activity report with time period">
|
|
380
|
+
<created>1641348028566</created>
|
|
381
|
+
<option name="number" value="00022" />
|
|
382
|
+
<option name="presentableId" value="LOCAL-00022" />
|
|
383
|
+
<option name="project" value="LOCAL" />
|
|
384
|
+
<updated>1641348028566</updated>
|
|
385
|
+
</task>
|
|
386
|
+
<task id="LOCAL-00023" summary="Refactor trip and speeding reports">
|
|
387
|
+
<created>1641511586537</created>
|
|
388
|
+
<option name="number" value="00023" />
|
|
389
|
+
<option name="presentableId" value="LOCAL-00023" />
|
|
390
|
+
<option name="project" value="LOCAL" />
|
|
391
|
+
<updated>1641511586537</updated>
|
|
392
|
+
</task>
|
|
393
|
+
<task id="LOCAL-00024" summary="check if weekDays parameter is set">
|
|
394
|
+
<created>1641527800168</created>
|
|
395
|
+
<option name="number" value="00024" />
|
|
396
|
+
<option name="presentableId" value="LOCAL-00024" />
|
|
397
|
+
<option name="project" value="LOCAL" />
|
|
398
|
+
<updated>1641527800170</updated>
|
|
399
|
+
</task>
|
|
400
|
+
<task id="LOCAL-00025" summary="fix trip report">
|
|
401
|
+
<created>1641664506677</created>
|
|
402
|
+
<option name="number" value="00025" />
|
|
403
|
+
<option name="presentableId" value="LOCAL-00025" />
|
|
404
|
+
<option name="project" value="LOCAL" />
|
|
405
|
+
<updated>1641664506679</updated>
|
|
406
|
+
</task>
|
|
407
|
+
<option name="localTasksCounter" value="26" />
|
|
408
|
+
<servers />
|
|
409
|
+
</component>
|
|
410
|
+
<component name="TypeScriptGeneratedFilesManager">
|
|
411
|
+
<option name="version" value="3" />
|
|
412
|
+
</component>
|
|
413
|
+
<component name="Vcs.Log.History.Properties">
|
|
414
|
+
<option name="COLUMN_ID_ORDER">
|
|
415
|
+
<list>
|
|
416
|
+
<option value="Default.Root" />
|
|
417
|
+
<option value="Default.Author" />
|
|
418
|
+
<option value="Default.Date" />
|
|
419
|
+
<option value="Default.Subject" />
|
|
420
|
+
<option value="Space.CommitStatus" />
|
|
421
|
+
</list>
|
|
422
|
+
</option>
|
|
423
|
+
</component>
|
|
424
|
+
<component name="Vcs.Log.Tabs.Properties">
|
|
425
|
+
<option name="TAB_STATES">
|
|
426
|
+
<map>
|
|
427
|
+
<entry key="MAIN">
|
|
428
|
+
<value>
|
|
429
|
+
<State />
|
|
430
|
+
</value>
|
|
431
|
+
</entry>
|
|
432
|
+
</map>
|
|
433
|
+
</option>
|
|
434
|
+
<option name="oldMeFiltersMigrated" value="true" />
|
|
435
|
+
</component>
|
|
436
|
+
<component name="VcsManagerConfiguration">
|
|
437
|
+
<MESSAGE value="Fix getStyle" />
|
|
438
|
+
<MESSAGE value="Fix getStyle in all reports" />
|
|
439
|
+
<MESSAGE value="try catch on pdf addImage" />
|
|
440
|
+
<MESSAGE value="Kms report grouped by day" />
|
|
441
|
+
<MESSAGE value="Fix pdf logo" />
|
|
442
|
+
<MESSAGE value="kms report with parallel requests" />
|
|
443
|
+
<MESSAGE value="Kms Report - Calculate distance with traccar trips" />
|
|
444
|
+
<MESSAGE value="refactor speeding and trip report" />
|
|
445
|
+
<MESSAGE value="Kms report with time period" />
|
|
446
|
+
<MESSAGE value="kms report - show every selected day" />
|
|
447
|
+
<MESSAGE value="speeding report with customSpeed" />
|
|
448
|
+
<MESSAGE value="fix speeding report" />
|
|
449
|
+
<MESSAGE value="Trip and activity report with time period" />
|
|
450
|
+
<MESSAGE value="Fix trips distance because imported positions generate trips with 0 kms" />
|
|
451
|
+
<MESSAGE value="Fix reports by driver" />
|
|
452
|
+
<MESSAGE value="location report - check if it's running on client side" />
|
|
453
|
+
<MESSAGE value="timezone - check if it's running on client side" />
|
|
454
|
+
<MESSAGE value="calculate avg speed" />
|
|
455
|
+
<MESSAGE value="fix activity report by driver" />
|
|
456
|
+
<MESSAGE value="activity report by driver grouped by day" />
|
|
457
|
+
<MESSAGE value="fix kms-report by driver and fix activity report with time period" />
|
|
458
|
+
<MESSAGE value="Refactor trip and speeding reports" />
|
|
459
|
+
<MESSAGE value="check if weekDays parameter is set" />
|
|
460
|
+
<MESSAGE value="fix trip report" />
|
|
461
|
+
<option name="LAST_COMMIT_MESSAGE" value="fix trip report" />
|
|
462
|
+
</component>
|
|
463
|
+
</project>
|
package/package.json
CHANGED
package/src/index.test.js
CHANGED
|
@@ -1,20 +1,60 @@
|
|
|
1
1
|
const {getReports} = require("./tests");
|
|
2
2
|
|
|
3
|
-
describe('
|
|
3
|
+
describe('Reports', function() {
|
|
4
4
|
this.timeout(500000)
|
|
5
5
|
it('test speeding', async () => {
|
|
6
6
|
const report = await getReports()
|
|
7
7
|
const userData = await report.getUserData()
|
|
8
8
|
|
|
9
|
-
await report.speedingReport(new Date(2021, 2, 30, 0, 0, 0, 0),
|
|
9
|
+
const reportData = await report.speedingReport(new Date(2021, 2, 30, 0, 0, 0, 0),
|
|
10
10
|
new Date(2021, 2, 30, 23, 59, 59, 0),
|
|
11
11
|
userData)
|
|
12
|
+
|
|
13
|
+
console.log(reportData)
|
|
14
|
+
|
|
15
|
+
})
|
|
16
|
+
it('test trip report', async () => {
|
|
17
|
+
const report = await getReports()
|
|
18
|
+
const userData = await report.getUserData()
|
|
19
|
+
userData.byGroup = true
|
|
20
|
+
const reportData = await report.tripReport(new Date(2021, 2, 30, 0, 0, 0, 0),
|
|
21
|
+
new Date(2021, 2, 30, 23, 59, 59, 0),
|
|
22
|
+
userData)
|
|
23
|
+
|
|
24
|
+
console.log(reportData)
|
|
25
|
+
|
|
26
|
+
})
|
|
27
|
+
it('test event report', async () => {
|
|
28
|
+
const report = await getReports()
|
|
29
|
+
const userData = await report.getUserData()
|
|
30
|
+
userData.eventTypes = []
|
|
31
|
+
const reportData = await report.eventsReport(new Date(2021, 10, 20, 0, 0, 0, 0),
|
|
32
|
+
new Date(2021, 10, 30, 23, 59, 59, 0),
|
|
33
|
+
userData)
|
|
34
|
+
|
|
35
|
+
console.log(reportData)
|
|
36
|
+
|
|
12
37
|
})
|
|
13
38
|
it('test kmsReport by day', async () => {
|
|
14
39
|
const reports = await getReports()
|
|
15
40
|
const userData = await reports.getUserData()
|
|
16
41
|
userData.groupByDay = true
|
|
17
|
-
await reports.kmsReport(new Date(2021,
|
|
42
|
+
const reportData = await reports.kmsReport(new Date(2021, 10, 1), new Date(2021, 10, 3),
|
|
43
|
+
userData)
|
|
44
|
+
|
|
45
|
+
console.log(reportData)
|
|
46
|
+
|
|
47
|
+
await reports.kmsReportToPDF(userData, reportData[0])
|
|
48
|
+
})
|
|
49
|
+
it('test locationReport by day', async () => {
|
|
50
|
+
const reports = await getReports()
|
|
51
|
+
const userData = await reports.getUserData()
|
|
52
|
+
userData.groupByDay = true
|
|
53
|
+
const reportData = await reports.locations(new Date(2021, 10, 1), new Date(2021, 10, 3),
|
|
18
54
|
userData)
|
|
55
|
+
|
|
56
|
+
console.log(reportData)
|
|
57
|
+
|
|
58
|
+
await reports.kmsReportToPDF(userData, reportData[0])
|
|
19
59
|
})
|
|
20
60
|
})
|
package/src/kms-report.js
CHANGED
|
@@ -15,6 +15,31 @@ let userData
|
|
|
15
15
|
|
|
16
16
|
const fileName = 'KmsReport'
|
|
17
17
|
|
|
18
|
+
async function createKmsReport(from, to, reportUserData, traccar) {
|
|
19
|
+
console.log('Create KmsReport')
|
|
20
|
+
|
|
21
|
+
console.log(from, to)
|
|
22
|
+
traccarInstance = traccar
|
|
23
|
+
userData = reportUserData
|
|
24
|
+
const reportData = []
|
|
25
|
+
if(userData.byDriver){
|
|
26
|
+
console.log("ByDriver")
|
|
27
|
+
const allData = await createKmsReportByDriver(from, to)
|
|
28
|
+
reportData.push(allData)
|
|
29
|
+
}
|
|
30
|
+
else if(userData.byGroup){
|
|
31
|
+
console.log("ByGroup")
|
|
32
|
+
const allData = await createKmsReportByGroup(from, to)
|
|
33
|
+
reportData.push(...allData)
|
|
34
|
+
} else {
|
|
35
|
+
console.log("ByDevice")
|
|
36
|
+
const allData = await createKmsReportByDevice(from, to)
|
|
37
|
+
reportData.push(allData)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return reportData
|
|
41
|
+
}
|
|
42
|
+
|
|
18
43
|
async function createKmsReportByDevice(from, to) {
|
|
19
44
|
const groupIds = userData.groups.map(g => g.id)
|
|
20
45
|
const devicesToProcess = userData.byGroup ? userData.devices.filter(d => !groupIds.includes(d.groupId)) : userData.devices
|
|
@@ -53,7 +78,37 @@ async function createKmsReportByDriver(from, to) {
|
|
|
53
78
|
}
|
|
54
79
|
|
|
55
80
|
async function createKmsReportByGroup(from, to) {
|
|
81
|
+
const reportData = []
|
|
82
|
+
for (const g of userData.groups) {
|
|
83
|
+
const devices = userData.devices.filter(d => d.groupId === g.id)
|
|
84
|
+
console.log(g.name + ' devices:' + devices.length)
|
|
85
|
+
if(devices.length > 0) {
|
|
86
|
+
const groupData = {
|
|
87
|
+
devices: [],
|
|
88
|
+
group: g,
|
|
89
|
+
xpert: devices.filter(d => d.attributes.xpert).length > 0
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const route = userData.allWeek ? [] : await traccar.getRoute(traccarInstance, from, to, devices)
|
|
93
|
+
const tripsData = await traccar.getTrips(traccarInstance, from, to, devices)
|
|
94
|
+
|
|
95
|
+
devices.sort((a, b) => (a.name > b.name) ? 1 : -1)
|
|
96
|
+
|
|
97
|
+
console.log('trips:' + tripsData.length)
|
|
98
|
+
|
|
99
|
+
if (tripsData.length > 0) {
|
|
100
|
+
await trips.checkTripsKms(traccarInstance, from, to, route, tripsData, devices)
|
|
101
|
+
groupData.devices = processDevices(from, to, devices, route, tripsData)
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
reportData.push(groupData)
|
|
105
|
+
}
|
|
106
|
+
}
|
|
56
107
|
|
|
108
|
+
const withoutGroupData = await createKmsReportByDevice(from, to)
|
|
109
|
+
reportData.push(withoutGroupData)
|
|
110
|
+
|
|
111
|
+
return reportData
|
|
57
112
|
}
|
|
58
113
|
|
|
59
114
|
function processDrivers(from, to, drivers, data) {
|
|
@@ -227,30 +282,6 @@ function processDevices(from, to, devices, route, trips) {
|
|
|
227
282
|
return devicesResult
|
|
228
283
|
}
|
|
229
284
|
|
|
230
|
-
async function createKmsReport(from, to, reportUserData, traccar) {
|
|
231
|
-
console.log('Create KmsReport')
|
|
232
|
-
|
|
233
|
-
console.log(from, to)
|
|
234
|
-
traccarInstance = traccar
|
|
235
|
-
userData = reportUserData
|
|
236
|
-
const reportData = []
|
|
237
|
-
if(userData.byDriver){
|
|
238
|
-
const allData = await createKmsReportByDriver(from, to)
|
|
239
|
-
reportData.push(allData)
|
|
240
|
-
}
|
|
241
|
-
else if(userData.byGroup){
|
|
242
|
-
const allGroupsData = await createKmsReportByGroup(from, to)
|
|
243
|
-
allGroupsData.forEach(data => reportData.push(data))
|
|
244
|
-
const withoutGroupDevices = await createKmsReportByDevice(from, to)
|
|
245
|
-
reportData.push(withoutGroupDevices)
|
|
246
|
-
} else {
|
|
247
|
-
const allData = await createKmsReportByDevice(from, to)
|
|
248
|
-
reportData.push(allData)
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
return reportData
|
|
252
|
-
}
|
|
253
|
-
|
|
254
285
|
async function exportKmsReportToPDF(userData, reportData) {
|
|
255
286
|
const lang = userData.user.attributes.lang || (navigator && navigator.language)
|
|
256
287
|
const translations = messages[lang] ? messages[lang] : messages['en-GB']
|
package/src/speeding-report.js
CHANGED
|
@@ -241,7 +241,6 @@ async function getHereEvents(devices, routes, threshold){
|
|
|
241
241
|
const positions = routes.filter(p => p.deviceId === d.id)
|
|
242
242
|
try {
|
|
243
243
|
const results = await here.routeMatch(positions)
|
|
244
|
-
console.log('results', results)
|
|
245
244
|
const hereAlerts = results.filter(r => r.currentSpeedKmh > (parseInt(r.speedLimit) + threshold)).map(r => {
|
|
246
245
|
const position = positions.find(p => new Date(p.fixTime).getTime() === r.timestamp)
|
|
247
246
|
return {
|
|
@@ -253,7 +252,6 @@ async function getHereEvents(devices, routes, threshold){
|
|
|
253
252
|
attributes: {speedLimit: r.speedLimit, speed: r.currentSpeedKmh / 1.85200}
|
|
254
253
|
}
|
|
255
254
|
})
|
|
256
|
-
console.log('threshold', threshold, hereAlerts)
|
|
257
255
|
const reduced = hereAlerts.reduce((acc, cur, idx, src) => {
|
|
258
256
|
if (idx === 1) {
|
|
259
257
|
return [cur]
|