@fleetbase/fleetops-engine 0.4.7 → 0.4.8
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/addon/services/location.js +10 -8
- package/composer.json +2 -2
- package/extension.json +1 -1
- package/package.json +1 -1
|
@@ -93,14 +93,16 @@ export default class LocationService extends Service {
|
|
|
93
93
|
|
|
94
94
|
if (isArray(coordinates)) {
|
|
95
95
|
const validCoordinates = coordinates.filter((point) => point.coordinates[0] !== 0);
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
96
|
+
if (validCoordinates) {
|
|
97
|
+
const [longitude, latitude] = getWithDefault(validCoordinates, '0.coordinates', [0, 0]);
|
|
98
|
+
const userCoordinates = {
|
|
99
|
+
latitude,
|
|
100
|
+
longitude,
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
this.updateLocation(userCoordinates);
|
|
104
|
+
return userCoordinates;
|
|
105
|
+
}
|
|
104
106
|
}
|
|
105
107
|
|
|
106
108
|
return this.getUserLocationFromWhois();
|
package/composer.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fleetbase/fleetops-api",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.8",
|
|
4
4
|
"description": "Fleet & Transport Management Extension for Fleetbase",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fleetbase-extension",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
],
|
|
23
23
|
"require": {
|
|
24
24
|
"php": "^8.0",
|
|
25
|
-
"fleetbase/core-api": "^1.4.
|
|
25
|
+
"fleetbase/core-api": "^1.4.1",
|
|
26
26
|
"barryvdh/laravel-dompdf": "^2.0",
|
|
27
27
|
"brick/geo": "0.7.2",
|
|
28
28
|
"cknow/laravel-money": "^7.1",
|
package/extension.json
CHANGED