@fleetbase/fleetops-engine 0.4.4 → 0.4.5
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/components/contact-form-panel.hbs +1 -0
- package/addon/components/driver-panel.hbs +1 -0
- package/addon/components/edit-order-route-panel.hbs +1 -0
- package/addon/components/fleet-form-panel.hbs +1 -0
- package/addon/components/fleet-panel.hbs +1 -0
- package/addon/components/fuel-report-form-panel.hbs +1 -0
- package/addon/components/fuel-report-panel.hbs +1 -0
- package/addon/components/issue-form-panel.hbs +1 -0
- package/addon/components/issue-panel.hbs +1 -0
- package/addon/components/place-form-panel.hbs +1 -0
- package/addon/components/place-panel.hbs +1 -0
- package/addon/components/vehicle-form-panel.hbs +1 -0
- package/addon/components/vehicle-panel.hbs +1 -0
- package/addon/components/vendor-form-panel.hbs +1 -0
- package/addon/components/vendor-panel.hbs +1 -0
- package/addon/components/widget/fleet-ops-key-metrics.hbs +19 -0
- package/addon/components/widget/fleet-ops-key-metrics.js +85 -0
- package/addon/controllers/operations/orders/index.js +1 -1
- package/addon/engine.js +18 -12
- package/addon/styles/fleetops-engine.css +2 -2
- package/app/components/widget/{issues.js → fleet-ops-key-metrics.js} +1 -1
- package/composer.json +6 -6
- package/extension.json +1 -1
- package/package.json +3 -4
- package/server/src/Casts/MultiPolygon.php +3 -3
- package/server/src/Casts/Point.php +2 -2
- package/server/src/Casts/Polygon.php +3 -3
- package/server/src/Console/Commands/DispatchAdhocOrders.php +1 -1
- package/server/src/Events/DriverSimulatedLocationChanged.php +1 -1
- package/server/src/Flow/Activity.php +12 -0
- package/server/src/Flow/Config.php +7 -0
- package/server/src/Flow/Logic.php +7 -0
- package/server/src/Http/Controllers/Api/v1/DriverController.php +2 -1
- package/server/src/Http/Controllers/Api/v1/OrderController.php +3 -3
- package/server/src/Http/Controllers/Api/v1/PlaceController.php +1 -1
- package/server/src/Http/Controllers/Api/v1/ServiceAreaController.php +1 -1
- package/server/src/Http/Controllers/Api/v1/TrackingStatusController.php +1 -1
- package/server/src/Http/Controllers/Api/v1/ZoneController.php +1 -1
- package/server/src/Http/Controllers/Internal/v1/DriverController.php +1 -1
- package/server/src/Http/Controllers/Internal/v1/GeocoderController.php +2 -2
- package/server/src/Http/Controllers/Internal/v1/MetricsController.php +6 -50
- package/server/src/Http/Controllers/Internal/v1/OrderController.php +2 -2
- package/server/src/Http/Controllers/Internal/v1/PlaceController.php +1 -1
- package/server/src/Http/Filter/PlaceFilter.php +1 -1
- package/server/src/Http/Resources/v1/Driver.php +1 -1
- package/server/src/Http/Resources/v1/FuelReport.php +1 -1
- package/server/src/Http/Resources/v1/Issue.php +1 -1
- package/server/src/Http/Resources/v1/Payload.php +1 -0
- package/server/src/Http/Resources/v1/Place.php +1 -1
- package/server/src/Http/Resources/v1/TrackingStatus.php +1 -1
- package/server/src/Http/Resources/v1/Vehicle.php +1 -1
- package/server/src/Http/Resources/v1/VehicleWithoutDriver.php +1 -1
- package/server/src/Http/Resources/v1/Waypoint.php +2 -4
- package/server/src/Integrations/Lalamove/LalamoveDeliveryStop.php +2 -2
- package/server/src/Jobs/SimulateWaypointReached.php +2 -2
- package/server/src/Models/Contact.php +6 -18
- package/server/src/Models/Driver.php +7 -19
- package/server/src/Models/Fleet.php +6 -25
- package/server/src/Models/FuelReport.php +1 -1
- package/server/src/Models/Issue.php +1 -1
- package/server/src/Models/Order.php +15 -19
- package/server/src/Models/Payload.php +7 -7
- package/server/src/Models/Place.php +14 -14
- package/server/src/Models/Position.php +1 -1
- package/server/src/Models/ServiceArea.php +14 -14
- package/server/src/Models/TrackingNumber.php +1 -1
- package/server/src/Models/TrackingStatus.php +1 -1
- package/server/src/Models/Vehicle.php +7 -19
- package/server/src/Models/VehicleDeviceEvent.php +1 -1
- package/server/src/Models/Vendor.php +8 -25
- package/server/src/Models/Waypoint.php +6 -6
- package/server/src/Models/Zone.php +8 -8
- package/server/src/Observers/DriverObserver.php +1 -1
- package/server/src/Observers/TrackingNumberObserver.php +1 -1
- package/server/src/Rules/ResolvablePoint.php +1 -1
- package/server/src/Support/Encoding/Polyline.php +1 -1
- package/server/src/Support/OSRM.php +1 -1
- package/server/src/Support/Utils.php +60 -60
- package/server/src/Traits/HasTrackingNumber.php +3 -3
- package/server/src/routes.php +1 -4
- package/translations/en-us.yaml +1 -0
- package/addon/components/widget/fleet-ops-quickstart.hbs +0 -40
- package/addon/components/widget/fleet-ops-quickstart.js +0 -59
- package/addon/components/widget/issues.hbs +0 -1
- package/addon/components/widget/key-metrics.hbs +0 -121
- package/addon/components/widget/key-metrics.js +0 -46
- package/addon/components/widget/live-order-map.hbs +0 -59
- package/addon/components/widget/live-order-map.js +0 -11
- package/addon/components/widget/recent-orders.hbs +0 -35
- package/addon/components/widget/recent-orders.js +0 -24
- package/addon/components/widget/transaction-earnings.hbs +0 -1
- package/addon/components/widget/transactions.hbs +0 -36
- package/addon/components/widget/transactions.js +0 -29
- package/addon/components/widget/weekly-orders.hbs +0 -1
- package/addon/components/widget/weekly-orders.js +0 -3
- package/app/components/widget/key-metrics.js +0 -1
- package/app/components/widget/live-order-map.js +0 -1
- package/app/components/widget/recent-orders.js +0 -1
- package/app/components/widget/transaction-earnings.js +0 -1
- package/app/components/widget/transactions.js +0 -1
- package/app/components/widget/weekly-orders.js +0 -1
|
@@ -4,22 +4,22 @@ namespace Fleetbase\FleetOps\Models;
|
|
|
4
4
|
|
|
5
5
|
use Fleetbase\FleetOps\Casts\MultiPolygon as MultiPolygonCast;
|
|
6
6
|
use Fleetbase\FleetOps\Support\Utils;
|
|
7
|
+
use Fleetbase\LaravelMysqlSpatial\Eloquent\SpatialTrait;
|
|
8
|
+
use Fleetbase\LaravelMysqlSpatial\Types\LineString;
|
|
9
|
+
use Fleetbase\LaravelMysqlSpatial\Types\MultiPolygon;
|
|
10
|
+
use Fleetbase\LaravelMysqlSpatial\Types\Point;
|
|
11
|
+
use Fleetbase\LaravelMysqlSpatial\Types\Polygon;
|
|
7
12
|
use Fleetbase\Models\Model;
|
|
8
13
|
use Fleetbase\Traits\HasApiModelBehavior;
|
|
9
14
|
use Fleetbase\Traits\HasPublicId;
|
|
10
15
|
use Fleetbase\Traits\HasUuid;
|
|
11
16
|
use Fleetbase\Traits\SendsWebhooks;
|
|
12
17
|
use Fleetbase\Traits\TracksApiCredential;
|
|
13
|
-
use Grimzy\LaravelMysqlSpatial\Eloquent\SpatialTrait;
|
|
14
|
-
use Grimzy\LaravelMysqlSpatial\Types\LineString;
|
|
15
|
-
use Grimzy\LaravelMysqlSpatial\Types\MultiPolygon;
|
|
16
|
-
use Grimzy\LaravelMysqlSpatial\Types\Point;
|
|
17
|
-
use Grimzy\LaravelMysqlSpatial\Types\Polygon;
|
|
18
18
|
use Illuminate\Support\Arr;
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
* @var \
|
|
22
|
-
* @var \
|
|
21
|
+
* @var \Fleetbase\LaravelMysqlSpatial\Types\Point $location
|
|
22
|
+
* @var \Fleetbase\LaravelMysqlSpatial\Types\MultiPolygon $border
|
|
23
23
|
*/
|
|
24
24
|
class ServiceArea extends Model
|
|
25
25
|
{
|
|
@@ -130,10 +130,10 @@ class ServiceArea extends Model
|
|
|
130
130
|
/**
|
|
131
131
|
* Creates a polygon from a given point and radius.
|
|
132
132
|
*
|
|
133
|
-
* @param \
|
|
134
|
-
* @param int
|
|
133
|
+
* @param \Fleetbase\LaravelMysqlSpatial\Types\Point $point the central point from which to create the polygon
|
|
134
|
+
* @param int $meters The radius in meters for the polygon. Default is 500 meters.
|
|
135
135
|
*
|
|
136
|
-
* @return \
|
|
136
|
+
* @return \Fleetbase\LaravelMysqlSpatial\Types\Polygon returns a Polygon object
|
|
137
137
|
*/
|
|
138
138
|
public static function createPolygonFromPoint(Point $point, int $meters = 500): Polygon
|
|
139
139
|
{
|
|
@@ -150,10 +150,10 @@ class ServiceArea extends Model
|
|
|
150
150
|
/**
|
|
151
151
|
* Creates a multi-polygon from a given point and radius.
|
|
152
152
|
*
|
|
153
|
-
* @param \
|
|
154
|
-
* @param int
|
|
153
|
+
* @param \Fleetbase\LaravelMysqlSpatial\Types\Point $point the central point from which to create the multi-polygon
|
|
154
|
+
* @param int $meters The radius in meters for the multi-polygon. Default is 500 meters.
|
|
155
155
|
*
|
|
156
|
-
* @return \
|
|
156
|
+
* @return \Fleetbase\LaravelMysqlSpatial\Types\MultiPolygon returns a MultiPolygon object
|
|
157
157
|
*/
|
|
158
158
|
public static function createMultiPolygonFromPoint(Point $point, int $meters = 500): MultiPolygon
|
|
159
159
|
{
|
|
@@ -180,7 +180,7 @@ class ServiceArea extends Model
|
|
|
180
180
|
/**
|
|
181
181
|
* Retrieves the location attribute as a point.
|
|
182
182
|
*
|
|
183
|
-
* @return \
|
|
183
|
+
* @return \Fleetbase\LaravelMysqlSpatial\Types\Point returns the centroid of the border as a Point object
|
|
184
184
|
*/
|
|
185
185
|
public function getLocationAttribute(): Point
|
|
186
186
|
{
|
|
@@ -4,13 +4,13 @@ namespace Fleetbase\FleetOps\Models;
|
|
|
4
4
|
|
|
5
5
|
use Fleetbase\FleetOps\Casts\Point;
|
|
6
6
|
use Fleetbase\FleetOps\Support\Utils;
|
|
7
|
+
use Fleetbase\LaravelMysqlSpatial\Eloquent\SpatialTrait;
|
|
7
8
|
use Fleetbase\Models\Model;
|
|
8
9
|
use Fleetbase\Traits\HasApiModelBehavior;
|
|
9
10
|
use Fleetbase\Traits\HasPublicId;
|
|
10
11
|
use Fleetbase\Traits\HasUuid;
|
|
11
12
|
use Fleetbase\Traits\SendsWebhooks;
|
|
12
13
|
use Fleetbase\Traits\TracksApiCredential;
|
|
13
|
-
use Grimzy\LaravelMysqlSpatial\Eloquent\SpatialTrait;
|
|
14
14
|
use Illuminate\Support\Carbon;
|
|
15
15
|
use Illuminate\Support\Facades\DB;
|
|
16
16
|
use Illuminate\Support\Str;
|
|
@@ -4,6 +4,7 @@ namespace Fleetbase\FleetOps\Models;
|
|
|
4
4
|
|
|
5
5
|
use Fleetbase\Casts\Json;
|
|
6
6
|
use Fleetbase\FleetOps\Casts\Point;
|
|
7
|
+
use Fleetbase\LaravelMysqlSpatial\Eloquent\SpatialTrait;
|
|
7
8
|
use Fleetbase\Models\Model;
|
|
8
9
|
use Fleetbase\Traits\HasApiModelBehavior;
|
|
9
10
|
use Fleetbase\Traits\HasMetaAttributes;
|
|
@@ -11,7 +12,6 @@ use Fleetbase\Traits\HasPublicId;
|
|
|
11
12
|
use Fleetbase\Traits\HasUuid;
|
|
12
13
|
use Fleetbase\Traits\SendsWebhooks;
|
|
13
14
|
use Fleetbase\Traits\TracksApiCredential;
|
|
14
|
-
use Grimzy\LaravelMysqlSpatial\Eloquent\SpatialTrait;
|
|
15
15
|
use Illuminate\Support\Carbon;
|
|
16
16
|
use Illuminate\Support\Str;
|
|
17
17
|
|
|
@@ -5,6 +5,7 @@ namespace Fleetbase\FleetOps\Models;
|
|
|
5
5
|
use Fleetbase\Casts\Json;
|
|
6
6
|
use Fleetbase\FleetOps\Casts\Point;
|
|
7
7
|
use Fleetbase\FleetOps\Support\Utils;
|
|
8
|
+
use Fleetbase\LaravelMysqlSpatial\Eloquent\SpatialTrait;
|
|
8
9
|
use Fleetbase\Models\Model;
|
|
9
10
|
use Fleetbase\Traits\HasApiModelBehavior;
|
|
10
11
|
use Fleetbase\Traits\HasMetaAttributes;
|
|
@@ -12,8 +13,8 @@ use Fleetbase\Traits\HasPublicId;
|
|
|
12
13
|
use Fleetbase\Traits\HasUuid;
|
|
13
14
|
use Fleetbase\Traits\Searchable;
|
|
14
15
|
use Fleetbase\Traits\TracksApiCredential;
|
|
15
|
-
use Grimzy\LaravelMysqlSpatial\Eloquent\SpatialTrait;
|
|
16
16
|
use Illuminate\Support\Str;
|
|
17
|
+
use Spatie\Activitylog\LogOptions;
|
|
17
18
|
use Spatie\Activitylog\Traits\LogsActivity;
|
|
18
19
|
use Spatie\Sluggable\HasSlug;
|
|
19
20
|
use Spatie\Sluggable\SlugOptions;
|
|
@@ -66,25 +67,12 @@ class Vehicle extends Model
|
|
|
66
67
|
protected $with = [];
|
|
67
68
|
|
|
68
69
|
/**
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* @var array
|
|
70
|
+
* Get the activity log options for the model.
|
|
72
71
|
*/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
*
|
|
78
|
-
* @var bool
|
|
79
|
-
*/
|
|
80
|
-
protected static $submitEmptyLogs = false;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* The name of the subject to log.
|
|
84
|
-
*
|
|
85
|
-
* @var string
|
|
86
|
-
*/
|
|
87
|
-
protected static $logName = 'vehicle';
|
|
72
|
+
public function getActivitylogOptions(): LogOptions
|
|
73
|
+
{
|
|
74
|
+
return LogOptions::defaults()->logOnly(['*'])->logOnlyDirty();
|
|
75
|
+
}
|
|
88
76
|
|
|
89
77
|
/**
|
|
90
78
|
* Get the options for generating the slug.
|
|
@@ -4,12 +4,12 @@ namespace Fleetbase\FleetOps\Models;
|
|
|
4
4
|
|
|
5
5
|
use Fleetbase\Casts\Json;
|
|
6
6
|
use Fleetbase\FleetOps\Casts\Point;
|
|
7
|
+
use Fleetbase\LaravelMysqlSpatial\Eloquent\SpatialTrait;
|
|
7
8
|
use Fleetbase\Models\Model;
|
|
8
9
|
use Fleetbase\Traits\HasApiModelBehavior;
|
|
9
10
|
use Fleetbase\Traits\HasUuid;
|
|
10
11
|
use Fleetbase\Traits\Searchable;
|
|
11
12
|
use Fleetbase\Traits\TracksApiCredential;
|
|
12
|
-
use Grimzy\LaravelMysqlSpatial\Eloquent\SpatialTrait;
|
|
13
13
|
|
|
14
14
|
class VehicleDeviceEvent extends Model
|
|
15
15
|
{
|
|
@@ -11,6 +11,7 @@ use Fleetbase\Traits\HasUuid;
|
|
|
11
11
|
use Fleetbase\Traits\Searchable;
|
|
12
12
|
use Fleetbase\Traits\TracksApiCredential;
|
|
13
13
|
use Illuminate\Notifications\Notifiable;
|
|
14
|
+
use Spatie\Activitylog\LogOptions;
|
|
14
15
|
use Spatie\Activitylog\Traits\LogsActivity;
|
|
15
16
|
use Spatie\Sluggable\HasSlug;
|
|
16
17
|
use Spatie\Sluggable\SlugOptions;
|
|
@@ -106,32 +107,14 @@ class Vendor extends Model
|
|
|
106
107
|
protected $with = ['place'];
|
|
107
108
|
|
|
108
109
|
/**
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
* @var array
|
|
110
|
+
* Get the activity log options for the model.
|
|
112
111
|
*/
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
*/
|
|
120
|
-
protected static $submitEmptyLogs = false;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* We only want to log changed attributes.
|
|
124
|
-
*
|
|
125
|
-
* @var bool
|
|
126
|
-
*/
|
|
127
|
-
protected static $logOnlyDirty = true;
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* The name of the subject to log.
|
|
131
|
-
*
|
|
132
|
-
* @var string
|
|
133
|
-
*/
|
|
134
|
-
protected static $logName = 'vendor';
|
|
112
|
+
public function getActivitylogOptions(): LogOptions
|
|
113
|
+
{
|
|
114
|
+
return LogOptions::defaults()
|
|
115
|
+
->logOnly(['name', 'email', 'website_url', 'phone', 'country', 'status', 'type', 'logo_uuid', 'company_uuid'])
|
|
116
|
+
->logOnlyDirty();
|
|
117
|
+
}
|
|
135
118
|
|
|
136
119
|
/**
|
|
137
120
|
* Get the options for generating the slug.
|
|
@@ -86,7 +86,7 @@ class Waypoint extends Model
|
|
|
86
86
|
/**
|
|
87
87
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
|
88
88
|
*/
|
|
89
|
-
public function entities()
|
|
89
|
+
public function entities()
|
|
90
90
|
{
|
|
91
91
|
return $this->hasMany(Entity::class, 'destination_uuid', 'place_uuid')->where('payload_uuid', $this->payload_uuid);
|
|
92
92
|
}
|
|
@@ -97,16 +97,16 @@ class Waypoint extends Model
|
|
|
97
97
|
public function label()
|
|
98
98
|
{
|
|
99
99
|
$this->load(['trackingNumber', 'company', 'place', 'entities']);
|
|
100
|
-
|
|
100
|
+
|
|
101
101
|
// $entities = Entity::where(['payload_uuid' => $this->payload_uuid, 'destination_uuid' => $this->place_uuid])->get();
|
|
102
102
|
// dd($entities, );
|
|
103
103
|
|
|
104
104
|
return view('fleetops::labels/waypoint-label', [
|
|
105
105
|
'waypoint' => $this,
|
|
106
|
-
'dropoff'
|
|
107
|
-
'entities'
|
|
108
|
-
'trackingNumber'
|
|
109
|
-
'company'
|
|
106
|
+
'dropoff' => $this->place,
|
|
107
|
+
'entities' => $this->entities()->get(),
|
|
108
|
+
'trackingNumber' => $this->trackingNumber,
|
|
109
|
+
'company' => $this->company,
|
|
110
110
|
])->render();
|
|
111
111
|
}
|
|
112
112
|
|
|
@@ -4,16 +4,16 @@ namespace Fleetbase\FleetOps\Models;
|
|
|
4
4
|
|
|
5
5
|
use Fleetbase\FleetOps\Casts\Polygon as PolygonCast;
|
|
6
6
|
use Fleetbase\FleetOps\Support\Utils;
|
|
7
|
+
use Fleetbase\LaravelMysqlSpatial\Eloquent\SpatialTrait;
|
|
8
|
+
use Fleetbase\LaravelMysqlSpatial\Types\LineString;
|
|
9
|
+
use Fleetbase\LaravelMysqlSpatial\Types\Point;
|
|
10
|
+
use Fleetbase\LaravelMysqlSpatial\Types\Polygon;
|
|
7
11
|
use Fleetbase\Models\Model;
|
|
8
12
|
use Fleetbase\Traits\HasApiModelBehavior;
|
|
9
13
|
use Fleetbase\Traits\HasPublicId;
|
|
10
14
|
use Fleetbase\Traits\HasUuid;
|
|
11
15
|
use Fleetbase\Traits\SendsWebhooks;
|
|
12
16
|
use Fleetbase\Traits\TracksApiCredential;
|
|
13
|
-
use Grimzy\LaravelMysqlSpatial\Eloquent\SpatialTrait;
|
|
14
|
-
use Grimzy\LaravelMysqlSpatial\Types\LineString;
|
|
15
|
-
use Grimzy\LaravelMysqlSpatial\Types\Point;
|
|
16
|
-
use Grimzy\LaravelMysqlSpatial\Types\Polygon;
|
|
17
17
|
use Illuminate\Support\Arr;
|
|
18
18
|
|
|
19
19
|
class Zone extends Model
|
|
@@ -104,7 +104,7 @@ class Zone extends Model
|
|
|
104
104
|
/**
|
|
105
105
|
* Retrieves the location attribute as a point.
|
|
106
106
|
*
|
|
107
|
-
* @return \
|
|
107
|
+
* @return \Fleetbase\LaravelMysqlSpatial\Types\Point returns the centroid of the border as a Point object
|
|
108
108
|
*/
|
|
109
109
|
public function getLocationAttribute(): Point
|
|
110
110
|
{
|
|
@@ -195,10 +195,10 @@ class Zone extends Model
|
|
|
195
195
|
/**
|
|
196
196
|
* Creates a polygon from a given point and radius.
|
|
197
197
|
*
|
|
198
|
-
* @param \
|
|
199
|
-
* @param int
|
|
198
|
+
* @param \Fleetbase\LaravelMysqlSpatial\Types\Point $point the central point from which to create the polygon
|
|
199
|
+
* @param int $meters The radius in meters for the polygon. Default is 500 meters.
|
|
200
200
|
*
|
|
201
|
-
* @return \
|
|
201
|
+
* @return \Fleetbase\LaravelMysqlSpatial\Types\Polygon returns a Polygon object
|
|
202
202
|
*/
|
|
203
203
|
public static function createPolygonFromPoint(Point $point, int $meters = 500): Polygon
|
|
204
204
|
{
|
|
@@ -4,9 +4,9 @@ namespace Fleetbase\FleetOps\Observers;
|
|
|
4
4
|
|
|
5
5
|
use Fleetbase\FleetOps\Models\Driver;
|
|
6
6
|
use Fleetbase\FleetOps\Models\Order;
|
|
7
|
+
use Fleetbase\LaravelMysqlSpatial\Types\Point;
|
|
7
8
|
use Fleetbase\Models\CompanyUser;
|
|
8
9
|
use Fleetbase\Models\User;
|
|
9
|
-
use Grimzy\LaravelMysqlSpatial\Types\Point;
|
|
10
10
|
|
|
11
11
|
class DriverObserver
|
|
12
12
|
{
|
|
@@ -4,7 +4,7 @@ namespace Fleetbase\FleetOps\Observers;
|
|
|
4
4
|
|
|
5
5
|
use Fleetbase\FleetOps\Models\TrackingNumber;
|
|
6
6
|
use Fleetbase\FleetOps\Models\TrackingStatus;
|
|
7
|
-
use
|
|
7
|
+
use Fleetbase\LaravelMysqlSpatial\Types\Point;
|
|
8
8
|
use Illuminate\Support\Str;
|
|
9
9
|
use Milon\Barcode\Facades\DNS2DFacade as DNS2D;
|
|
10
10
|
|
|
@@ -19,7 +19,7 @@ class ResolvablePoint implements Rule
|
|
|
19
19
|
try {
|
|
20
20
|
$point = Utils::getPointFromMixed($value);
|
|
21
21
|
|
|
22
|
-
return $point instanceof \
|
|
22
|
+
return $point instanceof \Fleetbase\LaravelMysqlSpatial\Types\Point;
|
|
23
23
|
} catch (\Exception $e) {
|
|
24
24
|
return false;
|
|
25
25
|
}
|
|
@@ -125,7 +125,7 @@ class Polyline
|
|
|
125
125
|
$lng = $number * 1 / (10 ** static::$precision); // Using ** operator for pow
|
|
126
126
|
} else {
|
|
127
127
|
$lat = $number * 1 / (10 ** static::$precision);
|
|
128
|
-
$points[] = new \
|
|
128
|
+
$points[] = new \Fleetbase\LaravelMysqlSpatial\Types\Point($lat, $lng); // Create Point object and add to the array
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
$index++;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
namespace Fleetbase\FleetOps\Support;
|
|
4
4
|
|
|
5
5
|
use Fleetbase\FleetOps\Support\Encoding\Polyline;
|
|
6
|
-
use
|
|
6
|
+
use Fleetbase\LaravelMysqlSpatial\Types\Point;
|
|
7
7
|
use Illuminate\Support\Facades\Cache;
|
|
8
8
|
use Illuminate\Support\Facades\Http;
|
|
9
9
|
|