fleetmap-reports 1.0.599 → 1.0.601
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/package.json +1 -1
- package/src/stop-report.js +10 -10
- package/src/util/utils.js +1 -1
package/package.json
CHANGED
package/src/stop-report.js
CHANGED
|
@@ -98,7 +98,7 @@ async function exportStopReportToPDF (userData, reportData) {
|
|
|
98
98
|
translations.report.end,
|
|
99
99
|
translations.report.address,
|
|
100
100
|
translations.report.idleTime,
|
|
101
|
-
translations.report.
|
|
101
|
+
translations.report.event_ignitionOff
|
|
102
102
|
]
|
|
103
103
|
|
|
104
104
|
if (stopsData) {
|
|
@@ -128,16 +128,16 @@ async function exportStopReportToPDF (userData, reportData) {
|
|
|
128
128
|
getStopStart(userData.user, a),
|
|
129
129
|
getStopEnd(userData.user, a),
|
|
130
130
|
a.endPOIName || a.address,
|
|
131
|
-
convertMS(a.engineHours),
|
|
132
|
-
convertMS(a.stopDuration)
|
|
131
|
+
convertMS(a.engineHours, true),
|
|
132
|
+
convertMS(a.stopDuration, true)
|
|
133
133
|
])
|
|
134
134
|
})
|
|
135
135
|
|
|
136
136
|
const footValues = [
|
|
137
137
|
'Total:' + d.stops.length,
|
|
138
138
|
'', '', '',
|
|
139
|
-
convertMS(d.stops.reduce((a, b) => a + b.engineHours, 0)),
|
|
140
|
-
convertMS(d.stops.reduce((a, b) => a + b.stopDuration, 0))]
|
|
139
|
+
convertMS(d.stops.reduce((a, b) => a + b.engineHours, 0), true),
|
|
140
|
+
convertMS(d.stops.reduce((a, b) => a + b.stopDuration, 0), true)]
|
|
141
141
|
|
|
142
142
|
const style = getStyle(getUserPartner(userData.user))
|
|
143
143
|
addTable(doc,
|
|
@@ -168,7 +168,7 @@ function exportStopReportToExcel (userData, reportData) {
|
|
|
168
168
|
{ label: translations.report.end, value: 'end' },
|
|
169
169
|
{ label: translations.report.address, value: 'address' },
|
|
170
170
|
{ label: translations.report.idleTime, value: 'idleTime' },
|
|
171
|
-
{ label: translations.report.
|
|
171
|
+
{ label: translations.report.event_ignitionOff, value: 'stopTime' }
|
|
172
172
|
]
|
|
173
173
|
|
|
174
174
|
let data = []
|
|
@@ -182,15 +182,15 @@ function exportStopReportToExcel (userData, reportData) {
|
|
|
182
182
|
start: getStopStart(userData.user, a),
|
|
183
183
|
end: getStopEnd(userData.user, a),
|
|
184
184
|
address: a.endPOIName || a.address,
|
|
185
|
-
idleTime: convertMS(a.engineHours),
|
|
186
|
-
stopTime: convertMS(a.stopDuration)
|
|
185
|
+
idleTime: convertMS(a.engineHours, true),
|
|
186
|
+
stopTime: convertMS(a.stopDuration, true)
|
|
187
187
|
}
|
|
188
188
|
}))
|
|
189
189
|
// Totals
|
|
190
190
|
data = data.concat([{
|
|
191
191
|
name: d.stops.length,
|
|
192
|
-
idleTime: convertMS(d.stops.reduce((a, b) => a + b.engineHours, 0)),
|
|
193
|
-
stopTime: convertMS(d.stops.reduce((a, b) => a + b.stopDuration, 0))
|
|
192
|
+
idleTime: convertMS(d.stops.reduce((a, b) => a + b.engineHours, 0), true),
|
|
193
|
+
stopTime: convertMS(d.stops.reduce((a, b) => a + b.stopDuration, 0), true)
|
|
194
194
|
}])
|
|
195
195
|
data = data.concat([{}])
|
|
196
196
|
})
|