@fleetbase/fleetops-engine 0.6.13 → 0.6.14

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/composer.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetbase/fleetops-api",
3
- "version": "0.6.13",
3
+ "version": "0.6.14",
4
4
  "description": "Fleet & Transport Management Extension for Fleetbase",
5
5
  "keywords": [
6
6
  "fleetbase-extension",
package/extension.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "Fleet-Ops",
3
- "version": "0.6.13",
3
+ "version": "0.6.14",
4
4
  "description": "Fleet & Transport Management Extension for Fleetbase",
5
5
  "repository": "https://github.com/fleetbase/fleetops",
6
6
  "license": "AGPL-3.0-or-later",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fleetbase/fleetops-engine",
3
- "version": "0.6.13",
3
+ "version": "0.6.14",
4
4
  "description": "Fleet & Transport Management Extension for Fleetbase",
5
5
  "fleetbase": {
6
6
  "route": "fleet-ops"
@@ -21,12 +21,12 @@ class EntityActivityChanged implements ShouldBroadcast
21
21
  /**
22
22
  * The entity which has new activity.
23
23
  */
24
- public Entity $entity;
24
+ public ?Entity $entity = null;
25
25
 
26
26
  /**
27
27
  * The activity which triggered the waypoint completed.
28
28
  */
29
- public Activity $activity;
29
+ public ?Activity $activity = null;
30
30
 
31
31
  /**
32
32
  * The event id.
@@ -21,12 +21,12 @@ class EntityCompleted implements ShouldBroadcast
21
21
  /**
22
22
  * The entity which is completed.
23
23
  */
24
- public Entity $entity;
24
+ public ?Entity $entity = null;
25
25
 
26
26
  /**
27
27
  * The activity which triggered the waypoint completed.
28
28
  */
29
- public Activity $activity;
29
+ public ?Activity $activity = null;
30
30
 
31
31
  /**
32
32
  * The event id.
@@ -18,10 +18,10 @@ class OrderCanceled extends ResourceLifecycleEvent
18
18
  /**
19
19
  * Assosciated activity which triggered the event.
20
20
  */
21
- public ?Activity $activity;
21
+ public ?Activity $activity = null;
22
22
 
23
23
  /**
24
24
  * Assosciated order waypoint which event is for.
25
25
  */
26
- public ?Waypoint $waypoint;
26
+ public ?Waypoint $waypoint = null;
27
27
  }
@@ -18,10 +18,10 @@ class OrderCompleted extends ResourceLifecycleEvent
18
18
  /**
19
19
  * Assosciated activity which triggered the event.
20
20
  */
21
- public ?Activity $activity;
21
+ public ?Activity $activity = null;
22
22
 
23
23
  /**
24
24
  * Assosciated order waypoint which event is for.
25
25
  */
26
- public ?Waypoint $waypoint;
26
+ public ?Waypoint $waypoint = null;
27
27
  }
@@ -18,10 +18,10 @@ class OrderDispatched extends ResourceLifecycleEvent
18
18
  /**
19
19
  * Assosciated activity which triggered the event.
20
20
  */
21
- public ?Activity $activity;
21
+ public ?Activity $activity = null;
22
22
 
23
23
  /**
24
24
  * Assosciated order waypoint which event is for.
25
25
  */
26
- public ?Waypoint $waypoint;
26
+ public ?Waypoint $waypoint = null;
27
27
  }
@@ -17,5 +17,5 @@ class OrderDriverAssigned extends ResourceLifecycleEvent
17
17
  /**
18
18
  * Assosciated activity which triggered the event.
19
19
  */
20
- public ?Activity $activity;
20
+ public ?Activity $activity = null;
21
21
  }
@@ -18,10 +18,10 @@ class OrderFailed extends ResourceLifecycleEvent
18
18
  /**
19
19
  * Assosciated activity which triggered the event.
20
20
  */
21
- public ?Activity $activity;
21
+ public ?Activity $activity = null;
22
22
 
23
23
  /**
24
24
  * Assosciated order waypoint which event is for.
25
25
  */
26
- public ?Waypoint $waypoint;
26
+ public ?Waypoint $waypoint = null;
27
27
  }
@@ -17,5 +17,5 @@ class OrderReady extends ResourceLifecycleEvent
17
17
  /**
18
18
  * Assosciated activity which triggered the event.
19
19
  */
20
- public ?Activity $activity;
20
+ public ?Activity $activity = null;
21
21
  }
@@ -17,5 +17,5 @@ class OrderStarted extends ResourceLifecycleEvent
17
17
  /**
18
18
  * Assosciated activity which triggered the event.
19
19
  */
20
- public ?Activity $activity;
20
+ public ?Activity $activity = null;
21
21
  }
@@ -21,12 +21,12 @@ class WaypointActivityChanged implements ShouldBroadcast
21
21
  /**
22
22
  * The waypoint which is completed.
23
23
  */
24
- public Waypoint $waypoint;
24
+ public ?Waypoint $waypoint = null;
25
25
 
26
26
  /**
27
27
  * The activity which triggered the waypoint completed.
28
28
  */
29
- public Activity $activity;
29
+ public ?Activity $activity = null;
30
30
 
31
31
  /**
32
32
  * The event id.
@@ -21,12 +21,12 @@ class WaypointCompleted implements ShouldBroadcast
21
21
  /**
22
22
  * The waypoint which is completed.
23
23
  */
24
- public Waypoint $waypoint;
24
+ public ?Waypoint $waypoint = null;
25
25
 
26
26
  /**
27
27
  * The activity which triggered the waypoint completed.
28
28
  */
29
- public Activity $activity;
29
+ public ?Activity $activity = null;
30
30
 
31
31
  /**
32
32
  * The event id.
@@ -34,6 +34,7 @@ class NotifyOrderEvent implements ShouldQueue
34
34
  $reason = $event->activity ? $event->activity->get('details') : '';
35
35
  NotificationRegistry::notify(OrderCanceled::class, $order, $reason, $event->waypoint);
36
36
  }
37
+
37
38
  if ($event instanceof \Fleetbase\FleetOps\Events\OrderCompleted) {
38
39
  NotificationRegistry::notify(OrderCompleted::class, $order, $event->waypoint);
39
40
  }
@@ -1187,7 +1187,7 @@ class Order extends Model
1187
1187
  }
1188
1188
  }
1189
1189
 
1190
- return event(new OrderCanceled($this));
1190
+ return dispatch(fn () => event(new OrderCanceled($this)))->afterCommit();
1191
1191
  }
1192
1192
 
1193
1193
  /**