fleetmap-reports 1.0.266 → 1.0.267
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/workspace.xml +26 -3
- package/package.json +1 -1
- package/src/trip-report.js +2 -2
package/.idea/workspace.xml
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<project version="4">
|
|
3
3
|
<component name="ChangeListManager">
|
|
4
|
-
<list default="true" id="eb665c86-c893-4333-bd2a-721dc27980b9" name="Changes" comment="
|
|
4
|
+
<list default="true" id="eb665c86-c893-4333-bd2a-721dc27980b9" name="Changes" comment="check if weekDays parameter is set">
|
|
5
5
|
<change beforePath="$PROJECT_DIR$/package-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/package-lock.json" afterDir="false" />
|
|
6
|
+
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
|
|
6
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/trip-report.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/trip-report.js" afterDir="false" />
|
|
7
9
|
</list>
|
|
8
10
|
<option name="SHOW_DIALOG" value="false" />
|
|
9
11
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
@@ -222,6 +224,8 @@
|
|
|
222
224
|
<workItem from="1641387675790" duration="32947000" />
|
|
223
225
|
<workItem from="1641509412324" duration="41000" />
|
|
224
226
|
<workItem from="1641510744190" duration="1404000" />
|
|
227
|
+
<workItem from="1641526151665" duration="1679000" />
|
|
228
|
+
<workItem from="1641640203903" duration="3434000" />
|
|
225
229
|
</task>
|
|
226
230
|
<task id="LOCAL-00001" summary="Fix getStyle">
|
|
227
231
|
<created>1636983717385</created>
|
|
@@ -384,12 +388,30 @@
|
|
|
384
388
|
<option name="project" value="LOCAL" />
|
|
385
389
|
<updated>1641511586537</updated>
|
|
386
390
|
</task>
|
|
387
|
-
<
|
|
391
|
+
<task id="LOCAL-00024" summary="check if weekDays parameter is set">
|
|
392
|
+
<created>1641527800168</created>
|
|
393
|
+
<option name="number" value="00024" />
|
|
394
|
+
<option name="presentableId" value="LOCAL-00024" />
|
|
395
|
+
<option name="project" value="LOCAL" />
|
|
396
|
+
<updated>1641527800170</updated>
|
|
397
|
+
</task>
|
|
398
|
+
<option name="localTasksCounter" value="25" />
|
|
388
399
|
<servers />
|
|
389
400
|
</component>
|
|
390
401
|
<component name="TypeScriptGeneratedFilesManager">
|
|
391
402
|
<option name="version" value="3" />
|
|
392
403
|
</component>
|
|
404
|
+
<component name="Vcs.Log.History.Properties">
|
|
405
|
+
<option name="COLUMN_ID_ORDER">
|
|
406
|
+
<list>
|
|
407
|
+
<option value="Default.Root" />
|
|
408
|
+
<option value="Default.Author" />
|
|
409
|
+
<option value="Default.Date" />
|
|
410
|
+
<option value="Default.Subject" />
|
|
411
|
+
<option value="Space.CommitStatus" />
|
|
412
|
+
</list>
|
|
413
|
+
</option>
|
|
414
|
+
</component>
|
|
393
415
|
<component name="Vcs.Log.Tabs.Properties">
|
|
394
416
|
<option name="TAB_STATES">
|
|
395
417
|
<map>
|
|
@@ -425,6 +447,7 @@
|
|
|
425
447
|
<MESSAGE value="activity report by driver grouped by day" />
|
|
426
448
|
<MESSAGE value="fix kms-report by driver and fix activity report with time period" />
|
|
427
449
|
<MESSAGE value="Refactor trip and speeding reports" />
|
|
428
|
-
<
|
|
450
|
+
<MESSAGE value="check if weekDays parameter is set" />
|
|
451
|
+
<option name="LAST_COMMIT_MESSAGE" value="check if weekDays parameter is set" />
|
|
429
452
|
</component>
|
|
430
453
|
</project>
|
package/package.json
CHANGED
package/src/trip-report.js
CHANGED
|
@@ -128,8 +128,8 @@ function processDevices(from, to, devices, data, stopsData) {
|
|
|
128
128
|
|
|
129
129
|
trips.forEach(trip => {
|
|
130
130
|
if (automaticReports.deviceWithFuelInfo(d)) {
|
|
131
|
-
trip.fuelConsumption = Math.round((
|
|
132
|
-
trip.avgFuelConsumption =
|
|
131
|
+
trip.fuelConsumption = Math.round((trip.spentFuel * d.attributes.fuel_tank_capacity) / 100)
|
|
132
|
+
trip.avgFuelConsumption = trip.totalKms > 0 ? Math.round(trip.fuelConsumption * 100 / trip.totalKms) : 0
|
|
133
133
|
} else {
|
|
134
134
|
trip.fuelConsumption = '-'
|
|
135
135
|
trip.avgFuelConsumption = '-'
|