fleetmap-reports 1.0.350 → 1.0.351

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetmap-reports",
3
- "version": "1.0.350",
3
+ "version": "1.0.351",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/index.test.js CHANGED
@@ -166,7 +166,7 @@ describe('Test_Reports', function() {
166
166
  assert.equal(device.summary[0].distance, 1386519.1300000101)
167
167
  assert.equal(device.summary[0].startTime, '2022-01-01T13:35:47.000+0000')
168
168
  assert.equal(device.summary[0].endTime, '2022-01-30T13:48:18.000+0000')
169
- }, 20000)
169
+ }, 90000)
170
170
  it('Activity byDevice groupByDay', async () => {
171
171
  const report = await getReports()
172
172
  const userData = await report.getUserData()
@@ -180,7 +180,7 @@ describe('Test_Reports', function() {
180
180
  assert.equal(device.summary[5].distance, 77020.37999999523)
181
181
  assert.equal(device.summary[5].startTime, '2022-01-06T18:35:04.000+0000')
182
182
  assert.equal(device.summary[5].endTime, '2022-01-06T19:54:27.000+0000')
183
- }, 60000)
183
+ }, 90000)
184
184
  it('test allinone', async() => {
185
185
  console.log('Start')
186
186
  const reports = await getReports()
@@ -430,7 +430,6 @@ async function exportSpeedingReportToPDF(userData, reportData) {
430
430
  }
431
431
  }
432
432
 
433
-
434
433
  function exportSpeedingReportToExcel(userData, reportData) {
435
434
  console.log('Export to Excel')
436
435
 
@@ -205,6 +205,7 @@ async function exportTripReportToPDF(userData, reportData) {
205
205
 
206
206
  const timezone = userData.user.attributes.timezone
207
207
  const translations = getTranslations(userData)
208
+ const lang = userData.user.attributes.lang || (navigator && navigator.language)
208
209
  const tripsData = userData.byDriver ? reportData.drivers : reportData.devices
209
210
 
210
211
  const headers = [