fleetmap-reports 1.0.271 → 1.0.275

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