fleetmap-reports 1.0.241 → 1.0.245

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,302 @@
1
+ Index: src/kms-report.js
2
+ IDEA additional info:
3
+ Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
4
+ <+>const {createActivityReport} = require(\"./activity-report\");\nconst messages = require('../lang')\nconst jsPDF = require('jspdf')\nrequire('jspdf-autotable')\nconst {getStyle} = require(\"./reportStyle\");\nconst {headerFromUser,addTable} = require(\"./util/pdfDocument\");\nconst {getUserPartner} = require(\"fleetmap-partners\");\nconst automaticReports = require(\"./automaticReports\");\n\n\nlet traccarInstance\n\nconst fileName = 'KmsReport'\n\nasync function createKmsReportByDevice(from, to, userData) {\n const groupIds = userData.groups.map(g => g.id)\n const devicesToProcess = userData.byGroup ? userData.devices.filter(d => !groupIds.includes(d.groupId)) : userData.devices\n\n const allData = {\n devices: [],\n from: from,\n to: to\n }\n\n devicesToProcess.sort((a, b) => (a.name > b.name) ? 1 : -1)\n const devicesToSlice = devicesToProcess.slice()\n\n const arrayOfArrays = automaticReports.sliceArray(devicesToSlice)\n let data = []\n for (const a of arrayOfArrays) {\n const response = await traccarInstance.reports.reportsRouteGet(from, to, a.map(d => d.id))\n data = data.concat(response.data)\n }\n\n console.log('locations:' + data.length)\n\n if (data.length > 0) {\n allData.devices = processDevices(from, to, devicesToProcess, data)\n }\n\n return allData\n}\n\nasync function createKmsReportByDriver(from, to, userData) {\n\n}\n\nasync function createKmsReportByGroup(from, to, userData) {\n\n}\n\nfunction processDevices(from, to, devices, data) {\n const devicesResult = []\n\n for (const d of devices) {\n const locations = data.filter(t => t.deviceId === d.id)\n\n if (locations.length > 0) {\n locations.forEach(l => l.locationDate = l.fixTime.substring(0, 10))\n const groupedLocations = locations.reduce(\n (entryMap, e) => entryMap.set(e.locationDate, [...entryMap.get(e.locationDate)||[], e]),\n new Map()\n )\n\n const days = []\n const keys = Array.from(groupedLocations.keys())\n\n keys.forEach(key => {\n const dayLocations = groupedLocations.get(key)\n const day = {\n date: new Date(key).toLocaleDateString(),\n kms: dayLocations.reduce((a, b) => a + b.attributes.distance, 0) || 0\n }\n days.push(day)\n })\n\n devicesResult.push({\n device: d,\n days: days\n })\n }\n }\n\n return devicesResult\n}\n\nasync function createKmsReport(from, to, userData, traccar) {\n console.log('Create KmsReport')\n traccarInstance = traccar\n if(userData.groupByDay){\n const reportData = []\n\n if(userData.byDriver){\n const allData = await createKmsReportByDriver(from, to, userData)\n reportData.push(allData)\n }\n else if(userData.byGroup){\n const allGroupsData = await createKmsReportByGroup(from, to, userData)\n allGroupsData.forEach(data => reportData.push(data))\n const withoutGroupDevices = await createKmsReportByDevice(from, to, userData)\n reportData.push(withoutGroupDevices)\n } else {\n const allData = await createKmsReportByDevice(from, to, userData)\n reportData.push(allData)\n }\n\n return reportData\n } else {\n return await createActivityReport(from, to, userData, traccar)\n }\n}\n\nasync function exportKmsReportToPDF(userData, reportData) {\n const lang = userData.user.attributes.lang\n const translations = messages[lang] ? messages[lang] : messages['en-GB']\n const kmsData = userData.byDriver ? reportData.drivers : reportData.devices\n\n const headers = []\n if(userData.groupByDay) {\n headers.push(translations.report.date,\n translations.report.distance)\n }\n else if(userData.byDriver) {\n headers.push(translations.report.driver,\n translations.report.group,\n translations.report.distance)\n } else {\n headers.push(translations.report.name,\n translations.settings.vehicle_model,\n translations.report.group,\n translations.report.distance)\n }\n if (kmsData) {\n let first = true\n const doc = userData.groupByDay ? new jsPDF.jsPDF() : new jsPDF.jsPDF('l')\n await headerFromUser(doc, translations.report.titleKmsReport, userData.user)\n\n if (userData.groupByDay) {\n for (const d of kmsData) {\n const name = userData.byDriver ? d.driver.name : d.device.name\n const group = userData.byDriver ? userData.groups.find(g => g.drivers.includes(d.id)) : userData.groups.find(g => d.device.groupId === g.id)\n\n let space = 0\n if (!first) {\n doc.addPage()\n } else {\n first = false\n space = 8\n }\n doc.setFontSize(13)\n doc.text(name, 20, space + 20)\n doc.setFontSize(11)\n doc.text(group ? translations.report.group + ': ' + group.name : '', 150, space + 20)\n doc.text(new Date(reportData.from).toLocaleString() + ' - ' + new Date(reportData.to).toLocaleString(), 20, space + 25)\n\n const data = []\n d.days.forEach(day => {\n const temp = [\n new Date(day.date).toLocaleDateString(),\n (day.kms/1000).toFixed(0)\n ]\n\n data.push(temp)\n })\n\n const footValues = []\n footValues.push(\n '',\n (d.days.reduce((a, b) => a + b.kms, 0)/1000).toFixed(0)\n )\n\n const style = getStyle(getUserPartner(userData.user))\n\n addTable(doc, headers, data, footValues, style, 35)\n }\n } else {\n const data = []\n if (userData.byDriver) {\n reportData.drivers.forEach(d => {\n const group = userData.groups.find(g => g.drivers.includes(d.driver.id))\n\n const temp = [\n d.driver.name,\n group ? group.name : '',\n Number((d.summary.distance / 1000).toFixed(0)),\n ]\n data.push(temp)\n })\n } else {\n reportData.devices.forEach(d => {\n const group = userData.groups.find(g => d.device.groupId === g.id)\n\n const temp = [\n d.summary.deviceName,\n d.device.model,\n group ? group.name : '',\n Number((d.summary.distance / 1000).toFixed(0))\n ]\n data.push(temp)\n })\n }\n\n const footValues = []\n if(userData.byDriver) {\n footValues.push(\n 'Total:' + reportData.drivers.length,\n '',\n (reportData.drivers.reduce((a, b) => a + b.summary.distance, 0)/1000).toFixed(0)\n )\n } else {\n footValues.push(\n 'Total:' + reportData.devices.length,\n '',\n '',\n (reportData.devices.reduce((a, b) => a + b.summary.distance, 0)/1000).toFixed(0),\n )\n }\n\n const style = getStyle(getUserPartner(userData.user))\n\n addTable(doc, headers, data, footValues, style, 35)\n }\n return doc\n }\n}\n\nfunction exportKmsReportToExcel(userData, reportData) {\n console.log('Export to Excel')\n\n const lang = userData.user.attributes.lang || (navigator && navigator.language)\n const translations = messages[lang] ? messages[lang] : messages['en-GB']\n\n const settings = {\n sheetName: translations.report.titleKmsReport, // The name of the sheet\n fileName: fileName // The name of the spreadsheet\n }\n\n const headers = []\n\n if(userData.groupByDay) {\n headers.push(\n {label: translations.report.vehicle, value: 'name'},\n {label: translations.report.group, value: 'group'},\n {label: translations.report.date, value: 'date'},\n {label: translations.report.distance, value: 'distance'})\n } else if(userData.byDriver) {\n headers.push(\n {label: translations.report.driver, value: 'name'},\n {label: translations.report.group, value: 'group'},\n {label: translations.report.distance, value: 'distance'})\n } else {\n headers.push(\n {label: translations.report.driver, value: 'name'},\n {label: translations.settings.vehicle_licenseplate, value: 'licenseplate'},\n {label: translations.report.group, value: 'group'},\n {label: translations.report.distance, value: 'distance'})\n }\n\n let data = []\n const info = userData.byDriver ? reportData.drivers : reportData.devices\n info.forEach(d => {\n const group = userData.byDriver ? userData.groups.find(g => g.drivers.includes(d.driver.id)) :\n userData.groups.find(g => d.device.groupId === g.id)\n\n if (userData.groupByDay) {\n data = data.concat([{}])\n data = data.concat(d.days.map(a => {\n return {\n name: userData.byDriver ? d.driver.name : d.device.name,\n group: group ? group.name : '',\n licenseplate: d.device.attributes.license_plate,\n date: a.date,\n distance: Number((a.kms / 1000).toFixed(0))\n }\n }))\n } else {\n data = data.concat([{\n name: userData.byDriver ? d.driver.name : d.summary.deviceName,\n group: group ? group.name : '',\n licenseplate: d.device.attributes.license_plate,\n distance: Number((d.summary.distance / 1000).toFixed(0))\n }])\n }\n })\n\n return {\n headers,\n data,\n settings\n }\n}\n\nexports.createKmsReport = createKmsReport\nexports.exportKmsReportToPDF = exportKmsReportToPDF\nexports.exportKmsReportToExcel = exportKmsReportToExcel\n
5
+ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
6
+ <+>UTF-8
7
+ ===================================================================
8
+ diff --git a/src/kms-report.js b/src/kms-report.js
9
+ --- a/src/kms-report.js (revision 58228cbbf2fb1d2086aedd420a0492cca40a9e64)
10
+ +++ b/src/kms-report.js (date 1637843169450)
11
+ @@ -6,6 +6,7 @@
12
+ const {headerFromUser,addTable} = require("./util/pdfDocument");
13
+ const {getUserPartner} = require("fleetmap-partners");
14
+ const automaticReports = require("./automaticReports");
15
+ +const {jsPDFOptions} = require("jspdf");
16
+
17
+
18
+ let traccarInstance
19
+ @@ -132,8 +133,8 @@
20
+ }
21
+ if (kmsData) {
22
+ let first = true
23
+ - const doc = userData.groupByDay ? new jsPDF.jsPDF() : new jsPDF.jsPDF('l')
24
+ - await headerFromUser(doc, translations.report.titleKmsReport, userData.user)
25
+ + const doc = userData.groupByDay ? new jsPDF.jsPDF('p') : new jsPDF.jsPDF('l')
26
+ + await headerFromUser(doc, translations.report.titleKmsReport, userData.user, 'p')
27
+
28
+ if (userData.groupByDay) {
29
+ for (const d of kmsData) {
30
+ @@ -156,7 +157,7 @@
31
+ const data = []
32
+ d.days.forEach(day => {
33
+ const temp = [
34
+ - new Date(day.date).toLocaleDateString(),
35
+ + day.date,
36
+ (day.kms/1000).toFixed(0)
37
+ ]
38
+
39
+ @@ -240,6 +241,7 @@
40
+ if(userData.groupByDay) {
41
+ headers.push(
42
+ {label: translations.report.vehicle, value: 'name'},
43
+ + {label: translations.report.licensePlate, value: 'licenseplate'},
44
+ {label: translations.report.group, value: 'group'},
45
+ {label: translations.report.date, value: 'date'},
46
+ {label: translations.report.distance, value: 'distance'})
47
+ @@ -250,8 +252,8 @@
48
+ {label: translations.report.distance, value: 'distance'})
49
+ } else {
50
+ headers.push(
51
+ - {label: translations.report.driver, value: 'name'},
52
+ - {label: translations.settings.vehicle_licenseplate, value: 'licenseplate'},
53
+ + {label: translations.report.vehicle, value: 'name'},
54
+ + {label: translations.report.licensePlate, value: 'licenseplate'},
55
+ {label: translations.report.group, value: 'group'},
56
+ {label: translations.report.distance, value: 'distance'})
57
+ }
58
+ @@ -262,25 +264,25 @@
59
+ const group = userData.byDriver ? userData.groups.find(g => g.drivers.includes(d.driver.id)) :
60
+ userData.groups.find(g => d.device.groupId === g.id)
61
+
62
+ - if (userData.groupByDay) {
63
+ - data = data.concat([{}])
64
+ - data = data.concat(d.days.map(a => {
65
+ - return {
66
+ - name: userData.byDriver ? d.driver.name : d.device.name,
67
+ - group: group ? group.name : '',
68
+ - licenseplate: d.device.attributes.license_plate,
69
+ - date: a.date,
70
+ - distance: Number((a.kms / 1000).toFixed(0))
71
+ - }
72
+ - }))
73
+ - } else {
74
+ - data = data.concat([{
75
+ - name: userData.byDriver ? d.driver.name : d.summary.deviceName,
76
+ - group: group ? group.name : '',
77
+ - licenseplate: d.device.attributes.license_plate,
78
+ - distance: Number((d.summary.distance / 1000).toFixed(0))
79
+ - }])
80
+ - }
81
+ + if (userData.groupByDay) {
82
+ + data = data.concat([{}])
83
+ + data = data.concat(d.days.map(a => {
84
+ + return {
85
+ + name: d.device.name,
86
+ + group: group ? group.name : '',
87
+ + licenseplate: d.device.attributes.license_plate,
88
+ + date: a.date,
89
+ + distance: Number((a.kms / 1000).toFixed(0))
90
+ + }
91
+ + }))
92
+ + } else {
93
+ + data = data.concat([{
94
+ + name: userData.byDriver ? d.driver.name : d.summary.deviceName,
95
+ + group: group ? group.name : '',
96
+ + licenseplate: userData.byDriver ? '' : d.device.attributes.license_plate,
97
+ + distance: Number((d.summary.distance / 1000).toFixed(0))
98
+ + }])
99
+ + }
100
+ })
101
+
102
+ return {
103
+ Index: src/util/pdfDocument.js
104
+ IDEA additional info:
105
+ Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
106
+ <+>require('jspdf-autotable')\nconst {getStyle} = require(\"../reportStyle\");\nconst {getUserPartner} = require(\"fleetmap-partners\");\nconst {getImgFromUrl} = require(\"./utils\")\n\nasync function header(doc, title, hostname, style) {\n doc.setFontSize(16)\n doc.setFont('helvetica', 'bold')\n doc.text(title, 15, 15 )\n\n if(style.imgWidth && style.imgHeight) {\n try{\n const image = await getImgFromUrl(hostname)\n if(image){\n doc.addImage(image, 'PNG', 220 + (style.imgWidth < 50 ? 25 : 0), 5, style.imgWidth, style.imgHeight)\n }\n } catch (e) {\n }\n }\n doc.setFont('helvetica', 'normal')\n}\n\nasync function headerFromUser(doc, title, user) {\n const partner = getUserPartner(user)\n return header(doc, title, partner.host, getStyle(partner))\n}\n\nfunction addTable(doc, headers, data, footValues, style, startY){\n doc.autoTable({\n head: [headers],\n body: data,\n foot: [footValues],\n showFoot: 'lastPage',\n headStyles: {\n fillColor: style.pdfHeaderColor,\n textColor: style.pdfHeaderTextColor,\n fontSize: 10\n },\n bodyStyles: {\n fillColor: style.pdfBodyColor,\n textColor: style.pdfBodyTextColor,\n fontSize: 8\n },\n footStyles: {\n fillColor: style.pdfFooterColor,\n textColor: style.pdfFooterTextColor,\n fontSize: 9\n },\n startY: startY });\n}\n\nexports.header = header\nexports.headerFromUser = headerFromUser\nexports.addTable = addTable\n
107
+ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
108
+ <+>UTF-8
109
+ ===================================================================
110
+ diff --git a/src/util/pdfDocument.js b/src/util/pdfDocument.js
111
+ --- a/src/util/pdfDocument.js (revision 58228cbbf2fb1d2086aedd420a0492cca40a9e64)
112
+ +++ b/src/util/pdfDocument.js (date 1637843134108)
113
+ @@ -3,7 +3,7 @@
114
+ const {getUserPartner} = require("fleetmap-partners");
115
+ const {getImgFromUrl} = require("./utils")
116
+
117
+ -async function header(doc, title, hostname, style) {
118
+ +async function header(doc, title, hostname, style, orientation) {
119
+ doc.setFontSize(16)
120
+ doc.setFont('helvetica', 'bold')
121
+ doc.text(title, 15, 15 )
122
+ @@ -12,7 +12,7 @@
123
+ try{
124
+ const image = await getImgFromUrl(hostname)
125
+ if(image){
126
+ - doc.addImage(image, 'PNG', 220 + (style.imgWidth < 50 ? 25 : 0), 5, style.imgWidth, style.imgHeight)
127
+ + doc.addImage(image, 'PNG', (orientation === 'l' ? 220 : 175) + (style.imgWidth < 50 ? 25 : 0), 5, style.imgWidth, style.imgHeight)
128
+ }
129
+ } catch (e) {
130
+ }
131
+ @@ -20,9 +20,9 @@
132
+ doc.setFont('helvetica', 'normal')
133
+ }
134
+
135
+ -async function headerFromUser(doc, title, user) {
136
+ +async function headerFromUser(doc, title, user, orientation='l') {
137
+ const partner = getUserPartner(user)
138
+ - return header(doc, title, partner.host, getStyle(partner))
139
+ + return header(doc, title, partner.host, getStyle(partner), orientation)
140
+ }
141
+
142
+ function addTable(doc, headers, data, footValues, style, startY){
143
+ Index: src/index.test.js
144
+ IDEA additional info:
145
+ Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
146
+ <+>const Index = require('./index')\nconst {SessionApi} = require(\"traccar-api\");\nconst axios = require('axios')\nconst axiosCookieJarSupport = require('axios-cookiejar-support').default;\nconst tough = require('tough-cookie');\nconst cookieJar = new tough.CookieJar();\n\naxiosCookieJarSupport(axios)\n\ntest('speedingReport', async () => {\n const traccarConfig = {\n basePath: 'https://api.pinme.io/api',\n baseOptions: {\n withCredentials: true,\n jar: cookieJar\n }\n }\n\n await new SessionApi(traccarConfig, null, axios).sessionPost('-','-')\n const report = new Index(traccarConfig, axios)\n const userData = await report.getUserData()\n\n await report.speedingReport(new Date(2021, 2, 30, 0, 0, 0, 0),\n new Date(2021, 2, 30, 23, 59, 59, 0),\n userData)\n\n}, 10000)\n
147
+ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
148
+ <+>UTF-8
149
+ ===================================================================
150
+ diff --git a/src/index.test.js b/src/index.test.js
151
+ --- a/src/index.test.js (revision 58228cbbf2fb1d2086aedd420a0492cca40a9e64)
152
+ +++ b/src/index.test.js (date 1637711242723)
153
+ @@ -3,25 +3,42 @@
154
+ const axios = require('axios')
155
+ const axiosCookieJarSupport = require('axios-cookiejar-support').default;
156
+ const tough = require('tough-cookie');
157
+ +const style = require("./reportStyle");
158
+ const cookieJar = new tough.CookieJar();
159
+
160
+ axiosCookieJarSupport(axios)
161
+
162
+ -test('speedingReport', async () => {
163
+ - const traccarConfig = {
164
+ - basePath: 'https://api.pinme.io/api',
165
+ - baseOptions: {
166
+ - withCredentials: true,
167
+ - jar: cookieJar
168
+ - }
169
+ - }
170
+ +
171
+ +describe('test reports', function() {
172
+ + this.timeout(9000000)
173
+ + it('test queue', async () => {
174
+ + const traccarConfig = {
175
+ + basePath: 'https://api.fleetmap.io/api',
176
+ + baseOptions: {
177
+ + withCredentials: true,
178
+ + jar: cookieJar
179
+ + }
180
+ + }
181
+
182
+ - await new SessionApi(traccarConfig, null, axios).sessionPost('-','-')
183
+ - const report = new Index(traccarConfig, axios)
184
+ - const userData = await report.getUserData()
185
+ -
186
+ - await report.speedingReport(new Date(2021, 2, 30, 0, 0, 0, 0),
187
+ - new Date(2021, 2, 30, 23, 59, 59, 0),
188
+ - userData)
189
+ + await new SessionApi(traccarConfig, null, axios).sessionPost('jppenas@gmail.com', 'penas46881')
190
+ + const report = new Index(traccarConfig, axios)
191
+ + const userData = await report.getUserData()
192
+ + userData.groupByDay = true
193
+ + const reportData = await report.kmsReport(new Date(2021, 10, 19, 0, 0, 0, 0),
194
+ + new Date(2021, 10, 21, 23, 59, 59, 0),
195
+ + userData)
196
+
197
+ -}, 10000)
198
+ + const reportResult = reportData[0]
199
+ + reportResult.devices.forEach(d => {
200
+ + console.log(d.device.name)
201
+ + d.days.forEach(day => {
202
+ + console.log(day.date + ' - ' + day.kms)
203
+ + })
204
+ + })
205
+ +
206
+ +
207
+ + const pdf = report.kmsReportToPDF(userData, reportResult)
208
+ +
209
+ + console.log(pdf)
210
+ + })
211
+ +})
212
+ Index: lang/enGB.js
213
+ IDEA additional info:
214
+ Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
215
+ <+>module.exports = {\n route: {\n map: 'Map',\n dashboard: 'Dashboard',\n reports: 'Reports',\n report: 'Report',\n report_trip_title: 'Trip Report',\n report_location_title: 'Location Report',\n report_zone_crossing: 'Zone Report',\n report_speeding: 'Relatório de Excessos de Velocidade',\n report_speeding_beta: 'Relatório de Excessos de Velocidade BETA',\n report_tolls: 'Relatório de Portagens',\n settings: 'Settings',\n duration: 'Duration'\n },\n map: {\n geofence_create_title: 'New geofence',\n geofence_create_name: 'Please enter the name of this geofence...',\n geofence_created: 'Geofence created sucessfully!',\n geofence_create_canceled: 'Input canceled',\n poi_create_title: 'New POI',\n poi_create_name: 'Please enter the name of this POI...',\n poi_created: 'POI created sucessfully!',\n poi_create_canceled: 'Input canceled',\n create_confirm: 'OK',\n create_cancel: 'Cancel',\n loading: 'Loading',\n totalDistance: 'Distância total'\n },\n vehicleList: {\n title: 'Vehicle',\n search: 'Search...',\n column_name: 'Name',\n column_speed: 'Km/h',\n column_lastUpdate: 'Last update'\n },\n vehicleTable: {\n immobilize: 'Immobilize',\n de_immobilize: 'De-Immobilize',\n send_immobilization: 'Send immobilization command?',\n send_de_immobilization: 'Send de-immobilization command?',\n all_vehicles: 'All',\n moving_vehicles: 'Moving',\n idle_vehicles: 'Idle',\n stopped_vehicles: 'Stopped',\n disconnected_vehicles: 'Disconnected'\n },\n vehicleDetail: {\n show_route: 'Show route'\n },\n poiTable: {\n showPOIs: 'Show POIs',\n edit_poi: 'Edit',\n delete_poi: 'Delete'\n },\n dashboard: {\n startdate: 'Start date',\n enddate: 'End Date',\n period_lastweek: 'Last week',\n period_lastmonth: 'Last month',\n period_last3month: 'Last 3 months'\n },\n navbar: {\n profile: 'Profile',\n notifications: 'Notifications',\n settings: 'Settings',\n logout: 'Log Out'\n },\n login: {\n login_user: 'Email',\n login_password: 'Password',\n login_button: 'Login',\n login_password_warn: 'The password can not be less than 6 digits'\n },\n profile: {\n user_account: 'Account',\n user_name: 'Name',\n user_email: 'E-mail',\n user_password: 'Password',\n user_phone: 'Phone',\n user_language: 'Language',\n user_timezone: 'Timezone',\n user_update_button: 'Update',\n user_updated: 'User information has been updated successfully.',\n user_name_required: 'Name field is required',\n user_email_required: 'Please input a valid email',\n user_password_lengh: 'The password can not be less than 6 digits'\n },\n settings: {\n map: 'Map',\n vehicles: 'Vehicles',\n title: 'Settings',\n route_match: 'Route match',\n alerts: 'Alerts',\n alerts_type: 'Type',\n alerts_notificators: 'Notificators',\n alert_ignitionOff: 'Ignition Off',\n alert_ignitionOn: 'Ignition On',\n alert_geofenceEnter: 'Geofence Enter',\n alert_geofenceExit: 'Geofence Exit',\n alert_deviceOverspeed: 'Device Overspeed',\n alert_deleted: 'Alert has been deleted',\n alert_delete_info: 'Do you want to delete the alert ',\n alert_delete_title: 'Delete Alert',\n alert_edit_confirm: 'Confirm',\n alert_edit_cancel: 'Cancel',\n alert_created: 'Alert created sucessfully!',\n alert_updated: 'Alert updated sucessfully!',\n alert_add: 'Add Alert',\n alert_edit: 'Edit Alert',\n alert_delete: 'Delete Alert',\n alert_overspeed_warning: 'Vehicle without defined top speed',\n alert_geofences_warning: 'Vehicle without associated geofences',\n alert_associate_geofences: 'Associate Geofences',\n alert_form_type: 'Type:',\n alert_form_type_placeholder: 'Select alert type',\n alert_form_vehicles: 'Vehicles:',\n alert_form_geofences: 'Geofences:',\n alert_form_all_vehicles: 'All vehicles',\n alert_form_vehicles_placeholder: 'Select vehicles',\n alert_form_notificator_web: 'Web',\n alert_form_notificator_email: 'E-mail',\n alert_form_notificator_sms: 'SMS',\n alert_form_confirm: 'Save',\n alert_form_cancel: 'Cancel',\n alert_form_geofences_placeholder: 'Select geofences',\n vehicle_edit: 'Edit Vehicle',\n vehicle_name: 'Name',\n vehicle_licenseplate: 'License Plate',\n vehicle_model: 'Model',\n vehicle_speed_limit: 'Speed Limit',\n vehicle_form_cancel: 'Cancel',\n vehicle_form_confirm: 'Save',\n vehicle_form_name: 'Name',\n vehicle_form_model: 'Model',\n vehicle_form_speed_limit: 'Speed Limit (Km/h)',\n vehicle_updated: 'Vehicle updated sucessfully!'\n },\n geofence: {\n showGeofences: 'Show Geofences',\n geofence_name: 'Name',\n geofence_edit: 'Edit',\n geofence_delete: 'Delete',\n geofence_deleted: 'Geofence has been deleted',\n geofence_delete_info: 'Do you want to delete geofence ',\n geofence_delete_title: 'Delete Geofence',\n geofence_edit_title: 'Edit Geofence',\n geofence_edit_name: 'Please enter the name of this geofence...',\n geofence_edit_confirm: 'Confirm',\n geofence_edit_cancel: 'Cancel',\n geofence_edit_canceled: 'Edit canceled',\n geofence_edited: 'Geofence edited sucessfully!',\n poi_delete_info: 'Do you want to delete POI ',\n poi_delete_title: 'Delete POI',\n poi_edited: 'POI edited sucessfully!',\n poi_deleted: 'POI has been deleted',\n poi_edit_title: 'Edit POI',\n poi_edit_name: 'Please enter the name of this POI...',\n searchGeofence: 'Search geofence',\n edit_geofence: 'Edit',\n delete_geofence: 'Delete'\n },\n report: {\n temperature: 'Temperatura',\n temperature2: 'Temperatura2',\n select_vehicles: 'Select vehicles',\n select_vehicles_placeholder: 'Vehicles',\n select_geofences: 'Select geofences',\n select_geofences_placeholder: 'Geofences',\n select_period: 'Select period',\n period: 'Period',\n date_start: 'Start date',\n date_end: 'End date',\n generate_report: 'Generate report',\n validate_period: 'Por favor seleccione o período',\n user: 'User',\n titleTripReport: 'Trip Report',\n titleLocationReport: 'Locations Report',\n titleSpeedingReport: 'Overspeed Report',\n titleZoneReport: 'Zone Report',\n titleRefuelReport: 'Refueling Report',\n titleFuelDropReport: 'Fuel Drop Report',\n titleEventsReport: 'Events Report',\n titleActivityReport: 'Activity Report',\n titleKmsReport: 'Kms Report',\n from: 'From',\n to: 'to',\n headerStartAddress: 'Start address',\n headerDistance: 'Distance',\n headerDrivingTime: 'Driving Time',\n headerMaxSpeed: 'Max Speed',\n date: 'Date',\n start: 'Start',\n end: 'End',\n endAddress: 'Destination',\n tripTime: 'Duration',\n idleTime: 'Idle',\n stopTime: 'Stop',\n distance: 'Distance',\n speed: 'Speed',\n roadSpeedLimit: 'Limite da estrada',\n overspeed: 'Alert On',\n avgSpeed: 'Avg Speed',\n maxSpeed: 'Max Speed',\n driver: 'Driver',\n group: 'Group',\n address: 'Address',\n ignition: 'Ignition',\n ignitionOn: 'On',\n ignitionOff: 'Off',\n enter: 'Enter',\n exit: 'Exit',\n geofence: 'Geofence',\n duration: 'Duration',\n vehicles: 'Vehicles',\n vehicle: 'Vehicle',\n odometer: 'Odometer',\n startOdometer: 'Start (Km)',\n endOdometer: 'End (Km)',\n spentFuel: 'Spent Fuel',\n engineHours: 'Use (H:m)',\n driverHours: 'Driving Time (H:m)',\n refueling: 'Refueling',\n totalRefueled: 'Total Refueled',\n totalFuelDrops: 'Total Fuel Drops',\n totalFuelDropLiters: 'Total Fuel Lost',\n speedLimit: 'Speed Limit',\n eventType: 'Event',\n info: 'Information',\n event_ignitionOff: 'Ignition Off',\n event_ignitionOn: 'Ignition On',\n event_deviceOverspeed: 'Device Overspeed',\n event_geofenceEnter: 'Geofence Enter',\n event_geofenceExit: 'Geofence Exit',\n event_deviceFuelDrop: 'Fuel Drop',\n event_driverChanged: 'Driver Changed',\n event_sos: 'SOS',\n event_powerOn: 'Power TakeOff',\n event_powerCute: 'Power Cut',\n unsubscribeTripReport: 'If you no longer wish to receive these emails, please go to %url% and remove the option \"Trip report\" in the settings in the \"Reports\" section.',\n unsubscribeLocationsReport: 'If you no longer wish to receive these emails, please go to %url% and remove the option \"Locations report\" in the settings in the \"Reports\" section.',\n unsubscribeSpeedingReport: 'If you no longer wish to receive these emails, please go to %url% and remove the option \"Overspeed report\" in the settings in the \"Reports\" section.',\n unsubscribeZoneReport: 'If you no longer wish to receive these emails, please go to %url% and remove the option \"Zone report\" in the settings in the \"Reports\" section.',\n unsubscribeRefuelingReport: 'If you no longer wish to receive these emails, please go to %url% and remove the option \"Refueling report\" in the settings in the \"Reports\" section.',\n unsubscribeFuelDropReport: 'If you no longer wish to receive these emails, please go to %url% and remove the option \"Fuel drop report\" in the settings in the \"Reports\" section.'\n },\n layout: {\n deviceOnline: 'Device Online',\n deviceMoving: 'Device Moving',\n deviceStopped: 'Device Stopped',\n ignitionOff: 'Ignition Off',\n ignitionOn: 'Ignition On',\n deviceOverspeed: 'Device Overspeed',\n geofenceEnter: 'Geofence Enter',\n geofenceExit: 'Geofence Exit',\n deviceFuelDrop: 'Fuel Drop',\n driverChanged: 'Driver Changed',\n test: 'Test Notification',\n sos: 'Panic',\n powerOn: 'Power Take-Off',\n device: 'Device',\n time: 'Time',\n address: 'Address',\n driver: 'Driver',\n group: 'Group',\n in: 'in',\n fuelDropInfo: 'Fuel drop greater than '\n }\n};\n
216
+ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
217
+ <+>UTF-8
218
+ ===================================================================
219
+ diff --git a/lang/enGB.js b/lang/enGB.js
220
+ --- a/lang/enGB.js (revision 58228cbbf2fb1d2086aedd420a0492cca40a9e64)
221
+ +++ b/lang/enGB.js (date 1637757399425)
222
+ @@ -214,6 +214,7 @@
223
+ duration: 'Duration',
224
+ vehicles: 'Vehicles',
225
+ vehicle: 'Vehicle',
226
+ + licensePlate: 'License Plate',
227
+ odometer: 'Odometer',
228
+ startOdometer: 'Start (Km)',
229
+ endOdometer: 'End (Km)',
230
+ Index: lang/ptBR.js
231
+ IDEA additional info:
232
+ Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
233
+ <+>module.exports = {\n route: {\n map: 'Mapa',\n dashboard: 'Central de Controlo',\n reports: 'Relatórios',\n report_trip_title: 'Relatório de viagens',\n report_location_title: 'Relatório de posições',\n report_zone_crossing: 'Relatório de zonas',\n settings: 'Configurações',\n duration: 'Duração'\n },\n map: {\n geofence_create_title: 'Nova Cerca Eletrônica',\n geofence_create_name: 'Por favor indique o nome da cerca eletrônica...',\n geofence_created: 'Cerca eletrônica criada com sucesso!',\n geofence_create_canceled: 'Criação de cerca eletrônica cancelada!',\n poi_create_title: 'Novo POI',\n poi_create_name: 'Por favor indique o nome do POI...',\n poi_created: 'POI criado com sucesso!',\n poi_create_canceled: 'Criação do POI cancelada!',\n create_confirm: 'Confirmar',\n create_cancel: 'Cancelar'\n },\n vehicleList: {\n title: 'Veículos',\n search: 'Pesquisar...',\n column_name: 'Nome',\n column_speed: 'Km/h',\n column_lastUpdate: 'Última Actualização'\n },\n vehicleTable: {\n immobilize: 'Imobilizar',\n de_immobilize: 'Remobilizar',\n send_immobilization: 'Enviar comando de imobilização para o veículo',\n send_de_immobilization: 'Enviar comando de remobilização para veículo',\n all_vehicles: 'Todos',\n moving_vehicles: 'Em Movimento',\n idle_vehicles: 'Ralenti',\n stopped_vehicles: 'Parado',\n disconnected_vehicles: 'Desconectado'\n },\n vehicleDetail: {\n show_route: 'Mostrar rota'\n },\n poiTable: {\n showPOIs: 'Ver POIs'\n },\n dashboard: {\n startdate: 'Data de Início',\n enddate: 'Data de Fim',\n period_lastweek: 'Última semana',\n period_lastmonth: 'Último mês',\n period_last3month: 'Últimos 3 meses'\n },\n navbar: {\n profile: 'Perfil',\n notifications: 'Notificações',\n settings: 'Configurações',\n logout: 'Sair'\n },\n login: {\n login_password: 'Palavra-chave',\n login_button: 'Entrar',\n login_password_warn: 'A Palavra-chave não pode ter menos de 6 dígitos',\n login_user: 'Utilizador'\n },\n profile: {\n user_account: 'Utilizador',\n user_name: 'Nome',\n user_email: 'E-mail',\n user_password: 'Palavra-chave',\n user_phone: 'Telefone',\n user_language: 'Idioma',\n user_timezone: 'Fuso horário',\n user_update_button: 'Gravar',\n user_updated: 'Informação do utilizador foi actualizada.',\n user_name_required: 'O campo nome é obrigatório',\n user_email_required: 'Por favor indique um e-mail válido',\n user_password_lengh: 'A Palavra-chave não pode ter menos de 6 dígitos'\n },\n settings: {\n map: 'Mapa',\n vehicles: 'Veículos',\n title: 'Configurações',\n route_match: 'Rota na estrada',\n alerts: 'Alertas',\n alerts_type: 'Tipo',\n alerts_notificators: 'Vias',\n alert_ignitionOff: 'Ignição Desligada',\n alert_ignitionOn: 'Ignição Ligada',\n alert_geofenceEnter: 'Entrada em Baliza',\n alert_geofenceExit: 'Saída de Baliza',\n alert_deviceOverspeed: 'Excesso de Velocidade',\n alert_deleted: 'O Alerta foi apagado.',\n alert_delete_info: 'Pretende apagar o alerta de ',\n alert_delete_title: 'Apagar Alerta',\n alert_edit_confirm: 'Confirmar',\n alert_edit_cancel: 'Cancelar',\n alert_created: 'Alerta criado com sucesso!',\n alert_updated: 'Alerta actualizado com sucesso!',\n alert_add: 'Adicioncar Alerta',\n alert_edit: 'Editar Alerta',\n alert_delete: 'Apagar Alerta',\n alert_overspeed_warning: 'Veículo sem velocidade máxima definida',\n alert_geofences_warning: 'Veículo sem balizas associadas',\n alert_associate_geofences: 'Associar Balizas',\n alert_form_type: 'Tipo:',\n alert_form_type_placeholder: 'Seleccionar o tipo de alerta',\n alert_form_vehicles: 'Veículos:',\n alert_form_geofences: 'Balizas:',\n alert_form_all_vehicles: 'Todos os veículos',\n alert_form_vehicles_placeholder: 'Seleccionar veículos',\n alert_form_notificator_web: 'Web',\n alert_form_notificator_email: 'E-mail',\n alert_form_notificator_sms: 'SMS',\n alert_form_confirm: 'Gravar',\n alert_form_cancel: 'Cancelar',\n alert_form_geofences_placeholder: 'Seleccionar balizas',\n vehicle_edit: 'Editar Veículo',\n vehicle_name: 'Nome',\n vehicle_licenseplate: 'Matrícula',\n vehicle_model: 'Modelo',\n vehicle_speed_limit: 'Limite de Velocidade',\n vehicle_form_cancel: 'Cancelar',\n vehicle_form_confirm: 'Guardar',\n vehicle_form_name: 'Nome',\n vehicle_form_model: 'Modelo',\n vehicle_form_speed_limit: 'Limite de Velocidade (Km/h)',\n vehicle_updated: 'Veículo actualizado com sucesso!'\n },\n geofence: {\n showGeofences: 'Ver Cercas Eletrônicas',\n geofence_name: 'Nome',\n geofence_edit: 'Editar',\n geofence_delete: 'Apagar',\n geofence_deleted: 'A cerca eletrônica foi apagada',\n geofence_delete_info: 'Pretende apagar a cerca eletrônica ',\n geofence_delete_title: 'Apagar Cerca Eletrônica',\n geofence_edit_title: 'Editar Cerca Eletrônica',\n geofence_edit_name: 'Por favor indique o nome da cerca eletrônica...',\n geofence_edit_confirm: 'Confirmar',\n geofence_edit_cancel: 'Cancelar',\n geofence_edit_canceled: 'Edição cancelada',\n geofence_edited: 'Cerca Eletrônica editada com sucesso!',\n poi_delete_info: 'Pretende apagar o POI ',\n poi_delete_title: 'Apagar POI',\n poi_edited: 'POI editada com sucesso!',\n poi_deleted: 'POI foi apagada',\n poi_edit_title: 'Editar POI',\n poi_edit_name: 'Por favor indique o nome do POI...',\n searchGeofence: 'Procurar Cerca Eletrônica',\n edit_geofence: 'Editar',\n delete_geofence: 'Apagar'\n },\n report: {\n temperature: 'Temperatura',\n temperature2: 'Temperatura2',\n select_vehicles: 'Seleccionar veículos',\n select_vehicles_placeholder: 'Veículos',\n select_geofences: 'Seleccionar balizas',\n select_geofences_placeholder: 'Balizas',\n select_period: 'Seleccionar período',\n date_start: 'Data de início',\n date_end: 'Data de fim',\n generate_report: 'Gerar relatório',\n user: 'Utilizador',\n titleTripReport: 'Relatório de Viagens',\n titleLocationReport: 'Relatório de Posições',\n titleSpeedingReport: 'Relatório de Excessos de Velocidade',\n titleZoneReport: 'Relatório de Zonas',\n titleRefuelingReport: 'Relatório de Abastecimentos',\n titleFuelDropReport: 'Relatório de Perdas de Combustível',\n titleEventsReport: 'Relatório de Eventos',\n titleActivityReport: 'Relatório de Actividade',\n titleKmsReport: 'Relatórios de Kms',\n from: 'De',\n to: 'a',\n headerStartAddress: 'Local de início',\n headerDistance: 'Distância percorrida',\n headerDrivingTime: 'Tempo de condução',\n headerMaxSpeed: 'Velocidade Máx.',\n date: 'Data',\n start: 'Início',\n end: 'Fim',\n endAddress: 'Destino',\n tripTime: 'Duração',\n idleTime: 'Ralenti',\n stopTime: 'Paragem',\n distance: 'Distância',\n speed: 'Velocidade',\n overspeed: 'Alerta Ligado',\n avgSpeed: 'Vel.Média',\n maxSpeed: 'Vel.Max',\n driver: 'Motorista',\n group: 'Grupo',\n address: 'Local',\n ignition: 'Ignição',\n ignitionOn: 'Ligada',\n ignitionOff: 'Desligada',\n enter: 'Entrada',\n exit: 'Saida',\n geofence: 'Zona',\n duration: 'Duração',\n vehicles: 'Veículos',\n vehicle: 'Veículo',\n odometer: 'Conta-Quilómetros',\n startOdometer: 'Início (Km)',\n endOdometer: 'Fim (Km)',\n spentFuel: 'Consumo (L)',\n engineHours: 'Utilização (H:m)',\n driverHours: 'Tempo de Condução (H:m)',\n refueling: 'Abastecimentos',\n totalRefueled: 'Total Abastecido',\n totalFuelDrops: 'Total de Ocorrências',\n totalFuelDropLiters: 'Combustível Perdido',\n speedLimit: 'Limite de Velocidade',\n eventType: 'Evento',\n info: 'Informação',\n event_ignitionOff: 'Ignição Desligada',\n event_ignitionOn: 'Ignição Ligada',\n event_deviceOverspeed: 'Excesso de Velocidade',\n event_geofenceEnter: 'Entrada em Zona',\n event_geofenceExit: 'Saída em Zona',\n event_deviceFuelDrop: 'Perda de Combustível',\n event_driverChanged: 'Mudança de Motorista',\n event_sos: 'SOS',\n event_powerOn: 'Tomada de Força',\n event_powerCut: 'Corte de Corrente',\n unsubscribeTripReport: 'Se não deseja receber estes emails por favor aceda a %url% e remova a opção \"Relatório de viagens\" nas definições na secção \"Relatórios\".',\n unsubscribeLocationsReport: 'Se não deseja receber estes emails por favor aceda a %url% e remova a opção \"Relatório de posições\" nas definições na secção \"Relatórios\".',\n unsubscribeSpeedingReport: 'Se não deseja receber estes emails por favor aceda a %url% e remova a opção \"Relatório de excesso de velocidade\" nas definições na secção \"Relatórios\".',\n unsubscribeZoneReport: 'Se não deseja receber estes emails por favor aceda a %url% e remova a opção \"Relatório de zonas\" nas definições na secção \"Relatórios\".',\n unsubscribeRefuelingReport: 'Se não deseja receber estes emails por favor aceda a %url% e remova a opção \"Relatório de abastecimentos\" nas definições na secção \"Relatórios\".',\n unsubscribeFuelDropReport: 'Se não deseja receber estes emails por favor aceda a %url% e remova a opção \"Relatório de perdas de combustível\" nas definições na secção \"Relatórios\".'\n },\n layout: {\n deviceOnline: 'Dispositivo Online',\n deviceMoving: 'Veículo em Movimento',\n deviceStopped: 'Veículo Parado',\n ignitionOff: 'Ignição Desligada',\n ignitionOn: 'Ignição Ligada',\n deviceOverspeed: 'Excesso de Velocidade',\n geofenceEnter: 'Entrada de Baliza',\n geofenceExit: 'Saída de Baliza',\n deviceFuelDrop: 'Perda de Combustível',\n driverChanged: 'Mudança de Motorista',\n test: 'Test Notification',\n sos: 'SOS',\n powerOn: 'Tomada de Força',\n device: 'Veículo',\n time: 'Data',\n address: 'Local',\n driver: 'Motorista',\n group: 'Grupo',\n in: 'em',\n fuelDropInfo: 'Perda de combustível superior a '\n }\n};\n
234
+ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
235
+ <+>UTF-8
236
+ ===================================================================
237
+ diff --git a/lang/ptBR.js b/lang/ptBR.js
238
+ --- a/lang/ptBR.js (revision 58228cbbf2fb1d2086aedd420a0492cca40a9e64)
239
+ +++ b/lang/ptBR.js (date 1637757399701)
240
+ @@ -203,6 +203,7 @@
241
+ duration: 'Duração',
242
+ vehicles: 'Veículos',
243
+ vehicle: 'Veículo',
244
+ + licensePlate: 'Placa',
245
+ odometer: 'Conta-Quilómetros',
246
+ startOdometer: 'Início (Km)',
247
+ endOdometer: 'Fim (Km)',
248
+ Index: package.json
249
+ IDEA additional info:
250
+ Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
251
+ <+>{\n \"name\": \"fleetmap-reports\",\n \"version\": \"1.0.230\",\n \"description\": \"\",\n \"main\": \"src/index.js\",\n \"scripts\": {\n \"test\": \"jest\"\n },\n \"keywords\": [],\n \"author\": \"\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"axios\": \"^0.21.1\",\n \"axios-cookiejar-support\": \"^1.0.1\",\n \"fleetmap-partners\": \"^1.0.42\",\n \"json-as-xlsx\": \"^1.2.1\",\n \"jspdf\": \"^2.3.1\",\n \"jspdf-autotable\": \"^3.5.14\",\n \"moment\": \"^2.29.1\",\n \"tough-cookie\": \"^4.0.0\",\n \"traccar-api\": \"^1.0.5\",\n \"turf\": \"^3.0.14\",\n \"turf-point\": \"^2.0.1\",\n \"wkt\": \"^0.1.1\"\n },\n \"devDependencies\": {\n \"axios-debug-log\": \"^0.8.4\",\n \"mocha\": \"^9.0.3\",\n \"webpack\": \"^5.24.3\",\n \"webpack-cli\": \"^4.5.0\"\n }\n}\n
252
+ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
253
+ <+>UTF-8
254
+ ===================================================================
255
+ diff --git a/package.json b/package.json
256
+ --- a/package.json (revision 58228cbbf2fb1d2086aedd420a0492cca40a9e64)
257
+ +++ b/package.json (date 1637761358619)
258
+ @@ -1,6 +1,6 @@
259
+ {
260
+ "name": "fleetmap-reports",
261
+ - "version": "1.0.230",
262
+ + "version": "1.0.232",
263
+ "description": "",
264
+ "main": "src/index.js",
265
+ "scripts": {
266
+ Index: lang/ptPT.js
267
+ IDEA additional info:
268
+ Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
269
+ <+>module.exports = {\n route: {\n map: 'Mapa',\n dashboard: 'Central de Controlo',\n reports: 'Relatórios',\n report: 'Relatório',\n report_trip_title: 'Relatório de viagens',\n report_location_title: 'Relatório de posições',\n report_zone_crossing: 'Relatório de zonas',\n settings: 'Configurações',\n duration: 'Duração'\n },\n map: {\n geofence_create_title: 'Nova Geofence',\n geofence_create_name: 'Por favor indique o nome da baliza...',\n geofence_created: 'Geofence criada com sucesso!',\n geofence_create_canceled: 'Criação de baliza cancelada!',\n poi_create_title: 'Novo POI',\n poi_create_name: 'Por favor indique o nome do POI...',\n poi_created: 'POI criado com sucesso!',\n poi_create_canceled: 'Criação do POI cancelada!',\n create_confirm: 'Confirmar',\n create_cancel: 'Cancelar',\n loading: 'A carregar'\n },\n vehicleList: {\n title: 'Veículos',\n search: 'Pesquisar...',\n column_name: 'Nome',\n column_speed: 'Km/h',\n column_lastUpdate: 'Última Actualização'\n },\n vehicleTable: {\n immobilize: 'Imobilizar',\n de_immobilize: 'Remobilizar',\n send_immobilization: 'Enviar comando de imobilização para o veículo ',\n send_de_immobilization: 'Enviar comando de remobilização para o veículo ',\n all_vehicles: 'Todos',\n moving_vehicles: 'Em Movimento',\n idle_vehicles: 'Ralenti',\n stopped_vehicles: 'Parado',\n disconnected_vehicles: 'Desconhecido'\n },\n vehicleDetail: {\n show_route: 'Rota'\n },\n poiTable: {\n showPOIs: 'Ver POIs',\n edit_poi: 'Editar',\n delete_poi: 'Apagar'\n },\n dashboard: {\n startdate: 'Data de Início',\n enddate: 'Data de Fim',\n period_lastweek: 'Última semana',\n period_lastmonth: 'Último mês',\n period_last3month: 'Últimos 3 meses'\n },\n navbar: {\n profile: 'Perfil',\n notifications: 'Notificações',\n settings: 'Configurações',\n logout: 'Sair'\n },\n login: {\n login_password: 'Palavra-chave',\n login_button: 'Entrar',\n login_password_warn: 'A Palavra-chave não pode ter menos de 6 dígitos',\n login_user: 'Utilizador'\n },\n profile: {\n user_account: 'Utilizador',\n user_name: 'Nome',\n user_email: 'E-mail',\n user_password: 'Palavra-chave',\n user_phone: 'Telefone',\n user_language: 'Idioma',\n user_timezone: 'Fuso horário',\n user_update_button: 'Gravar',\n user_updated: 'Informação do utilizador foi actualizada.',\n user_name_required: 'O campo nome é obrigatório',\n user_email_required: 'Por favor indique um e-mail válido',\n user_password_lengh: 'A Palavra-chave não pode ter menos de 6 dígitos'\n },\n settings: {\n map: 'Mapa',\n vehicles: 'Veículos',\n title: 'Configurações',\n route_match: 'Rota na estrada',\n alerts: 'Alertas',\n alerts_type: 'Tipo',\n alerts_notificators: 'Vias',\n alert_ignitionOff: 'Ignição Desligada',\n alert_ignitionOn: 'Ignição Ligada',\n alert_geofenceEnter: 'Entrada em Baliza',\n alert_geofenceExit: 'Saída de Baliza',\n alert_deviceOverspeed: 'Excesso de Velocidade',\n alert_deleted: 'O Alerta foi apagado.',\n alert_delete_info: 'Pretende apagar o alerta de ',\n alert_delete_title: 'Apagar Alerta',\n alert_edit_confirm: 'Confirmar',\n alert_edit_cancel: 'Cancelar',\n alert_created: 'Alerta criado com sucesso!',\n alert_updated: 'Alerta actualizado com sucesso!',\n alert_add: 'Adicionar Alerta',\n alert_edit: 'Editar Alerta',\n alert_delete: 'Apagar Alerta',\n alert_overspeed_warning: 'Veículo sem velocidade máxima definida',\n alert_geofences_warning: 'Veículo sem balizas associadas',\n alert_associate_geofences: 'Associar Balizas',\n alert_form_type: 'Tipo:',\n alert_form_type_placeholder: 'Seleccionar o tipo de alerta',\n alert_form_vehicles: 'Veículos:',\n alert_form_geofences: 'Balizas:',\n alert_form_all_vehicles: 'Todos os veículos',\n alert_form_vehicles_placeholder: 'Seleccionar veículos',\n alert_form_notificator_web: 'Web',\n alert_form_notificator_email: 'E-mail',\n alert_form_notificator_sms: 'SMS',\n alert_form_confirm: 'Gravar',\n alert_form_cancel: 'Cancelar',\n alert_form_geofences_placeholder: 'Seleccionar balizas',\n vehicle_edit: 'Editar Veículo',\n vehicle_name: 'Nome',\n vehicle_licenseplate: 'Matrícula',\n vehicle_model: 'Modelo',\n vehicle_speed_limit: 'Limite de Velocidade',\n vehicle_form_cancel: 'Cancelar',\n vehicle_form_confirm: 'Guardar',\n vehicle_form_name: 'Nome',\n vehicle_form_model: 'Modelo',\n vehicle_form_speed_limit: 'Limite de Velocidade (Km/h)',\n vehicle_updated: 'Veículo actualizado com sucesso!'\n },\n geofence: {\n showGeofences: 'Ver Balizas',\n geofence_name: 'Nome',\n geofence_edit: 'Editar',\n geofence_delete: 'Apagar',\n geofence_deleted: 'A baliza foi apagada',\n geofence_delete_info: 'Pretende apagar a baliza ',\n geofence_delete_title: 'Apagar Baliza',\n geofence_edit_title: 'Editar Baliza',\n geofence_edit_name: 'Por favor indique o nome da baliza...',\n geofence_edit_confirm: 'Confirmar',\n geofence_edit_cancel: 'Cancelar',\n geofence_edit_canceled: 'Edição cancelada',\n geofence_edited: 'Baliza editada com sucesso!',\n poi_delete_info: 'Pretende apagar o POI ',\n poi_delete_title: 'Apagar POI',\n poi_edited: 'POI editada com sucesso!',\n poi_deleted: 'POI foi apagada',\n poi_edit_title: 'Editar POI',\n poi_edit_name: 'Por favor indique o nome do POI...',\n searchGeofence: 'Procurar baliza',\n edit_geofence: 'Editar',\n delete_geofence: 'Apagar'\n },\n report: {\n temperature: 'Temperatura',\n temperature2: 'Temperatura2',\n select_vehicles: 'Seleccionar veículos',\n select_vehicles_placeholder: 'Veículos',\n select_geofences: 'Seleccionar balizas',\n select_geofences_placeholder: 'Balizas',\n select_period: 'Seleccionar período',\n date_start: 'Data de início',\n date_end: 'Data de fim',\n generate_report: 'Gerar relatório',\n period: 'Período',\n validate_period: 'Por favor seleccione o período.',\n user: 'Utilizador',\n titleTripReport: 'Relatório de Viagens',\n titleLocationReport: 'Relatório de Posições',\n titleSpeedingReport: 'Relatório de Excessos de Velocidade',\n titleZoneReport: 'Relatório de Zonas',\n titleRefuelingReport: 'Relatório de Abastecimentos',\n titleFuelDropReport: 'Relatório de Perdas de Combustível',\n titleEventsReport: 'Relatório de Eventos',\n titleActivityReport: 'Relatório de Actividade',\n titleKmsReport: 'Relatórios de Kms',\n from: 'De',\n to: 'a',\n headerStartAddress: 'Local de início',\n headerDistance: 'Distância percorrida',\n headerDrivingTime: 'Tempo de condução',\n headerMaxSpeed: 'Velocidade Máx.',\n date: 'Data',\n start: 'Início',\n end: 'Fim',\n endAddress: 'Destino',\n tripTime: 'Duração',\n idleTime: 'Ralenti',\n stopTime: 'Paragem',\n distance: 'Distância',\n speed: 'Velocidade',\n overspeed: 'Alerta Ligado',\n roadSpeedLimit: 'Limite da estrada',\n avgSpeed: 'Vel.Média',\n maxSpeed: 'Vel.Max',\n driver: 'Motorista',\n group: 'Grupo',\n address: 'Local',\n ignition: 'Ignição',\n ignitionOn: 'Ligada',\n ignitionOff: 'Desligada',\n enter: 'Entrada',\n exit: 'Saida',\n geofence: 'Zona',\n duration: 'Duração',\n vehicles: 'Veículos',\n vehicle: 'Veículo',\n odometer: 'Conta-Quilómetros',\n startOdometer: 'Início (Km)',\n endOdometer: 'Fim (Km)',\n spentFuel: 'Consumo (L)',\n engineHours: 'Utilização (H:m)',\n driverHours: 'Tempo de Condução (H:m)',\n refueling: 'Abastecimentos',\n totalRefueled: 'Total Abastecido',\n totalFuelDrops: 'Total de Ocorrências',\n totalFuelDropLiters: 'Combustível Perdido',\n deviceOnline: 'Dispositivo Online',\n deviceMoving: 'Veículo em Movimento',\n deviceStopped: 'Veículo Parado',\n speedLimit: 'Limite de Velocidade',\n eventType: 'Evento',\n info: 'Informação',\n event_ignitionOff: 'Ignição Desligada',\n event_ignitionOn: 'Ignição Ligada',\n event_deviceOverspeed: 'Excesso de Velocidade',\n event_geofenceEnter: 'Entrada em Zona',\n event_geofenceExit: 'Saída em Zona',\n event_deviceFuelDrop: 'Perda de Combustível',\n event_driverChanged: 'Mudança de Motorista',\n event_sos: 'SOS',\n event_powerOn: 'Tomada de Força',\n event_powerCut: 'Corte de Corrente',\n unsubscribeTripReport: 'Se não deseja receber estes emails por favor aceda a %url% e remova a opção \"Relatório de viagens\" nas definições na secção \"Relatórios\".',\n unsubscribeLocationsReport: 'Se não deseja receber estes emails por favor aceda a %url% e remova a opção \"Relatório de posições\" nas definições na secção \"Relatórios\".',\n unsubscribeSpeedingReport: 'Se não deseja receber estes emails por favor aceda a %url% e remova a opção \"Relatório de excesso de velocidade\" nas definições na secção \"Relatórios\".',\n unsubscribeZoneReport: 'Se não deseja receber estes emails por favor aceda a %url% e remova a opção \"Relatório de zonas\" nas definições na secção \"Relatórios\".',\n unsubscribeRefuelingReport: 'Se não deseja receber estes emails por favor aceda a %url% e remova a opção \"Relatório de abastecimentos\" nas definições na secção \"Relatórios\".',\n unsubscribeFuelDropReport: 'Se não deseja receber estes emails por favor aceda a %url% e remova a opção \"Relatório de perdas de combustível\" nas definições na secção \"Relatórios\".',\n },\n layout: {\n deviceOnline: 'Dispositivo Online',\n deviceMoving: 'Veículo em Movimento',\n deviceStopped: 'Veículo Parado',\n ignitionOff: 'Ignição Desligada',\n ignitionOn: 'Ignição Ligada',\n deviceOverspeed: 'Excesso de Velocidade',\n geofenceEnter: 'Entrada em Zona',\n geofenceExit: 'Saída em Zona',\n deviceFuelDrop: 'Perda de Combustível',\n driverChanged: 'Mudança de Motorista',\n sos: 'SOS',\n powerOn: 'Tomada de Força',\n device: 'Veículo',\n time: 'Data',\n address: 'Local',\n driver: 'Motorista',\n group: 'Grupo',\n in: 'em',\n fuelDropInfo: 'Perda de combustível superior a '\n }\n};\n
270
+ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
271
+ <+>UTF-8
272
+ ===================================================================
273
+ diff --git a/lang/ptPT.js b/lang/ptPT.js
274
+ --- a/lang/ptPT.js (revision 58228cbbf2fb1d2086aedd420a0492cca40a9e64)
275
+ +++ b/lang/ptPT.js (date 1637757399486)
276
+ @@ -210,6 +210,7 @@
277
+ duration: 'Duração',
278
+ vehicles: 'Veículos',
279
+ vehicle: 'Veículo',
280
+ + licensePlate: 'Matrícula',
281
+ odometer: 'Conta-Quilómetros',
282
+ startOdometer: 'Início (Km)',
283
+ endOdometer: 'Fim (Km)',
284
+ Index: src/index.js
285
+ IDEA additional info:
286
+ Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
287
+ <+>function Reports(config, axios) {\n const {ReportsApi, PositionsApi, SessionApi, DevicesApi, GroupsApi, DriversApi, GeofencesApi} = require('traccar-api')\n this.traccar = {\n reports: new ReportsApi(config, null, axios),\n positions: new PositionsApi(config, null, axios),\n session: new SessionApi(config, null, axios),\n devices: new DevicesApi(config, null, axios),\n groups: new GroupsApi(config, null, axios),\n drivers: new DriversApi(config, null, axios),\n geofences: new GeofencesApi(config, null, axios)\n }\n this.getUserData = async () => {\n return {\n user: await this.traccar.session.sessionGet().then(d => d.data),\n devices: await this.traccar.devices.devicesGet().then(d => d.data),\n groups: await this.traccar.groups.groupsGet().then(d => d.data),\n drivers: await this.traccar.drivers.driversGet().then(d => d.data),\n geofences: await this.traccar.geofences.geofencesGet().then(d => d.data),\n byGroup: false\n }\n }\n this.speedingReport = (from, to, userData, roadSpeedLimits) => {\n return require('./speeding-report').createSpeedingReport(from, to, userData, this.traccar, roadSpeedLimits)\n }\n\n this.speedingReportToPDF = (userData, reportData) => {\n return require('./speeding-report').exportSpeedingReportToPDF(userData, reportData)\n }\n\n this.speedingReportToExcel = (userData, reportData) => {\n return require('./speeding-report').exportSpeedingReportToExcel(userData, reportData)\n }\n\n this.tripReport = (from, to, userData) => {\n return require('./trip-report').createTripReport(from, to, userData, this.traccar)\n }\n this.tripReportToPDF = (userData, reportData) => {\n return require('./trip-report').exportTripReportToPDF(userData, reportData)\n }\n this.tripReportToExcel = (userData, reportData) => {\n return require('./trip-report').exportTripReportToExcel(userData, reportData)\n }\n\n this.zoneReport = (from, to, userData) => {\n return require('./zone-report').createZoneReport(from, to, userData, this.traccar)\n }\n\n this.zoneReportToPDF = (userData, reportData) => {\n return require('./zone-report').exportZoneReportToPDF(userData, reportData)\n }\n\n this.zoneReportToExcel = (userData, reportData) => {\n return require('./zone-report').exportZoneReportToExcel(userData, reportData)\n }\n\n this.refuelingReport = (from, to, userData) => {\n return require('./refueling-report').createRefuelingReport(from, to, userData, this.traccar)\n }\n\n this.fuelDropReport = (from, to, userData) => {\n return require('./fueldrop-report').createFuelDropReport(from, to, userData, this.traccar)\n }\n\n this.eventsReport = (from, to, userData) => {\n return require('./events-report').createEventsReport(from, to, userData, this.traccar)\n }\n\n this.eventsReportToPDF = (userData, reportData) => {\n return require('./events-report').exportSpeedingReportToPDF(userData, reportData)\n }\n\n this.eventsReportToExcel = (userData, reportData) => {\n return require('./events-report').exportSpeedingReportToExcel(userData, reportData)\n }\n\n this.fuelConsumptionReport = (from, to, userData) => {\n return require('./fuelconsumption-report').createFuelConsumptionReport(from, to, userData, this.traccar)\n }\n\n this.locationReport = (from, to, userData) => {\n return require('./location-report').createLocationReport(from, to, userData, this.traccar)\n }\n\n this.locationReportToPDF = (userData, reportData) => {\n return require('./location-report').exportLocationReportToPDF(userData, reportData)\n }\n\n this.locationReportToExcel = (userData, reportData) => {\n return require('./location-report').exportLocationReportToExcel(userData, reportData)\n }\n\n this.activityReport = (from, to, userData) => {\n return require('./activity-report').createActivityReport(from, to, userData, this.traccar)\n }\n\n this.activityReportToPDF = (userData, reportData) => {\n return require('./activity-report').exportActivityReportToPDF(userData, reportData)\n }\n\n this.activityReportToExcel = (userData, reportData) => {\n return require('./activity-report').exportActivityReportToExcel(userData, reportData)\n }\n\n this.kmsReport = (from, to, userData) => {\n return require('./kms-report').createKmsReport(from, to, userData, this.traccar)\n }\n\n this.kmsReportToPDF = (userData, reportData) => {\n return require('./kms-report').exportKmsReportToPDF(userData, reportData)\n }\n\n this.kmsReportToExcel = (userData, reportData) => {\n return require('./kms-report').exportKmsReportToExcel(userData, reportData)\n }\n\n this.vistaWasteActivityReport = (from, to, userData) => {\n return require('./custom/vistawasteActivity-report').createVistaWasteActivityReport(from, to, userData, this.traccar)\n }\n\n this.vistaWasteActivityReportToPDF = (userData, reportData) => {\n return require('./custom/vistawasteActivity-report').exportVistaWasteActivityReportToPDF(userData, reportData)\n }\n\n this.vistaWasteActivityReportToExcel = (userData, reportData) => {\n return require('./custom/vistawasteActivity-report').exportVistaWasteActivityReportToExcel(userData, reportData)\n }\n}\nmodule.exports = Reports\n\n
288
+ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
289
+ <+>UTF-8
290
+ ===================================================================
291
+ diff --git a/src/index.js b/src/index.js
292
+ --- a/src/index.js (revision 58228cbbf2fb1d2086aedd420a0492cca40a9e64)
293
+ +++ b/src/index.js (date 1637711506389)
294
+ @@ -23,7 +23,7 @@
295
+ return require('./speeding-report').createSpeedingReport(from, to, userData, this.traccar, roadSpeedLimits)
296
+ }
297
+
298
+ - this.speedingReportToPDF = (userData, reportData) => {
299
+ + this.speedingReportToPDF = async (userData, reportData) => {
300
+ return require('./speeding-report').exportSpeedingReportToPDF(userData, reportData)
301
+ }
302
+
@@ -0,0 +1,233 @@
1
+ Index: src/kms-report.js
2
+ IDEA additional info:
3
+ Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
4
+ <+>const {createActivityReport} = require(\"./activity-report\");\nconst messages = require('../lang')\nconst jsPDF = require('jspdf')\nrequire('jspdf-autotable')\nconst {getStyle} = require(\"./reportStyle\");\nconst {headerFromUser,addTable} = require(\"./util/pdfDocument\");\nconst {getUserPartner} = require(\"fleetmap-partners\");\nconst automaticReports = require(\"./automaticReports\");\n\n\nlet traccarInstance\n\nconst fileName = 'KmsReport'\n\nasync function createKmsReportByDevice(from, to, userData) {\n const groupIds = userData.groups.map(g => g.id)\n const devicesToProcess = userData.byGroup ? userData.devices.filter(d => !groupIds.includes(d.groupId)) : userData.devices\n\n const allData = {\n devices: [],\n from: from,\n to: to\n }\n\n devicesToProcess.sort((a, b) => (a.name > b.name) ? 1 : -1)\n const devicesToSlice = devicesToProcess.slice()\n\n const arrayOfArrays = automaticReports.sliceArray(devicesToSlice)\n let data = []\n for (const a of arrayOfArrays) {\n const response = await traccarInstance.reports.reportsRouteGet(from, to, a.map(d => d.id))\n data = data.concat(response.data)\n }\n\n console.log('locations:' + data.length)\n\n if (data.length > 0) {\n allData.devices = processDevices(from, to, devicesToProcess, data)\n }\n\n return allData\n}\n\nasync function createKmsReportByDriver(from, to, userData) {\n\n}\n\nasync function createKmsReportByGroup(from, to, userData) {\n\n}\n\nfunction processDevices(from, to, devices, data) {\n const devicesResult = []\n\n for (const d of devices) {\n const locations = data.filter(t => t.deviceId === d.id)\n\n if (locations.length > 0) {\n locations.forEach(l => l.locationDate = l.fixTime.substring(0, 10))\n const groupedLocations = locations.reduce(\n (entryMap, e) => entryMap.set(e.locationDate, [...entryMap.get(e.locationDate)||[], e]),\n new Map()\n )\n\n const days = []\n const keys = Array.from(groupedLocations.keys())\n\n keys.forEach(key => {\n const dayLocations = groupedLocations.get(key)\n const day = {\n date: new Date(key).toLocaleDateString(),\n kms: dayLocations.reduce((a, b) => a + b.attributes.distance, 0) || 0\n }\n days.push(day)\n })\n\n devicesResult.push({\n device: d,\n days: days\n })\n }\n }\n\n return devicesResult\n}\n\nasync function createKmsReport(from, to, userData, traccar) {\n console.log('Create KmsReport')\n traccarInstance = traccar\n if(userData.groupByDay){\n const reportData = []\n\n if(userData.byDriver){\n const allData = await createKmsReportByDriver(from, to, userData)\n reportData.push(allData)\n }\n else if(userData.byGroup){\n const allGroupsData = await createKmsReportByGroup(from, to, userData)\n allGroupsData.forEach(data => reportData.push(data))\n const withoutGroupDevices = await createKmsReportByDevice(from, to, userData)\n reportData.push(withoutGroupDevices)\n } else {\n const allData = await createKmsReportByDevice(from, to, userData)\n reportData.push(allData)\n }\n\n return reportData\n } else {\n return await createActivityReport(from, to, userData, traccar)\n }\n}\n\nasync function exportKmsReportToPDF(userData, reportData) {\n const lang = userData.user.attributes.lang\n const translations = messages[lang] ? messages[lang] : messages['en-GB']\n const kmsData = userData.byDriver ? reportData.drivers : reportData.devices\n\n const headers = []\n if(userData.groupByDay) {\n headers.push(translations.report.date,\n translations.report.distance)\n }\n else if(userData.byDriver) {\n headers.push(translations.report.driver,\n translations.report.group,\n translations.report.distance)\n } else {\n headers.push(translations.report.name,\n translations.settings.vehicle_model,\n translations.report.group,\n translations.report.distance)\n }\n if (kmsData) {\n let first = true\n const doc = userData.groupByDay ? new jsPDF.jsPDF() : new jsPDF.jsPDF('l')\n await headerFromUser(doc, translations.report.titleKmsReport, userData.user)\n\n if (userData.groupByDay) {\n for (const d of kmsData) {\n const name = userData.byDriver ? d.driver.name : d.device.name\n const group = userData.byDriver ? userData.groups.find(g => g.drivers.includes(d.id)) : userData.groups.find(g => d.device.groupId === g.id)\n\n let space = 0\n if (!first) {\n doc.addPage()\n } else {\n first = false\n space = 8\n }\n doc.setFontSize(13)\n doc.text(name, 20, space + 20)\n doc.setFontSize(11)\n doc.text(group ? translations.report.group + ': ' + group.name : '', 150, space + 20)\n doc.text(new Date(reportData.from).toLocaleString() + ' - ' + new Date(reportData.to).toLocaleString(), 20, space + 25)\n\n const data = []\n d.days.forEach(day => {\n const temp = [\n new Date(day.date).toLocaleDateString(),\n (day.kms/1000).toFixed(0)\n ]\n\n data.push(temp)\n })\n\n const footValues = []\n footValues.push(\n '',\n (d.days.reduce((a, b) => a + b.kms, 0)/1000).toFixed(0)\n )\n\n const style = getStyle(getUserPartner(userData.user))\n\n addTable(doc, headers, data, footValues, style, 35)\n }\n } else {\n const data = []\n if (userData.byDriver) {\n reportData.drivers.forEach(d => {\n const group = userData.groups.find(g => g.drivers.includes(d.driver.id))\n\n const temp = [\n d.driver.name,\n group ? group.name : '',\n Number((d.summary.distance / 1000).toFixed(0)),\n ]\n data.push(temp)\n })\n } else {\n reportData.devices.forEach(d => {\n const group = userData.groups.find(g => d.device.groupId === g.id)\n\n const temp = [\n d.summary.deviceName,\n d.device.model,\n group ? group.name : '',\n Number((d.summary.distance / 1000).toFixed(0))\n ]\n data.push(temp)\n })\n }\n\n const footValues = []\n if(userData.byDriver) {\n footValues.push(\n 'Total:' + reportData.drivers.length,\n '',\n (reportData.drivers.reduce((a, b) => a + b.summary.distance, 0)/1000).toFixed(0)\n )\n } else {\n footValues.push(\n 'Total:' + reportData.devices.length,\n '',\n '',\n (reportData.devices.reduce((a, b) => a + b.summary.distance, 0)/1000).toFixed(0),\n )\n }\n\n const style = getStyle(getUserPartner(userData.user))\n\n addTable(doc, headers, data, footValues, style, 35)\n }\n return doc\n }\n}\n\nfunction exportKmsReportToExcel(userData, reportData) {\n console.log('Export to Excel')\n\n const lang = userData.user.attributes.lang || (navigator && navigator.language)\n const translations = messages[lang] ? messages[lang] : messages['en-GB']\n\n const settings = {\n sheetName: translations.report.titleKmsReport, // The name of the sheet\n fileName: fileName // The name of the spreadsheet\n }\n\n const headers = []\n\n if(userData.groupByDay) {\n headers.push(\n {label: translations.report.vehicle, value: 'name'},\n {label: translations.report.group, value: 'group'},\n {label: translations.report.date, value: 'date'},\n {label: translations.report.distance, value: 'distance'})\n } else if(userData.byDriver) {\n headers.push(\n {label: translations.report.driver, value: 'name'},\n {label: translations.report.group, value: 'group'},\n {label: translations.report.distance, value: 'distance'})\n } else {\n headers.push(\n {label: translations.report.driver, value: 'name'},\n {label: translations.settings.vehicle_licenseplate, value: 'licenseplate'},\n {label: translations.report.group, value: 'group'},\n {label: translations.report.distance, value: 'distance'})\n }\n\n let data = []\n const info = userData.byDriver ? reportData.drivers : reportData.devices\n info.forEach(d => {\n const group = userData.byDriver ? userData.groups.find(g => g.drivers.includes(d.driver.id)) :\n userData.groups.find(g => d.device.groupId === g.id)\n\n if (userData.groupByDay) {\n data = data.concat([{}])\n data = data.concat(d.days.map(a => {\n return {\n name: userData.byDriver ? d.driver.name : d.device.name,\n group: group ? group.name : '',\n licenseplate: d.device.attributes.license_plate,\n date: a.date,\n distance: Number((a.kms / 1000).toFixed(0))\n }\n }))\n } else {\n data = data.concat([{\n name: userData.byDriver ? d.driver.name : d.summary.deviceName,\n group: group ? group.name : '',\n licenseplate: d.device.attributes.license_plate,\n distance: Number((d.summary.distance / 1000).toFixed(0))\n }])\n }\n })\n\n return {\n headers,\n data,\n settings\n }\n}\n\nexports.createKmsReport = createKmsReport\nexports.exportKmsReportToPDF = exportKmsReportToPDF\nexports.exportKmsReportToExcel = exportKmsReportToExcel\n
5
+ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
6
+ <+>UTF-8
7
+ ===================================================================
8
+ diff --git a/src/kms-report.js b/src/kms-report.js
9
+ --- a/src/kms-report.js (revision 0ae69bd1e224b6db3b69f61e65035315b96f9788)
10
+ +++ b/src/kms-report.js (date 1637845589031)
11
+ @@ -6,6 +6,7 @@
12
+ const {headerFromUser,addTable} = require("./util/pdfDocument");
13
+ const {getUserPartner} = require("fleetmap-partners");
14
+ const automaticReports = require("./automaticReports");
15
+ +const {jsPDFOptions} = require("jspdf");
16
+
17
+
18
+ let traccarInstance
19
+ @@ -132,8 +133,8 @@
20
+ }
21
+ if (kmsData) {
22
+ let first = true
23
+ - const doc = userData.groupByDay ? new jsPDF.jsPDF() : new jsPDF.jsPDF('l')
24
+ - await headerFromUser(doc, translations.report.titleKmsReport, userData.user)
25
+ + const doc = userData.groupByDay ? new jsPDF.jsPDF('p') : new jsPDF.jsPDF('l')
26
+ + await headerFromUser(doc, translations.report.titleKmsReport, userData.user, 'p')
27
+
28
+ if (userData.groupByDay) {
29
+ for (const d of kmsData) {
30
+ @@ -156,7 +157,7 @@
31
+ const data = []
32
+ d.days.forEach(day => {
33
+ const temp = [
34
+ - new Date(day.date).toLocaleDateString(),
35
+ + day.date,
36
+ (day.kms/1000).toFixed(0)
37
+ ]
38
+
39
+ @@ -240,6 +241,7 @@
40
+ if(userData.groupByDay) {
41
+ headers.push(
42
+ {label: translations.report.vehicle, value: 'name'},
43
+ + {label: translations.report.licensePlate, value: 'licenseplate'},
44
+ {label: translations.report.group, value: 'group'},
45
+ {label: translations.report.date, value: 'date'},
46
+ {label: translations.report.distance, value: 'distance'})
47
+ @@ -250,8 +252,8 @@
48
+ {label: translations.report.distance, value: 'distance'})
49
+ } else {
50
+ headers.push(
51
+ - {label: translations.report.driver, value: 'name'},
52
+ - {label: translations.settings.vehicle_licenseplate, value: 'licenseplate'},
53
+ + {label: translations.report.vehicle, value: 'name'},
54
+ + {label: translations.report.licensePlate, value: 'licenseplate'},
55
+ {label: translations.report.group, value: 'group'},
56
+ {label: translations.report.distance, value: 'distance'})
57
+ }
58
+ @@ -262,25 +264,25 @@
59
+ const group = userData.byDriver ? userData.groups.find(g => g.drivers.includes(d.driver.id)) :
60
+ userData.groups.find(g => d.device.groupId === g.id)
61
+
62
+ - if (userData.groupByDay) {
63
+ - data = data.concat([{}])
64
+ - data = data.concat(d.days.map(a => {
65
+ - return {
66
+ - name: userData.byDriver ? d.driver.name : d.device.name,
67
+ - group: group ? group.name : '',
68
+ - licenseplate: d.device.attributes.license_plate,
69
+ - date: a.date,
70
+ - distance: Number((a.kms / 1000).toFixed(0))
71
+ - }
72
+ - }))
73
+ - } else {
74
+ - data = data.concat([{
75
+ - name: userData.byDriver ? d.driver.name : d.summary.deviceName,
76
+ - group: group ? group.name : '',
77
+ - licenseplate: d.device.attributes.license_plate,
78
+ - distance: Number((d.summary.distance / 1000).toFixed(0))
79
+ - }])
80
+ - }
81
+ + if (userData.groupByDay) {
82
+ + data = data.concat([{}])
83
+ + data = data.concat(d.days.map(a => {
84
+ + return {
85
+ + name: d.device.name,
86
+ + group: group ? group.name : '',
87
+ + licenseplate: d.device.attributes.license_plate,
88
+ + date: a.date,
89
+ + distance: Number((a.kms / 1000).toFixed(0))
90
+ + }
91
+ + }))
92
+ + } else {
93
+ + data = data.concat([{
94
+ + name: userData.byDriver ? d.driver.name : d.summary.deviceName,
95
+ + group: group ? group.name : '',
96
+ + licenseplate: userData.byDriver ? '' : d.device.attributes.license_plate,
97
+ + distance: Number((d.summary.distance / 1000).toFixed(0))
98
+ + }])
99
+ + }
100
+ })
101
+
102
+ return {
103
+ Index: package.json
104
+ IDEA additional info:
105
+ Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
106
+ <+>{\n \"name\": \"fleetmap-reports\",\n \"version\": \"1.0.233\",\n \"description\": \"\",\n \"main\": \"src/index.js\",\n \"scripts\": {\n \"test\": \"jest\"\n },\n \"keywords\": [],\n \"author\": \"\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"axios\": \"^0.21.1\",\n \"axios-cookiejar-support\": \"^1.0.1\",\n \"fleetmap-partners\": \"^1.0.42\",\n \"json-as-xlsx\": \"^1.2.1\",\n \"jspdf\": \"^2.3.1\",\n \"jspdf-autotable\": \"^3.5.14\",\n \"moment\": \"^2.29.1\",\n \"tough-cookie\": \"^4.0.0\",\n \"traccar-api\": \"^1.0.5\",\n \"turf\": \"^3.0.14\",\n \"turf-point\": \"^2.0.1\",\n \"wkt\": \"^0.1.1\"\n },\n \"devDependencies\": {\n \"axios-debug-log\": \"^0.8.4\",\n \"mocha\": \"^9.0.3\",\n \"webpack\": \"^5.24.3\",\n \"webpack-cli\": \"^4.5.0\"\n }\n}\n
107
+ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
108
+ <+>UTF-8
109
+ ===================================================================
110
+ diff --git a/package.json b/package.json
111
+ --- a/package.json (revision 0ae69bd1e224b6db3b69f61e65035315b96f9788)
112
+ +++ b/package.json (date 1637845838032)
113
+ @@ -1,6 +1,6 @@
114
+ {
115
+ "name": "fleetmap-reports",
116
+ - "version": "1.0.233",
117
+ + "version": "1.0.235",
118
+ "description": "",
119
+ "main": "src/index.js",
120
+ "scripts": {
121
+ Index: src/util/pdfDocument.js
122
+ IDEA additional info:
123
+ Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
124
+ <+>require('jspdf-autotable')\nconst {getStyle} = require(\"../reportStyle\");\nconst {getUserPartner} = require(\"fleetmap-partners\");\nconst {getImgFromUrl} = require(\"./utils\")\n\nasync function header(doc, title, hostname, style) {\n doc.setFontSize(16)\n doc.setFont('helvetica', 'bold')\n doc.text(title, 15, 15 )\n\n if(style.imgWidth && style.imgHeight) {\n try{\n const image = await getImgFromUrl(hostname)\n if(image){\n doc.addImage(image, 'PNG', 220 + (style.imgWidth < 50 ? 25 : 0), 5, style.imgWidth, style.imgHeight)\n }\n } catch (e) {\n }\n }\n doc.setFont('helvetica', 'normal')\n}\n\nasync function headerFromUser(doc, title, user) {\n const partner = getUserPartner(user)\n return header(doc, title, partner.host, getStyle(partner))\n}\n\nfunction addTable(doc, headers, data, footValues, style, startY){\n doc.autoTable({\n head: [headers],\n body: data,\n foot: [footValues],\n showFoot: 'lastPage',\n headStyles: {\n fillColor: style.pdfHeaderColor,\n textColor: style.pdfHeaderTextColor,\n fontSize: 10\n },\n bodyStyles: {\n fillColor: style.pdfBodyColor,\n textColor: style.pdfBodyTextColor,\n fontSize: 8\n },\n footStyles: {\n fillColor: style.pdfFooterColor,\n textColor: style.pdfFooterTextColor,\n fontSize: 9\n },\n startY: startY });\n}\n\nexports.header = header\nexports.headerFromUser = headerFromUser\nexports.addTable = addTable\n
125
+ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
126
+ <+>UTF-8
127
+ ===================================================================
128
+ diff --git a/src/util/pdfDocument.js b/src/util/pdfDocument.js
129
+ --- a/src/util/pdfDocument.js (revision 0ae69bd1e224b6db3b69f61e65035315b96f9788)
130
+ +++ b/src/util/pdfDocument.js (date 1637845589076)
131
+ @@ -3,7 +3,7 @@
132
+ const {getUserPartner} = require("fleetmap-partners");
133
+ const {getImgFromUrl} = require("./utils")
134
+
135
+ -async function header(doc, title, hostname, style) {
136
+ +async function header(doc, title, hostname, style, orientation) {
137
+ doc.setFontSize(16)
138
+ doc.setFont('helvetica', 'bold')
139
+ doc.text(title, 15, 15 )
140
+ @@ -12,7 +12,7 @@
141
+ try{
142
+ const image = await getImgFromUrl(hostname)
143
+ if(image){
144
+ - doc.addImage(image, 'PNG', 220 + (style.imgWidth < 50 ? 25 : 0), 5, style.imgWidth, style.imgHeight)
145
+ + doc.addImage(image, 'PNG', (orientation === 'l' ? 220 : 175) + (style.imgWidth < 50 ? 25 : 0), 5, style.imgWidth, style.imgHeight)
146
+ }
147
+ } catch (e) {
148
+ }
149
+ @@ -20,9 +20,9 @@
150
+ doc.setFont('helvetica', 'normal')
151
+ }
152
+
153
+ -async function headerFromUser(doc, title, user) {
154
+ +async function headerFromUser(doc, title, user, orientation='l') {
155
+ const partner = getUserPartner(user)
156
+ - return header(doc, title, partner.host, getStyle(partner))
157
+ + return header(doc, title, partner.host, getStyle(partner), orientation)
158
+ }
159
+
160
+ function addTable(doc, headers, data, footValues, style, startY){
161
+ Index: lang/enGB.js
162
+ IDEA additional info:
163
+ Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
164
+ <+>module.exports = {\n route: {\n map: 'Map',\n dashboard: 'Dashboard',\n reports: 'Reports',\n report: 'Report',\n report_trip_title: 'Trip Report',\n report_location_title: 'Location Report',\n report_zone_crossing: 'Zone Report',\n report_speeding: 'Relatório de Excessos de Velocidade',\n report_speeding_beta: 'Relatório de Excessos de Velocidade BETA',\n report_tolls: 'Relatório de Portagens',\n settings: 'Settings',\n duration: 'Duration'\n },\n map: {\n geofence_create_title: 'New geofence',\n geofence_create_name: 'Please enter the name of this geofence...',\n geofence_created: 'Geofence created sucessfully!',\n geofence_create_canceled: 'Input canceled',\n poi_create_title: 'New POI',\n poi_create_name: 'Please enter the name of this POI...',\n poi_created: 'POI created sucessfully!',\n poi_create_canceled: 'Input canceled',\n create_confirm: 'OK',\n create_cancel: 'Cancel',\n loading: 'Loading',\n totalDistance: 'Distância total'\n },\n vehicleList: {\n title: 'Vehicle',\n search: 'Search...',\n column_name: 'Name',\n column_speed: 'Km/h',\n column_lastUpdate: 'Last update'\n },\n vehicleTable: {\n immobilize: 'Immobilize',\n de_immobilize: 'De-Immobilize',\n send_immobilization: 'Send immobilization command?',\n send_de_immobilization: 'Send de-immobilization command?',\n all_vehicles: 'All',\n moving_vehicles: 'Moving',\n idle_vehicles: 'Idle',\n stopped_vehicles: 'Stopped',\n disconnected_vehicles: 'Disconnected'\n },\n vehicleDetail: {\n show_route: 'Show route'\n },\n poiTable: {\n showPOIs: 'Show POIs',\n edit_poi: 'Edit',\n delete_poi: 'Delete'\n },\n dashboard: {\n startdate: 'Start date',\n enddate: 'End Date',\n period_lastweek: 'Last week',\n period_lastmonth: 'Last month',\n period_last3month: 'Last 3 months'\n },\n navbar: {\n profile: 'Profile',\n notifications: 'Notifications',\n settings: 'Settings',\n logout: 'Log Out'\n },\n login: {\n login_user: 'Email',\n login_password: 'Password',\n login_button: 'Login',\n login_password_warn: 'The password can not be less than 6 digits'\n },\n profile: {\n user_account: 'Account',\n user_name: 'Name',\n user_email: 'E-mail',\n user_password: 'Password',\n user_phone: 'Phone',\n user_language: 'Language',\n user_timezone: 'Timezone',\n user_update_button: 'Update',\n user_updated: 'User information has been updated successfully.',\n user_name_required: 'Name field is required',\n user_email_required: 'Please input a valid email',\n user_password_lengh: 'The password can not be less than 6 digits'\n },\n settings: {\n map: 'Map',\n vehicles: 'Vehicles',\n title: 'Settings',\n route_match: 'Route match',\n alerts: 'Alerts',\n alerts_type: 'Type',\n alerts_notificators: 'Notificators',\n alert_ignitionOff: 'Ignition Off',\n alert_ignitionOn: 'Ignition On',\n alert_geofenceEnter: 'Geofence Enter',\n alert_geofenceExit: 'Geofence Exit',\n alert_deviceOverspeed: 'Device Overspeed',\n alert_deleted: 'Alert has been deleted',\n alert_delete_info: 'Do you want to delete the alert ',\n alert_delete_title: 'Delete Alert',\n alert_edit_confirm: 'Confirm',\n alert_edit_cancel: 'Cancel',\n alert_created: 'Alert created sucessfully!',\n alert_updated: 'Alert updated sucessfully!',\n alert_add: 'Add Alert',\n alert_edit: 'Edit Alert',\n alert_delete: 'Delete Alert',\n alert_overspeed_warning: 'Vehicle without defined top speed',\n alert_geofences_warning: 'Vehicle without associated geofences',\n alert_associate_geofences: 'Associate Geofences',\n alert_form_type: 'Type:',\n alert_form_type_placeholder: 'Select alert type',\n alert_form_vehicles: 'Vehicles:',\n alert_form_geofences: 'Geofences:',\n alert_form_all_vehicles: 'All vehicles',\n alert_form_vehicles_placeholder: 'Select vehicles',\n alert_form_notificator_web: 'Web',\n alert_form_notificator_email: 'E-mail',\n alert_form_notificator_sms: 'SMS',\n alert_form_confirm: 'Save',\n alert_form_cancel: 'Cancel',\n alert_form_geofences_placeholder: 'Select geofences',\n vehicle_edit: 'Edit Vehicle',\n vehicle_name: 'Name',\n vehicle_licenseplate: 'License Plate',\n vehicle_model: 'Model',\n vehicle_speed_limit: 'Speed Limit',\n vehicle_form_cancel: 'Cancel',\n vehicle_form_confirm: 'Save',\n vehicle_form_name: 'Name',\n vehicle_form_model: 'Model',\n vehicle_form_speed_limit: 'Speed Limit (Km/h)',\n vehicle_updated: 'Vehicle updated sucessfully!'\n },\n geofence: {\n showGeofences: 'Show Geofences',\n geofence_name: 'Name',\n geofence_edit: 'Edit',\n geofence_delete: 'Delete',\n geofence_deleted: 'Geofence has been deleted',\n geofence_delete_info: 'Do you want to delete geofence ',\n geofence_delete_title: 'Delete Geofence',\n geofence_edit_title: 'Edit Geofence',\n geofence_edit_name: 'Please enter the name of this geofence...',\n geofence_edit_confirm: 'Confirm',\n geofence_edit_cancel: 'Cancel',\n geofence_edit_canceled: 'Edit canceled',\n geofence_edited: 'Geofence edited sucessfully!',\n poi_delete_info: 'Do you want to delete POI ',\n poi_delete_title: 'Delete POI',\n poi_edited: 'POI edited sucessfully!',\n poi_deleted: 'POI has been deleted',\n poi_edit_title: 'Edit POI',\n poi_edit_name: 'Please enter the name of this POI...',\n searchGeofence: 'Search geofence',\n edit_geofence: 'Edit',\n delete_geofence: 'Delete'\n },\n report: {\n temperature: 'Temperatura',\n temperature2: 'Temperatura2',\n select_vehicles: 'Select vehicles',\n select_vehicles_placeholder: 'Vehicles',\n select_geofences: 'Select geofences',\n select_geofences_placeholder: 'Geofences',\n select_period: 'Select period',\n period: 'Period',\n date_start: 'Start date',\n date_end: 'End date',\n generate_report: 'Generate report',\n validate_period: 'Por favor seleccione o período',\n user: 'User',\n titleTripReport: 'Trip Report',\n titleLocationReport: 'Locations Report',\n titleSpeedingReport: 'Overspeed Report',\n titleZoneReport: 'Zone Report',\n titleRefuelReport: 'Refueling Report',\n titleFuelDropReport: 'Fuel Drop Report',\n titleEventsReport: 'Events Report',\n titleActivityReport: 'Activity Report',\n titleKmsReport: 'Kms Report',\n from: 'From',\n to: 'to',\n headerStartAddress: 'Start address',\n headerDistance: 'Distance',\n headerDrivingTime: 'Driving Time',\n headerMaxSpeed: 'Max Speed',\n date: 'Date',\n start: 'Start',\n end: 'End',\n endAddress: 'Destination',\n tripTime: 'Duration',\n idleTime: 'Idle',\n stopTime: 'Stop',\n distance: 'Distance',\n speed: 'Speed',\n roadSpeedLimit: 'Limite da estrada',\n overspeed: 'Alert On',\n avgSpeed: 'Avg Speed',\n maxSpeed: 'Max Speed',\n driver: 'Driver',\n group: 'Group',\n address: 'Address',\n ignition: 'Ignition',\n ignitionOn: 'On',\n ignitionOff: 'Off',\n enter: 'Enter',\n exit: 'Exit',\n geofence: 'Geofence',\n duration: 'Duration',\n vehicles: 'Vehicles',\n vehicle: 'Vehicle',\n odometer: 'Odometer',\n startOdometer: 'Start (Km)',\n endOdometer: 'End (Km)',\n spentFuel: 'Spent Fuel',\n engineHours: 'Use (H:m)',\n driverHours: 'Driving Time (H:m)',\n refueling: 'Refueling',\n totalRefueled: 'Total Refueled',\n totalFuelDrops: 'Total Fuel Drops',\n totalFuelDropLiters: 'Total Fuel Lost',\n speedLimit: 'Speed Limit',\n eventType: 'Event',\n info: 'Information',\n event_ignitionOff: 'Ignition Off',\n event_ignitionOn: 'Ignition On',\n event_deviceOverspeed: 'Device Overspeed',\n event_geofenceEnter: 'Geofence Enter',\n event_geofenceExit: 'Geofence Exit',\n event_deviceFuelDrop: 'Fuel Drop',\n event_driverChanged: 'Driver Changed',\n event_sos: 'SOS',\n event_powerOn: 'Power TakeOff',\n event_powerCute: 'Power Cut',\n unsubscribeTripReport: 'If you no longer wish to receive these emails, please go to %url% and remove the option \"Trip report\" in the settings in the \"Reports\" section.',\n unsubscribeLocationsReport: 'If you no longer wish to receive these emails, please go to %url% and remove the option \"Locations report\" in the settings in the \"Reports\" section.',\n unsubscribeSpeedingReport: 'If you no longer wish to receive these emails, please go to %url% and remove the option \"Overspeed report\" in the settings in the \"Reports\" section.',\n unsubscribeZoneReport: 'If you no longer wish to receive these emails, please go to %url% and remove the option \"Zone report\" in the settings in the \"Reports\" section.',\n unsubscribeRefuelingReport: 'If you no longer wish to receive these emails, please go to %url% and remove the option \"Refueling report\" in the settings in the \"Reports\" section.',\n unsubscribeFuelDropReport: 'If you no longer wish to receive these emails, please go to %url% and remove the option \"Fuel drop report\" in the settings in the \"Reports\" section.'\n },\n layout: {\n deviceOnline: 'Device Online',\n deviceMoving: 'Device Moving',\n deviceStopped: 'Device Stopped',\n ignitionOff: 'Ignition Off',\n ignitionOn: 'Ignition On',\n deviceOverspeed: 'Device Overspeed',\n geofenceEnter: 'Geofence Enter',\n geofenceExit: 'Geofence Exit',\n deviceFuelDrop: 'Fuel Drop',\n driverChanged: 'Driver Changed',\n test: 'Test Notification',\n sos: 'Panic',\n powerOn: 'Power Take-Off',\n device: 'Device',\n time: 'Time',\n address: 'Address',\n driver: 'Driver',\n group: 'Group',\n in: 'in',\n fuelDropInfo: 'Fuel drop greater than '\n }\n};\n
165
+ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
166
+ <+>UTF-8
167
+ ===================================================================
168
+ diff --git a/lang/enGB.js b/lang/enGB.js
169
+ --- a/lang/enGB.js (revision 0ae69bd1e224b6db3b69f61e65035315b96f9788)
170
+ +++ b/lang/enGB.js (date 1637845618637)
171
+ @@ -214,6 +214,7 @@
172
+ duration: 'Duration',
173
+ vehicles: 'Vehicles',
174
+ vehicle: 'Vehicle',
175
+ + licensePlate: 'License Plate',
176
+ odometer: 'Odometer',
177
+ startOdometer: 'Start (Km)',
178
+ endOdometer: 'End (Km)',
179
+ Index: lang/ptBR.js
180
+ IDEA additional info:
181
+ Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
182
+ <+>module.exports = {\n route: {\n map: 'Mapa',\n dashboard: 'Central de Controlo',\n reports: 'Relatórios',\n report_trip_title: 'Relatório de viagens',\n report_location_title: 'Relatório de posições',\n report_zone_crossing: 'Relatório de zonas',\n settings: 'Configurações',\n duration: 'Duração'\n },\n map: {\n geofence_create_title: 'Nova Cerca Eletrônica',\n geofence_create_name: 'Por favor indique o nome da cerca eletrônica...',\n geofence_created: 'Cerca eletrônica criada com sucesso!',\n geofence_create_canceled: 'Criação de cerca eletrônica cancelada!',\n poi_create_title: 'Novo POI',\n poi_create_name: 'Por favor indique o nome do POI...',\n poi_created: 'POI criado com sucesso!',\n poi_create_canceled: 'Criação do POI cancelada!',\n create_confirm: 'Confirmar',\n create_cancel: 'Cancelar'\n },\n vehicleList: {\n title: 'Veículos',\n search: 'Pesquisar...',\n column_name: 'Nome',\n column_speed: 'Km/h',\n column_lastUpdate: 'Última Actualização'\n },\n vehicleTable: {\n immobilize: 'Imobilizar',\n de_immobilize: 'Remobilizar',\n send_immobilization: 'Enviar comando de imobilização para o veículo',\n send_de_immobilization: 'Enviar comando de remobilização para veículo',\n all_vehicles: 'Todos',\n moving_vehicles: 'Em Movimento',\n idle_vehicles: 'Ralenti',\n stopped_vehicles: 'Parado',\n disconnected_vehicles: 'Desconectado'\n },\n vehicleDetail: {\n show_route: 'Mostrar rota'\n },\n poiTable: {\n showPOIs: 'Ver POIs'\n },\n dashboard: {\n startdate: 'Data de Início',\n enddate: 'Data de Fim',\n period_lastweek: 'Última semana',\n period_lastmonth: 'Último mês',\n period_last3month: 'Últimos 3 meses'\n },\n navbar: {\n profile: 'Perfil',\n notifications: 'Notificações',\n settings: 'Configurações',\n logout: 'Sair'\n },\n login: {\n login_password: 'Palavra-chave',\n login_button: 'Entrar',\n login_password_warn: 'A Palavra-chave não pode ter menos de 6 dígitos',\n login_user: 'Utilizador'\n },\n profile: {\n user_account: 'Utilizador',\n user_name: 'Nome',\n user_email: 'E-mail',\n user_password: 'Palavra-chave',\n user_phone: 'Telefone',\n user_language: 'Idioma',\n user_timezone: 'Fuso horário',\n user_update_button: 'Gravar',\n user_updated: 'Informação do utilizador foi actualizada.',\n user_name_required: 'O campo nome é obrigatório',\n user_email_required: 'Por favor indique um e-mail válido',\n user_password_lengh: 'A Palavra-chave não pode ter menos de 6 dígitos'\n },\n settings: {\n map: 'Mapa',\n vehicles: 'Veículos',\n title: 'Configurações',\n route_match: 'Rota na estrada',\n alerts: 'Alertas',\n alerts_type: 'Tipo',\n alerts_notificators: 'Vias',\n alert_ignitionOff: 'Ignição Desligada',\n alert_ignitionOn: 'Ignição Ligada',\n alert_geofenceEnter: 'Entrada em Baliza',\n alert_geofenceExit: 'Saída de Baliza',\n alert_deviceOverspeed: 'Excesso de Velocidade',\n alert_deleted: 'O Alerta foi apagado.',\n alert_delete_info: 'Pretende apagar o alerta de ',\n alert_delete_title: 'Apagar Alerta',\n alert_edit_confirm: 'Confirmar',\n alert_edit_cancel: 'Cancelar',\n alert_created: 'Alerta criado com sucesso!',\n alert_updated: 'Alerta actualizado com sucesso!',\n alert_add: 'Adicioncar Alerta',\n alert_edit: 'Editar Alerta',\n alert_delete: 'Apagar Alerta',\n alert_overspeed_warning: 'Veículo sem velocidade máxima definida',\n alert_geofences_warning: 'Veículo sem balizas associadas',\n alert_associate_geofences: 'Associar Balizas',\n alert_form_type: 'Tipo:',\n alert_form_type_placeholder: 'Seleccionar o tipo de alerta',\n alert_form_vehicles: 'Veículos:',\n alert_form_geofences: 'Balizas:',\n alert_form_all_vehicles: 'Todos os veículos',\n alert_form_vehicles_placeholder: 'Seleccionar veículos',\n alert_form_notificator_web: 'Web',\n alert_form_notificator_email: 'E-mail',\n alert_form_notificator_sms: 'SMS',\n alert_form_confirm: 'Gravar',\n alert_form_cancel: 'Cancelar',\n alert_form_geofences_placeholder: 'Seleccionar balizas',\n vehicle_edit: 'Editar Veículo',\n vehicle_name: 'Nome',\n vehicle_licenseplate: 'Matrícula',\n vehicle_model: 'Modelo',\n vehicle_speed_limit: 'Limite de Velocidade',\n vehicle_form_cancel: 'Cancelar',\n vehicle_form_confirm: 'Guardar',\n vehicle_form_name: 'Nome',\n vehicle_form_model: 'Modelo',\n vehicle_form_speed_limit: 'Limite de Velocidade (Km/h)',\n vehicle_updated: 'Veículo actualizado com sucesso!'\n },\n geofence: {\n showGeofences: 'Ver Cercas Eletrônicas',\n geofence_name: 'Nome',\n geofence_edit: 'Editar',\n geofence_delete: 'Apagar',\n geofence_deleted: 'A cerca eletrônica foi apagada',\n geofence_delete_info: 'Pretende apagar a cerca eletrônica ',\n geofence_delete_title: 'Apagar Cerca Eletrônica',\n geofence_edit_title: 'Editar Cerca Eletrônica',\n geofence_edit_name: 'Por favor indique o nome da cerca eletrônica...',\n geofence_edit_confirm: 'Confirmar',\n geofence_edit_cancel: 'Cancelar',\n geofence_edit_canceled: 'Edição cancelada',\n geofence_edited: 'Cerca Eletrônica editada com sucesso!',\n poi_delete_info: 'Pretende apagar o POI ',\n poi_delete_title: 'Apagar POI',\n poi_edited: 'POI editada com sucesso!',\n poi_deleted: 'POI foi apagada',\n poi_edit_title: 'Editar POI',\n poi_edit_name: 'Por favor indique o nome do POI...',\n searchGeofence: 'Procurar Cerca Eletrônica',\n edit_geofence: 'Editar',\n delete_geofence: 'Apagar'\n },\n report: {\n temperature: 'Temperatura',\n temperature2: 'Temperatura2',\n select_vehicles: 'Seleccionar veículos',\n select_vehicles_placeholder: 'Veículos',\n select_geofences: 'Seleccionar balizas',\n select_geofences_placeholder: 'Balizas',\n select_period: 'Seleccionar período',\n date_start: 'Data de início',\n date_end: 'Data de fim',\n generate_report: 'Gerar relatório',\n user: 'Utilizador',\n titleTripReport: 'Relatório de Viagens',\n titleLocationReport: 'Relatório de Posições',\n titleSpeedingReport: 'Relatório de Excessos de Velocidade',\n titleZoneReport: 'Relatório de Zonas',\n titleRefuelingReport: 'Relatório de Abastecimentos',\n titleFuelDropReport: 'Relatório de Perdas de Combustível',\n titleEventsReport: 'Relatório de Eventos',\n titleActivityReport: 'Relatório de Actividade',\n titleKmsReport: 'Relatórios de Kms',\n from: 'De',\n to: 'a',\n headerStartAddress: 'Local de início',\n headerDistance: 'Distância percorrida',\n headerDrivingTime: 'Tempo de condução',\n headerMaxSpeed: 'Velocidade Máx.',\n date: 'Data',\n start: 'Início',\n end: 'Fim',\n endAddress: 'Destino',\n tripTime: 'Duração',\n idleTime: 'Ralenti',\n stopTime: 'Paragem',\n distance: 'Distância',\n speed: 'Velocidade',\n overspeed: 'Alerta Ligado',\n avgSpeed: 'Vel.Média',\n maxSpeed: 'Vel.Max',\n driver: 'Motorista',\n group: 'Grupo',\n address: 'Local',\n ignition: 'Ignição',\n ignitionOn: 'Ligada',\n ignitionOff: 'Desligada',\n enter: 'Entrada',\n exit: 'Saida',\n geofence: 'Zona',\n duration: 'Duração',\n vehicles: 'Veículos',\n vehicle: 'Veículo',\n odometer: 'Conta-Quilómetros',\n startOdometer: 'Início (Km)',\n endOdometer: 'Fim (Km)',\n spentFuel: 'Consumo (L)',\n engineHours: 'Utilização (H:m)',\n driverHours: 'Tempo de Condução (H:m)',\n refueling: 'Abastecimentos',\n totalRefueled: 'Total Abastecido',\n totalFuelDrops: 'Total de Ocorrências',\n totalFuelDropLiters: 'Combustível Perdido',\n speedLimit: 'Limite de Velocidade',\n eventType: 'Evento',\n info: 'Informação',\n event_ignitionOff: 'Ignição Desligada',\n event_ignitionOn: 'Ignição Ligada',\n event_deviceOverspeed: 'Excesso de Velocidade',\n event_geofenceEnter: 'Entrada em Zona',\n event_geofenceExit: 'Saída em Zona',\n event_deviceFuelDrop: 'Perda de Combustível',\n event_driverChanged: 'Mudança de Motorista',\n event_sos: 'SOS',\n event_powerOn: 'Tomada de Força',\n event_powerCut: 'Corte de Corrente',\n unsubscribeTripReport: 'Se não deseja receber estes emails por favor aceda a %url% e remova a opção \"Relatório de viagens\" nas definições na secção \"Relatórios\".',\n unsubscribeLocationsReport: 'Se não deseja receber estes emails por favor aceda a %url% e remova a opção \"Relatório de posições\" nas definições na secção \"Relatórios\".',\n unsubscribeSpeedingReport: 'Se não deseja receber estes emails por favor aceda a %url% e remova a opção \"Relatório de excesso de velocidade\" nas definições na secção \"Relatórios\".',\n unsubscribeZoneReport: 'Se não deseja receber estes emails por favor aceda a %url% e remova a opção \"Relatório de zonas\" nas definições na secção \"Relatórios\".',\n unsubscribeRefuelingReport: 'Se não deseja receber estes emails por favor aceda a %url% e remova a opção \"Relatório de abastecimentos\" nas definições na secção \"Relatórios\".',\n unsubscribeFuelDropReport: 'Se não deseja receber estes emails por favor aceda a %url% e remova a opção \"Relatório de perdas de combustível\" nas definições na secção \"Relatórios\".'\n },\n layout: {\n deviceOnline: 'Dispositivo Online',\n deviceMoving: 'Veículo em Movimento',\n deviceStopped: 'Veículo Parado',\n ignitionOff: 'Ignição Desligada',\n ignitionOn: 'Ignição Ligada',\n deviceOverspeed: 'Excesso de Velocidade',\n geofenceEnter: 'Entrada de Baliza',\n geofenceExit: 'Saída de Baliza',\n deviceFuelDrop: 'Perda de Combustível',\n driverChanged: 'Mudança de Motorista',\n test: 'Test Notification',\n sos: 'SOS',\n powerOn: 'Tomada de Força',\n device: 'Veículo',\n time: 'Data',\n address: 'Local',\n driver: 'Motorista',\n group: 'Grupo',\n in: 'em',\n fuelDropInfo: 'Perda de combustível superior a '\n }\n};\n
183
+ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
184
+ <+>UTF-8
185
+ ===================================================================
186
+ diff --git a/lang/ptBR.js b/lang/ptBR.js
187
+ --- a/lang/ptBR.js (revision 0ae69bd1e224b6db3b69f61e65035315b96f9788)
188
+ +++ b/lang/ptBR.js (date 1637845618671)
189
+ @@ -203,6 +203,7 @@
190
+ duration: 'Duração',
191
+ vehicles: 'Veículos',
192
+ vehicle: 'Veículo',
193
+ + licensePlate: 'Placa',
194
+ odometer: 'Conta-Quilómetros',
195
+ startOdometer: 'Início (Km)',
196
+ endOdometer: 'Fim (Km)',
197
+ Index: lang/ptPT.js
198
+ IDEA additional info:
199
+ Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
200
+ <+>module.exports = {\n route: {\n map: 'Mapa',\n dashboard: 'Central de Controlo',\n reports: 'Relatórios',\n report: 'Relatório',\n report_trip_title: 'Relatório de viagens',\n report_location_title: 'Relatório de posições',\n report_zone_crossing: 'Relatório de zonas',\n settings: 'Configurações',\n duration: 'Duração'\n },\n map: {\n geofence_create_title: 'Nova Geofence',\n geofence_create_name: 'Por favor indique o nome da baliza...',\n geofence_created: 'Geofence criada com sucesso!',\n geofence_create_canceled: 'Criação de baliza cancelada!',\n poi_create_title: 'Novo POI',\n poi_create_name: 'Por favor indique o nome do POI...',\n poi_created: 'POI criado com sucesso!',\n poi_create_canceled: 'Criação do POI cancelada!',\n create_confirm: 'Confirmar',\n create_cancel: 'Cancelar',\n loading: 'A carregar'\n },\n vehicleList: {\n title: 'Veículos',\n search: 'Pesquisar...',\n column_name: 'Nome',\n column_speed: 'Km/h',\n column_lastUpdate: 'Última Actualização'\n },\n vehicleTable: {\n immobilize: 'Imobilizar',\n de_immobilize: 'Remobilizar',\n send_immobilization: 'Enviar comando de imobilização para o veículo ',\n send_de_immobilization: 'Enviar comando de remobilização para o veículo ',\n all_vehicles: 'Todos',\n moving_vehicles: 'Em Movimento',\n idle_vehicles: 'Ralenti',\n stopped_vehicles: 'Parado',\n disconnected_vehicles: 'Desconhecido'\n },\n vehicleDetail: {\n show_route: 'Rota'\n },\n poiTable: {\n showPOIs: 'Ver POIs',\n edit_poi: 'Editar',\n delete_poi: 'Apagar'\n },\n dashboard: {\n startdate: 'Data de Início',\n enddate: 'Data de Fim',\n period_lastweek: 'Última semana',\n period_lastmonth: 'Último mês',\n period_last3month: 'Últimos 3 meses'\n },\n navbar: {\n profile: 'Perfil',\n notifications: 'Notificações',\n settings: 'Configurações',\n logout: 'Sair'\n },\n login: {\n login_password: 'Palavra-chave',\n login_button: 'Entrar',\n login_password_warn: 'A Palavra-chave não pode ter menos de 6 dígitos',\n login_user: 'Utilizador'\n },\n profile: {\n user_account: 'Utilizador',\n user_name: 'Nome',\n user_email: 'E-mail',\n user_password: 'Palavra-chave',\n user_phone: 'Telefone',\n user_language: 'Idioma',\n user_timezone: 'Fuso horário',\n user_update_button: 'Gravar',\n user_updated: 'Informação do utilizador foi actualizada.',\n user_name_required: 'O campo nome é obrigatório',\n user_email_required: 'Por favor indique um e-mail válido',\n user_password_lengh: 'A Palavra-chave não pode ter menos de 6 dígitos'\n },\n settings: {\n map: 'Mapa',\n vehicles: 'Veículos',\n title: 'Configurações',\n route_match: 'Rota na estrada',\n alerts: 'Alertas',\n alerts_type: 'Tipo',\n alerts_notificators: 'Vias',\n alert_ignitionOff: 'Ignição Desligada',\n alert_ignitionOn: 'Ignição Ligada',\n alert_geofenceEnter: 'Entrada em Baliza',\n alert_geofenceExit: 'Saída de Baliza',\n alert_deviceOverspeed: 'Excesso de Velocidade',\n alert_deleted: 'O Alerta foi apagado.',\n alert_delete_info: 'Pretende apagar o alerta de ',\n alert_delete_title: 'Apagar Alerta',\n alert_edit_confirm: 'Confirmar',\n alert_edit_cancel: 'Cancelar',\n alert_created: 'Alerta criado com sucesso!',\n alert_updated: 'Alerta actualizado com sucesso!',\n alert_add: 'Adicionar Alerta',\n alert_edit: 'Editar Alerta',\n alert_delete: 'Apagar Alerta',\n alert_overspeed_warning: 'Veículo sem velocidade máxima definida',\n alert_geofences_warning: 'Veículo sem balizas associadas',\n alert_associate_geofences: 'Associar Balizas',\n alert_form_type: 'Tipo:',\n alert_form_type_placeholder: 'Seleccionar o tipo de alerta',\n alert_form_vehicles: 'Veículos:',\n alert_form_geofences: 'Balizas:',\n alert_form_all_vehicles: 'Todos os veículos',\n alert_form_vehicles_placeholder: 'Seleccionar veículos',\n alert_form_notificator_web: 'Web',\n alert_form_notificator_email: 'E-mail',\n alert_form_notificator_sms: 'SMS',\n alert_form_confirm: 'Gravar',\n alert_form_cancel: 'Cancelar',\n alert_form_geofences_placeholder: 'Seleccionar balizas',\n vehicle_edit: 'Editar Veículo',\n vehicle_name: 'Nome',\n vehicle_licenseplate: 'Matrícula',\n vehicle_model: 'Modelo',\n vehicle_speed_limit: 'Limite de Velocidade',\n vehicle_form_cancel: 'Cancelar',\n vehicle_form_confirm: 'Guardar',\n vehicle_form_name: 'Nome',\n vehicle_form_model: 'Modelo',\n vehicle_form_speed_limit: 'Limite de Velocidade (Km/h)',\n vehicle_updated: 'Veículo actualizado com sucesso!'\n },\n geofence: {\n showGeofences: 'Ver Balizas',\n geofence_name: 'Nome',\n geofence_edit: 'Editar',\n geofence_delete: 'Apagar',\n geofence_deleted: 'A baliza foi apagada',\n geofence_delete_info: 'Pretende apagar a baliza ',\n geofence_delete_title: 'Apagar Baliza',\n geofence_edit_title: 'Editar Baliza',\n geofence_edit_name: 'Por favor indique o nome da baliza...',\n geofence_edit_confirm: 'Confirmar',\n geofence_edit_cancel: 'Cancelar',\n geofence_edit_canceled: 'Edição cancelada',\n geofence_edited: 'Baliza editada com sucesso!',\n poi_delete_info: 'Pretende apagar o POI ',\n poi_delete_title: 'Apagar POI',\n poi_edited: 'POI editada com sucesso!',\n poi_deleted: 'POI foi apagada',\n poi_edit_title: 'Editar POI',\n poi_edit_name: 'Por favor indique o nome do POI...',\n searchGeofence: 'Procurar baliza',\n edit_geofence: 'Editar',\n delete_geofence: 'Apagar'\n },\n report: {\n temperature: 'Temperatura',\n temperature2: 'Temperatura2',\n select_vehicles: 'Seleccionar veículos',\n select_vehicles_placeholder: 'Veículos',\n select_geofences: 'Seleccionar balizas',\n select_geofences_placeholder: 'Balizas',\n select_period: 'Seleccionar período',\n date_start: 'Data de início',\n date_end: 'Data de fim',\n generate_report: 'Gerar relatório',\n period: 'Período',\n validate_period: 'Por favor seleccione o período.',\n user: 'Utilizador',\n titleTripReport: 'Relatório de Viagens',\n titleLocationReport: 'Relatório de Posições',\n titleSpeedingReport: 'Relatório de Excessos de Velocidade',\n titleZoneReport: 'Relatório de Zonas',\n titleRefuelingReport: 'Relatório de Abastecimentos',\n titleFuelDropReport: 'Relatório de Perdas de Combustível',\n titleEventsReport: 'Relatório de Eventos',\n titleActivityReport: 'Relatório de Actividade',\n titleKmsReport: 'Relatórios de Kms',\n from: 'De',\n to: 'a',\n headerStartAddress: 'Local de início',\n headerDistance: 'Distância percorrida',\n headerDrivingTime: 'Tempo de condução',\n headerMaxSpeed: 'Velocidade Máx.',\n date: 'Data',\n start: 'Início',\n end: 'Fim',\n endAddress: 'Destino',\n tripTime: 'Duração',\n idleTime: 'Ralenti',\n stopTime: 'Paragem',\n distance: 'Distância',\n speed: 'Velocidade',\n overspeed: 'Alerta Ligado',\n roadSpeedLimit: 'Limite da estrada',\n avgSpeed: 'Vel.Média',\n maxSpeed: 'Vel.Max',\n driver: 'Motorista',\n group: 'Grupo',\n address: 'Local',\n ignition: 'Ignição',\n ignitionOn: 'Ligada',\n ignitionOff: 'Desligada',\n enter: 'Entrada',\n exit: 'Saida',\n geofence: 'Zona',\n duration: 'Duração',\n vehicles: 'Veículos',\n vehicle: 'Veículo',\n odometer: 'Conta-Quilómetros',\n startOdometer: 'Início (Km)',\n endOdometer: 'Fim (Km)',\n spentFuel: 'Consumo (L)',\n engineHours: 'Utilização (H:m)',\n driverHours: 'Tempo de Condução (H:m)',\n refueling: 'Abastecimentos',\n totalRefueled: 'Total Abastecido',\n totalFuelDrops: 'Total de Ocorrências',\n totalFuelDropLiters: 'Combustível Perdido',\n deviceOnline: 'Dispositivo Online',\n deviceMoving: 'Veículo em Movimento',\n deviceStopped: 'Veículo Parado',\n speedLimit: 'Limite de Velocidade',\n eventType: 'Evento',\n info: 'Informação',\n event_ignitionOff: 'Ignição Desligada',\n event_ignitionOn: 'Ignição Ligada',\n event_deviceOverspeed: 'Excesso de Velocidade',\n event_geofenceEnter: 'Entrada em Zona',\n event_geofenceExit: 'Saída em Zona',\n event_deviceFuelDrop: 'Perda de Combustível',\n event_driverChanged: 'Mudança de Motorista',\n event_sos: 'SOS',\n event_powerOn: 'Tomada de Força',\n event_powerCut: 'Corte de Corrente',\n unsubscribeTripReport: 'Se não deseja receber estes emails por favor aceda a %url% e remova a opção \"Relatório de viagens\" nas definições na secção \"Relatórios\".',\n unsubscribeLocationsReport: 'Se não deseja receber estes emails por favor aceda a %url% e remova a opção \"Relatório de posições\" nas definições na secção \"Relatórios\".',\n unsubscribeSpeedingReport: 'Se não deseja receber estes emails por favor aceda a %url% e remova a opção \"Relatório de excesso de velocidade\" nas definições na secção \"Relatórios\".',\n unsubscribeZoneReport: 'Se não deseja receber estes emails por favor aceda a %url% e remova a opção \"Relatório de zonas\" nas definições na secção \"Relatórios\".',\n unsubscribeRefuelingReport: 'Se não deseja receber estes emails por favor aceda a %url% e remova a opção \"Relatório de abastecimentos\" nas definições na secção \"Relatórios\".',\n unsubscribeFuelDropReport: 'Se não deseja receber estes emails por favor aceda a %url% e remova a opção \"Relatório de perdas de combustível\" nas definições na secção \"Relatórios\".',\n },\n layout: {\n deviceOnline: 'Dispositivo Online',\n deviceMoving: 'Veículo em Movimento',\n deviceStopped: 'Veículo Parado',\n ignitionOff: 'Ignição Desligada',\n ignitionOn: 'Ignição Ligada',\n deviceOverspeed: 'Excesso de Velocidade',\n geofenceEnter: 'Entrada em Zona',\n geofenceExit: 'Saída em Zona',\n deviceFuelDrop: 'Perda de Combustível',\n driverChanged: 'Mudança de Motorista',\n sos: 'SOS',\n powerOn: 'Tomada de Força',\n device: 'Veículo',\n time: 'Data',\n address: 'Local',\n driver: 'Motorista',\n group: 'Grupo',\n in: 'em',\n fuelDropInfo: 'Perda de combustível superior a '\n }\n};\n
201
+ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
202
+ <+>UTF-8
203
+ ===================================================================
204
+ diff --git a/lang/ptPT.js b/lang/ptPT.js
205
+ --- a/lang/ptPT.js (revision 0ae69bd1e224b6db3b69f61e65035315b96f9788)
206
+ +++ b/lang/ptPT.js (date 1637845630345)
207
+ @@ -210,6 +210,7 @@
208
+ duration: 'Duração',
209
+ vehicles: 'Veículos',
210
+ vehicle: 'Veículo',
211
+ + licensePlate: 'Matrícula',
212
+ odometer: 'Conta-Quilómetros',
213
+ startOdometer: 'Início (Km)',
214
+ endOdometer: 'Fim (Km)',
215
+ Index: src/index.js
216
+ IDEA additional info:
217
+ Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
218
+ <+>function Reports(config, axios) {\n const {ReportsApi, PositionsApi, SessionApi, DevicesApi, GroupsApi, DriversApi, GeofencesApi} = require('traccar-api')\n this.traccar = {\n reports: new ReportsApi(config, null, axios),\n positions: new PositionsApi(config, null, axios),\n session: new SessionApi(config, null, axios),\n devices: new DevicesApi(config, null, axios),\n groups: new GroupsApi(config, null, axios),\n drivers: new DriversApi(config, null, axios),\n geofences: new GeofencesApi(config, null, axios)\n }\n this.getUserData = async () => {\n return {\n user: await this.traccar.session.sessionGet().then(d => d.data),\n devices: await this.traccar.devices.devicesGet().then(d => d.data),\n groups: await this.traccar.groups.groupsGet().then(d => d.data),\n drivers: await this.traccar.drivers.driversGet().then(d => d.data),\n geofences: await this.traccar.geofences.geofencesGet().then(d => d.data),\n byGroup: false\n }\n }\n this.speedingReport = (from, to, userData, roadSpeedLimits) => {\n return require('./speeding-report').createSpeedingReport(from, to, userData, this.traccar, roadSpeedLimits)\n }\n\n this.speedingReportToPDF = (userData, reportData) => {\n return require('./speeding-report').exportSpeedingReportToPDF(userData, reportData)\n }\n\n this.speedingReportToExcel = (userData, reportData) => {\n return require('./speeding-report').exportSpeedingReportToExcel(userData, reportData)\n }\n\n this.tripReport = (from, to, userData) => {\n return require('./trip-report').createTripReport(from, to, userData, this.traccar)\n }\n this.tripReportToPDF = (userData, reportData) => {\n return require('./trip-report').exportTripReportToPDF(userData, reportData)\n }\n this.tripReportToExcel = (userData, reportData) => {\n return require('./trip-report').exportTripReportToExcel(userData, reportData)\n }\n\n this.zoneReport = (from, to, userData) => {\n return require('./zone-report').createZoneReport(from, to, userData, this.traccar)\n }\n\n this.zoneReportToPDF = (userData, reportData) => {\n return require('./zone-report').exportZoneReportToPDF(userData, reportData)\n }\n\n this.zoneReportToExcel = (userData, reportData) => {\n return require('./zone-report').exportZoneReportToExcel(userData, reportData)\n }\n\n this.refuelingReport = (from, to, userData) => {\n return require('./refueling-report').createRefuelingReport(from, to, userData, this.traccar)\n }\n\n this.fuelDropReport = (from, to, userData) => {\n return require('./fueldrop-report').createFuelDropReport(from, to, userData, this.traccar)\n }\n\n this.eventsReport = (from, to, userData) => {\n return require('./events-report').createEventsReport(from, to, userData, this.traccar)\n }\n\n this.eventsReportToPDF = (userData, reportData) => {\n return require('./events-report').exportSpeedingReportToPDF(userData, reportData)\n }\n\n this.eventsReportToExcel = (userData, reportData) => {\n return require('./events-report').exportSpeedingReportToExcel(userData, reportData)\n }\n\n this.fuelConsumptionReport = (from, to, userData) => {\n return require('./fuelconsumption-report').createFuelConsumptionReport(from, to, userData, this.traccar)\n }\n\n this.locationReport = (from, to, userData) => {\n return require('./location-report').createLocationReport(from, to, userData, this.traccar)\n }\n\n this.locationReportToPDF = (userData, reportData) => {\n return require('./location-report').exportLocationReportToPDF(userData, reportData)\n }\n\n this.locationReportToExcel = (userData, reportData) => {\n return require('./location-report').exportLocationReportToExcel(userData, reportData)\n }\n\n this.activityReport = (from, to, userData) => {\n return require('./activity-report').createActivityReport(from, to, userData, this.traccar)\n }\n\n this.activityReportToPDF = (userData, reportData) => {\n return require('./activity-report').exportActivityReportToPDF(userData, reportData)\n }\n\n this.activityReportToExcel = (userData, reportData) => {\n return require('./activity-report').exportActivityReportToExcel(userData, reportData)\n }\n\n this.kmsReport = (from, to, userData) => {\n return require('./kms-report').createKmsReport(from, to, userData, this.traccar)\n }\n\n this.kmsReportToPDF = (userData, reportData) => {\n return require('./kms-report').exportKmsReportToPDF(userData, reportData)\n }\n\n this.kmsReportToExcel = (userData, reportData) => {\n return require('./kms-report').exportKmsReportToExcel(userData, reportData)\n }\n\n this.vistaWasteActivityReport = (from, to, userData) => {\n return require('./custom/vistawasteActivity-report').createVistaWasteActivityReport(from, to, userData, this.traccar)\n }\n\n this.vistaWasteActivityReportToPDF = (userData, reportData) => {\n return require('./custom/vistawasteActivity-report').exportVistaWasteActivityReportToPDF(userData, reportData)\n }\n\n this.vistaWasteActivityReportToExcel = (userData, reportData) => {\n return require('./custom/vistawasteActivity-report').exportVistaWasteActivityReportToExcel(userData, reportData)\n }\n}\nmodule.exports = Reports\n\n
219
+ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
220
+ <+>UTF-8
221
+ ===================================================================
222
+ diff --git a/src/index.js b/src/index.js
223
+ --- a/src/index.js (revision 0ae69bd1e224b6db3b69f61e65035315b96f9788)
224
+ +++ b/src/index.js (date 1637845630356)
225
+ @@ -23,7 +23,7 @@
226
+ return require('./speeding-report').createSpeedingReport(from, to, userData, this.traccar, roadSpeedLimits)
227
+ }
228
+
229
+ - this.speedingReportToPDF = (userData, reportData) => {
230
+ + this.speedingReportToPDF = async (userData, reportData) => {
231
+ return require('./speeding-report').exportSpeedingReportToPDF(userData, reportData)
232
+ }
233
+
@@ -0,0 +1,4 @@
1
+ <changelist name="Uncommitted_changes_before_Update_at_25_11_2021,_13_06_[Changes]" date="1637845630581" recycled="true" deleted="true">
2
+ <option name="PATH" value="$PROJECT_DIR$/.idea/shelf/Uncommitted_changes_before_Update_at_25_11_2021,_13_06_[Changes]/shelved.patch" />
3
+ <option name="DESCRIPTION" value="Uncommitted changes before Update at 25/11/2021, 13:06 [Changes]" />
4
+ </changelist>
@@ -0,0 +1,4 @@
1
+ <changelist name="Uncommitted_changes_before_Update_at_25_11_2021,_13_10_[Changes]" date="1637845850090" recycled="true" deleted="true">
2
+ <option name="PATH" value="$PROJECT_DIR$/.idea/shelf/Uncommitted_changes_before_Update_at_25_11_2021,_13_10_[Changes]/shelved.patch" />
3
+ <option name="DESCRIPTION" value="Uncommitted changes before Update at 25/11/2021, 13:10 [Changes]" />
4
+ </changelist>
@@ -0,0 +1,246 @@
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="kms report with parallel requests">
5
+ <change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
6
+ <change beforePath="$PROJECT_DIR$/src/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/index.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
+ <change beforePath="$PROJECT_DIR$/src/util/traccar.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/util/traccar.js" afterDir="false" />
10
+ </list>
11
+ <option name="SHOW_DIALOG" value="false" />
12
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
13
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
14
+ <option name="LAST_RESOLUTION" value="IGNORE" />
15
+ </component>
16
+ <component name="FileTemplateManagerImpl">
17
+ <option name="RECENT_TEMPLATES">
18
+ <list>
19
+ <option value="JavaScript File" />
20
+ </list>
21
+ </option>
22
+ </component>
23
+ <component name="Git.Settings">
24
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
25
+ </component>
26
+ <component name="ProjectId" id="20NIxbej0qfi8RaO3jr1XOU0xol" />
27
+ <component name="ProjectViewState">
28
+ <option name="hideEmptyMiddlePackages" value="true" />
29
+ <option name="showLibraryContents" value="true" />
30
+ </component>
31
+ <component name="PropertiesComponent">
32
+ <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
33
+ <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
34
+ <property name="WebServerToolWindowFactoryState" value="false" />
35
+ <property name="last_opened_file_path" value="$PROJECT_DIR$" />
36
+ <property name="nodejs.mocha.mocha_node_package_dir" value="$PROJECT_DIR$/node_modules/mocha" />
37
+ <property name="nodejs_package_manager_path" value="npm" />
38
+ <property name="ts.external.directory.path" value="$APPLICATION_HOME_DIR$/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external" />
39
+ <property name="vue.rearranger.settings.migration" value="true" />
40
+ </component>
41
+ <component name="RunManager" selected="Mocha.speedingReport.test kmsReport by day">
42
+ <configuration name="report" type="mocha-javascript-test-runner" temporary="true" nameIsGenerated="true">
43
+ <node-interpreter>project</node-interpreter>
44
+ <node-options />
45
+ <mocha-package>$PROJECT_DIR$/node_modules/mocha</mocha-package>
46
+ <working-directory>$PROJECT_DIR$</working-directory>
47
+ <pass-parent-env>true</pass-parent-env>
48
+ <ui>bdd</ui>
49
+ <extra-mocha-options />
50
+ <test-kind>SUITE</test-kind>
51
+ <test-file>$PROJECT_DIR$/src/index.test.js</test-file>
52
+ <test-names>
53
+ <name value="report" />
54
+ </test-names>
55
+ <method v="2" />
56
+ </configuration>
57
+ <configuration name="speedingReport" type="mocha-javascript-test-runner" temporary="true" nameIsGenerated="true">
58
+ <node-interpreter>project</node-interpreter>
59
+ <node-options />
60
+ <mocha-package>$PROJECT_DIR$/node_modules/mocha</mocha-package>
61
+ <working-directory>$PROJECT_DIR$</working-directory>
62
+ <pass-parent-env>true</pass-parent-env>
63
+ <ui>bdd</ui>
64
+ <extra-mocha-options />
65
+ <test-kind>TEST</test-kind>
66
+ <test-file>$PROJECT_DIR$/src/index.test.js</test-file>
67
+ <test-names>
68
+ <name value="speedingReport" />
69
+ </test-names>
70
+ <method v="2" />
71
+ </configuration>
72
+ <configuration name="speedingReport.test kmsReport by day" type="mocha-javascript-test-runner" temporary="true" nameIsGenerated="true">
73
+ <node-interpreter>project</node-interpreter>
74
+ <node-options />
75
+ <mocha-package>$PROJECT_DIR$/node_modules/mocha</mocha-package>
76
+ <working-directory>$PROJECT_DIR$</working-directory>
77
+ <pass-parent-env>true</pass-parent-env>
78
+ <envs>
79
+ <env name="email" value="jppenas@gmail.com" />
80
+ <env name="password" value="penas46881" />
81
+ </envs>
82
+ <ui>bdd</ui>
83
+ <extra-mocha-options />
84
+ <test-kind>TEST</test-kind>
85
+ <test-file>$PROJECT_DIR$/src/index.test.js</test-file>
86
+ <test-names>
87
+ <name value="speedingReport" />
88
+ <name value="test kmsReport by day" />
89
+ </test-names>
90
+ <method v="2" />
91
+ </configuration>
92
+ <configuration name="test reports" type="mocha-javascript-test-runner" temporary="true" nameIsGenerated="true">
93
+ <node-interpreter>project</node-interpreter>
94
+ <node-options />
95
+ <mocha-package>$PROJECT_DIR$/node_modules/mocha</mocha-package>
96
+ <working-directory>$PROJECT_DIR$</working-directory>
97
+ <pass-parent-env>true</pass-parent-env>
98
+ <envs>
99
+ <env name="email" value="jppenas@gmail.com" />
100
+ <env name="password" value="penas46881" />
101
+ </envs>
102
+ <ui>bdd</ui>
103
+ <extra-mocha-options />
104
+ <test-kind>SUITE</test-kind>
105
+ <test-file>$PROJECT_DIR$/src/index.test.js</test-file>
106
+ <test-names>
107
+ <name value="test reports" />
108
+ </test-names>
109
+ <method v="2" />
110
+ </configuration>
111
+ <configuration name="test reports.test queue" type="mocha-javascript-test-runner" temporary="true" nameIsGenerated="true">
112
+ <node-interpreter>project</node-interpreter>
113
+ <node-options />
114
+ <mocha-package>$PROJECT_DIR$/node_modules/mocha</mocha-package>
115
+ <working-directory>$PROJECT_DIR$</working-directory>
116
+ <pass-parent-env>true</pass-parent-env>
117
+ <ui>bdd</ui>
118
+ <extra-mocha-options />
119
+ <test-kind>TEST</test-kind>
120
+ <test-file>$PROJECT_DIR$/src/index.test.js</test-file>
121
+ <test-names>
122
+ <name value="test reports" />
123
+ <name value="test queue" />
124
+ </test-names>
125
+ <method v="2" />
126
+ </configuration>
127
+ <list>
128
+ <item itemvalue="Mocha.report" />
129
+ <item itemvalue="Mocha.speedingReport" />
130
+ <item itemvalue="Mocha.test reports" />
131
+ <item itemvalue="Mocha.test reports.test queue" />
132
+ <item itemvalue="Mocha.speedingReport.test kmsReport by day" />
133
+ </list>
134
+ <recent_temporary>
135
+ <list>
136
+ <item itemvalue="Mocha.speedingReport.test kmsReport by day" />
137
+ <item itemvalue="Mocha.test reports" />
138
+ <item itemvalue="Mocha.test reports.test queue" />
139
+ <item itemvalue="Mocha.speedingReport" />
140
+ <item itemvalue="Mocha.report" />
141
+ </list>
142
+ </recent_temporary>
143
+ </component>
144
+ <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
145
+ <component name="TaskManager">
146
+ <task active="true" id="Default" summary="Default task">
147
+ <changelist id="eb665c86-c893-4333-bd2a-721dc27980b9" name="Changes" comment="" />
148
+ <created>1635878866368</created>
149
+ <option name="number" value="Default" />
150
+ <option name="presentableId" value="Default" />
151
+ <updated>1635878866368</updated>
152
+ <workItem from="1635878870054" duration="105000" />
153
+ <workItem from="1635943211865" duration="371000" />
154
+ <workItem from="1636030918716" duration="808000" />
155
+ <workItem from="1636366400735" duration="3018000" />
156
+ <workItem from="1636371409243" duration="45000" />
157
+ <workItem from="1636371621773" duration="4750000" />
158
+ <workItem from="1636623371114" duration="675000" />
159
+ <workItem from="1636624396937" duration="1987000" />
160
+ <workItem from="1636627666406" duration="1616000" />
161
+ <workItem from="1636647112207" duration="1748000" />
162
+ <workItem from="1636981640447" duration="4315000" />
163
+ <workItem from="1637009407292" duration="1470000" />
164
+ <workItem from="1637012863006" duration="5376000" />
165
+ <workItem from="1637087797229" duration="5701000" />
166
+ <workItem from="1637227826845" duration="1275000" />
167
+ <workItem from="1637441942952" duration="4543000" />
168
+ <workItem from="1637670815688" duration="2973000" />
169
+ <workItem from="1637674107929" duration="13419000" />
170
+ <workItem from="1637756665591" duration="4742000" />
171
+ <workItem from="1637841765985" duration="10197000" />
172
+ <workItem from="1637868513425" duration="1650000" />
173
+ <workItem from="1637928687573" duration="37000" />
174
+ <workItem from="1637931438656" duration="621000" />
175
+ <workItem from="1637952151523" duration="4408000" />
176
+ </task>
177
+ <task id="LOCAL-00001" summary="Fix getStyle">
178
+ <created>1636983717385</created>
179
+ <option name="number" value="00001" />
180
+ <option name="presentableId" value="LOCAL-00001" />
181
+ <option name="project" value="LOCAL" />
182
+ <updated>1636983717385</updated>
183
+ </task>
184
+ <task id="LOCAL-00002" summary="Fix getStyle in all reports">
185
+ <created>1637020728356</created>
186
+ <option name="number" value="00002" />
187
+ <option name="presentableId" value="LOCAL-00002" />
188
+ <option name="project" value="LOCAL" />
189
+ <updated>1637020728356</updated>
190
+ </task>
191
+ <task id="LOCAL-00003" summary="try catch on pdf addImage">
192
+ <created>1637247013210</created>
193
+ <option name="number" value="00003" />
194
+ <option name="presentableId" value="LOCAL-00003" />
195
+ <option name="project" value="LOCAL" />
196
+ <updated>1637247013211</updated>
197
+ </task>
198
+ <task id="LOCAL-00004" summary="Kms report grouped by day">
199
+ <created>1637715473148</created>
200
+ <option name="number" value="00004" />
201
+ <option name="presentableId" value="LOCAL-00004" />
202
+ <option name="project" value="LOCAL" />
203
+ <updated>1637715473149</updated>
204
+ </task>
205
+ <task id="LOCAL-00005" summary="Fix pdf logo">
206
+ <created>1637849206762</created>
207
+ <option name="number" value="00005" />
208
+ <option name="presentableId" value="LOCAL-00005" />
209
+ <option name="project" value="LOCAL" />
210
+ <updated>1637849206762</updated>
211
+ </task>
212
+ <task id="LOCAL-00006" summary="kms report with parallel requests">
213
+ <created>1637858604089</created>
214
+ <option name="number" value="00006" />
215
+ <option name="presentableId" value="LOCAL-00006" />
216
+ <option name="project" value="LOCAL" />
217
+ <updated>1637858604089</updated>
218
+ </task>
219
+ <option name="localTasksCounter" value="7" />
220
+ <servers />
221
+ </component>
222
+ <component name="TypeScriptGeneratedFilesManager">
223
+ <option name="version" value="3" />
224
+ </component>
225
+ <component name="Vcs.Log.Tabs.Properties">
226
+ <option name="TAB_STATES">
227
+ <map>
228
+ <entry key="MAIN">
229
+ <value>
230
+ <State />
231
+ </value>
232
+ </entry>
233
+ </map>
234
+ </option>
235
+ <option name="oldMeFiltersMigrated" value="true" />
236
+ </component>
237
+ <component name="VcsManagerConfiguration">
238
+ <MESSAGE value="Fix getStyle" />
239
+ <MESSAGE value="Fix getStyle in all reports" />
240
+ <MESSAGE value="try catch on pdf addImage" />
241
+ <MESSAGE value="Kms report grouped by day" />
242
+ <MESSAGE value="Fix pdf logo" />
243
+ <MESSAGE value="kms report with parallel requests" />
244
+ <option name="LAST_COMMIT_MESSAGE" value="kms report with parallel requests" />
245
+ </component>
246
+ </project>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetmap-reports",
3
- "version": "1.0.241",
3
+ "version": "1.0.245",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -23,7 +23,7 @@ function Reports(config, axios) {
23
23
  return require('./speeding-report').createSpeedingReport(from, to, userData, this.traccar, roadSpeedLimits)
24
24
  }
25
25
 
26
- this.speedingReportToPDF = (userData, reportData) => {
26
+ this.speedingReportToPDF = async (userData, reportData) => {
27
27
  return require('./speeding-report').exportSpeedingReportToPDF(userData, reportData)
28
28
  }
29
29
 
package/src/index.test.js CHANGED
@@ -14,7 +14,11 @@ describe('speedingReport', function() {
14
14
  const reports = await getReports()
15
15
  const userData = await reports.getUserData()
16
16
  userData.groupByDay = true
17
- await reports.kmsReport(new Date(2021, 9), new Date(2021, 10),
17
+ const reportData = await reports.kmsReport(new Date(2021, 10, 1), new Date(2021, 10, 3),
18
18
  userData)
19
+
20
+ console.log(reportData)
21
+
22
+ await reports.kmsReportToPDF(userData, reportData[0])
19
23
  })
20
24
  })
package/src/kms-report.js CHANGED
@@ -23,9 +23,10 @@ async function createKmsReportByDevice(from, to, userData) {
23
23
  }
24
24
 
25
25
  devicesToProcess.sort((a, b) => (a.name > b.name) ? 1 : -1)
26
- const data = await traccar.getRoute(traccarInstance, from, to, devicesToProcess)
26
+ //const data = await traccar.getRoute(traccarInstance, from, to, devicesToProcess)
27
+ const data = await traccar.getTrips(traccarInstance, from, to, devicesToProcess)
27
28
 
28
- console.log('locations:' + data.length)
29
+ console.log('trips:' + data.length)
29
30
 
30
31
  if (data.length > 0) {
31
32
  allData.devices = processDevices(from, to, devicesToProcess, data)
@@ -46,23 +47,23 @@ function processDevices(from, to, devices, data) {
46
47
  const devicesResult = []
47
48
 
48
49
  for (const d of devices) {
49
- const locations = data.filter(t => t.deviceId === d.id)
50
+ const trips = data.filter(t => t.deviceId === d.id)
50
51
 
51
- if (locations.length > 0) {
52
- locations.forEach(l => l.locationDate = l.fixTime.substring(0, 10) + ' 12:00 PM')
53
- const groupedLocations = locations.reduce(
54
- (entryMap, e) => entryMap.set(e.locationDate, [...entryMap.get(e.locationDate)||[], e]),
52
+ if (trips.length > 0) {
53
+ trips.forEach(t => t.tripDay = new Date(t.startTime).toISOString().split('T')[0] + ' 12:00 PM')
54
+ const groupedTrips = trips.reduce(
55
+ (entryMap, e) => entryMap.set(e.tripDay, [...entryMap.get(e.tripDay)||[], e]),
55
56
  new Map()
56
57
  )
57
58
 
58
59
  const days = []
59
- const keys = Array.from(groupedLocations.keys())
60
+ const keys = Array.from(groupedTrips.keys())
60
61
 
61
62
  keys.forEach(key => {
62
- const dayLocations = groupedLocations.get(key)
63
+ const dayTrips = groupedTrips.get(key)
63
64
  const day = {
64
- date: new Date(key).toLocaleDateString(),
65
- kms: dayLocations.reduce((a, b) => a + b.attributes.distance, 0) || 0
65
+ date: new Date(key),
66
+ kms: dayTrips.reduce((a, b) => a + b.distance, 0) || 0
66
67
  }
67
68
  days.push(day)
68
69
  })
@@ -1,4 +1,5 @@
1
1
  const automaticReports = require("../automaticReports");
2
+ const moment = require('moment')
2
3
 
3
4
  async function getRoute(traccar, from, to, devices){
4
5
  const devicesToSlice = devices.slice()
@@ -14,4 +15,18 @@ async function getRoute(traccar, from, to, devices){
14
15
  return result.map(r => r.data).flat()
15
16
  }
16
17
 
18
+ async function getTrips(traccar, from, to, devices){
19
+ const devicesToSlice = devices.slice()
20
+ const arrayOfArrays = automaticReports.sliceArray(devicesToSlice)
21
+ let requests = []
22
+ for (const a of arrayOfArrays) {
23
+ const promise = traccar.reports.reportsTripsGet(from, to, a.map(d => d.id))
24
+ requests = requests.concat(promise)
25
+ }
26
+
27
+ const result = await Promise.all(requests)
28
+ return result.map(r => r.data).flat()
29
+ }
30
+
17
31
  exports.getRoute = getRoute
32
+ exports.getTrips = getTrips
@@ -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>