fleetmap-reports 1.0.287 → 1.0.288
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/jsLibraryMappings.xml +6 -0
- package/.idea/modules.xml +1 -1
- package/.idea/vcs.xml +1 -1
- package/{.idea/fleetmap-reports.iml → fleetmap-reports.iml} +1 -2
- package/lang/enGB.js +2 -12
- package/lang/esCL.js +1 -10
- package/lang/index.js +1 -4
- package/lang/ptBR.js +1 -11
- package/lang/ptPT.js +1 -11
- package/package.json +1 -2
- package/src/activity-report.js +206 -542
- package/src/automaticReports.js +1 -1
- package/src/events-report.js +21 -25
- package/src/here.js +1 -1
- package/src/index.js +2 -12
- package/src/index.test.js +27 -60
- package/src/kms-report.js +103 -409
- package/src/location-report.js +18 -22
- package/src/refueling-report.js +1 -11
- package/src/reportStyle.js +0 -26
- package/src/speeding-report.js +180 -232
- package/src/trip-report.js +159 -152
- package/src/util/driver.js +13 -5
- package/src/util/utils.js +1 -67
- package/src/zone-report.js +23 -22
- package/.idea/aws.xml +0 -17
- package/.idea/runConfigurations.xml +0 -10
- package/.idea/shelf/Uncommitted_changes_before_Update_at_13_01_2022,_12_06_[Changes]/shelved.patch +0 -111
- package/.idea/shelf/Uncommitted_changes_before_Update_at_13_01_2022__12_06__Changes_.xml +0 -4
- package/.idea/workspace.xml +0 -515
- package/src/idle-report.js +0 -285
- package/src/tests/index.js +0 -22
- package/src/util/pdfDocument.js +0 -58
- package/src/util/traccar.js +0 -72
- package/src/util/trips.js +0 -76
package/.idea/aws.xml
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="accountSettings">
|
|
4
|
-
<option name="activeProfile" value="profile:default" />
|
|
5
|
-
<option name="activeRegion" value="us-east-1" />
|
|
6
|
-
<option name="recentlyUsedProfiles">
|
|
7
|
-
<list>
|
|
8
|
-
<option value="profile:default" />
|
|
9
|
-
</list>
|
|
10
|
-
</option>
|
|
11
|
-
<option name="recentlyUsedRegions">
|
|
12
|
-
<list>
|
|
13
|
-
<option value="us-east-1" />
|
|
14
|
-
</list>
|
|
15
|
-
</option>
|
|
16
|
-
</component>
|
|
17
|
-
</project>
|
|
@@ -1,10 +0,0 @@
|
|
|
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>
|
package/.idea/shelf/Uncommitted_changes_before_Update_at_13_01_2022,_12_06_[Changes]/shelved.patch
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
Index: lang/enGB.js
|
|
2
|
-
IDEA additional info:
|
|
3
|
-
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
|
|
4
|
-
<+>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 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 titleIdleReport: 'Idle 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 licensePlate: 'License Plate',\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 monday: 'Monday',\n tuesday: 'Tuesday',\n wednesday: 'Wednesday',\n thursday: 'Thursday',\n friday: 'Friday',\n saturday: 'Saturday',\n sunday: 'Sunday',\n weekDay: 'Week Day',\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
|
|
5
|
-
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
|
6
|
-
<+>UTF-8
|
|
7
|
-
===================================================================
|
|
8
|
-
diff --git a/lang/enGB.js b/lang/enGB.js
|
|
9
|
-
--- a/lang/enGB.js (revision 72e03f900c10baae4125ede3213c2bf41b831443)
|
|
10
|
-
+++ b/lang/enGB.js (date 1642075508634)
|
|
11
|
-
@@ -198,7 +198,7 @@
|
|
12
|
-
stopTime: 'Stop',
|
|
13
|
-
distance: 'Distance',
|
|
14
|
-
speed: 'Speed',
|
|
15
|
-
- roadSpeedLimit: 'Limite da estrada',
|
|
16
|
-
+ roadSpeedLimit: 'Road Speed Limit',
|
|
17
|
-
overspeed: 'Alert On',
|
|
18
|
-
avgSpeed: 'Avg Speed',
|
|
19
|
-
maxSpeed: 'Max Speed',
|
|
20
|
-
Index: package.json
|
|
21
|
-
IDEA additional info:
|
|
22
|
-
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
|
|
23
|
-
<+>{\n \"name\": \"fleetmap-reports\",\n \"version\": \"1.0.276\",\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
|
|
24
|
-
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
|
25
|
-
<+>UTF-8
|
|
26
|
-
===================================================================
|
|
27
|
-
diff --git a/package.json b/package.json
|
|
28
|
-
--- a/package.json (revision 72e03f900c10baae4125ede3213c2bf41b831443)
|
|
29
|
-
+++ b/package.json (date 1642075597358)
|
|
30
|
-
@@ -1,6 +1,6 @@
|
|
31
|
-
{
|
|
32
|
-
"name": "fleetmap-reports",
|
|
33
|
-
- "version": "1.0.276",
|
|
34
|
-
+ "version": "1.0.277",
|
|
35
|
-
"description": "",
|
|
36
|
-
"main": "src/index.js",
|
|
37
|
-
"scripts": {
|
|
38
|
-
Index: src/index.test.js
|
|
39
|
-
IDEA additional info:
|
|
40
|
-
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
|
|
41
|
-
<+>const {getReports} = require(\"./tests\");\n\ndescribe('speedingReport', function() {\n this.timeout(500000)\n it('test speeding', async () => {\n const report = await getReports()\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 it('test kmsReport by day', async () => {\n const reports = await getReports()\n const userData = await reports.getUserData()\n userData.groupByDay = true\n await reports.kmsReport(new Date(2021, 9), new Date(2021, 10),\n userData)\n })\n})\n
|
|
42
|
-
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
|
43
|
-
<+>UTF-8
|
|
44
|
-
===================================================================
|
|
45
|
-
diff --git a/src/index.test.js b/src/index.test.js
|
|
46
|
-
--- a/src/index.test.js (revision 72e03f900c10baae4125ede3213c2bf41b831443)
|
|
47
|
-
+++ b/src/index.test.js (date 1640795031637)
|
|
48
|
-
@@ -1,20 +1,60 @@
|
|
49
|
-
const {getReports} = require("./tests");
|
|
50
|
-
|
|
51
|
-
-describe('speedingReport', function() {
|
|
52
|
-
+describe('Reports', function() {
|
|
53
|
-
this.timeout(500000)
|
|
54
|
-
it('test speeding', async () => {
|
|
55
|
-
const report = await getReports()
|
|
56
|
-
const userData = await report.getUserData()
|
|
57
|
-
|
|
58
|
-
- await report.speedingReport(new Date(2021, 2, 30, 0, 0, 0, 0),
|
|
59
|
-
+ const reportData = await report.speedingReport(new Date(2021, 2, 30, 0, 0, 0, 0),
|
|
60
|
-
+ new Date(2021, 2, 30, 23, 59, 59, 0),
|
|
61
|
-
+ userData)
|
|
62
|
-
+
|
|
63
|
-
+ console.log(reportData)
|
|
64
|
-
+
|
|
65
|
-
+ })
|
|
66
|
-
+ it('test trip report', async () => {
|
|
67
|
-
+ const report = await getReports()
|
|
68
|
-
+ const userData = await report.getUserData()
|
|
69
|
-
+ userData.byGroup = true
|
|
70
|
-
+ const reportData = await report.tripReport(new Date(2021, 2, 30, 0, 0, 0, 0),
|
|
71
|
-
new Date(2021, 2, 30, 23, 59, 59, 0),
|
|
72
|
-
userData)
|
|
73
|
-
+
|
|
74
|
-
+ console.log(reportData)
|
|
75
|
-
+
|
|
76
|
-
+ })
|
|
77
|
-
+ it('test event report', async () => {
|
|
78
|
-
+ const report = await getReports()
|
|
79
|
-
+ const userData = await report.getUserData()
|
|
80
|
-
+ userData.eventTypes = []
|
|
81
|
-
+ const reportData = await report.eventsReport(new Date(2021, 10, 20, 0, 0, 0, 0),
|
|
82
|
-
+ new Date(2021, 10, 30, 23, 59, 59, 0),
|
|
83
|
-
+ userData)
|
|
84
|
-
+
|
|
85
|
-
+ console.log(reportData)
|
|
86
|
-
+
|
|
87
|
-
})
|
|
88
|
-
it('test kmsReport by day', async () => {
|
|
89
|
-
const reports = await getReports()
|
|
90
|
-
const userData = await reports.getUserData()
|
|
91
|
-
userData.groupByDay = true
|
|
92
|
-
- await reports.kmsReport(new Date(2021, 9), new Date(2021, 10),
|
|
93
|
-
+ const reportData = await reports.kmsReport(new Date(2021, 10, 1), new Date(2021, 10, 3),
|
|
94
|
-
userData)
|
|
95
|
-
+
|
|
96
|
-
+ console.log(reportData)
|
|
97
|
-
+
|
|
98
|
-
+ await reports.kmsReportToPDF(userData, reportData[0])
|
|
99
|
-
+ })
|
|
100
|
-
+ it('test locationReport by day', async () => {
|
|
101
|
-
+ const reports = await getReports()
|
|
102
|
-
+ const userData = await reports.getUserData()
|
|
103
|
-
+ userData.groupByDay = true
|
|
104
|
-
+ const reportData = await reports.locations(new Date(2021, 10, 1), new Date(2021, 10, 3),
|
|
105
|
-
+ userData)
|
|
106
|
-
+
|
|
107
|
-
+ console.log(reportData)
|
|
108
|
-
+
|
|
109
|
-
+ await reports.kmsReportToPDF(userData, reportData[0])
|
|
110
|
-
})
|
|
111
|
-
})
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<changelist name="Uncommitted_changes_before_Update_at_13_01_2022,_12_06_[Changes]" date="1642075622603" recycled="true" deleted="true">
|
|
2
|
-
<option name="PATH" value="$PROJECT_DIR$/.idea/shelf/Uncommitted_changes_before_Update_at_13_01_2022,_12_06_[Changes]/shelved.patch" />
|
|
3
|
-
<option name="DESCRIPTION" value="Uncommitted changes before Update at 13/01/2022, 12:06 [Changes]" />
|
|
4
|
-
</changelist>
|