@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 +1 -1
- package/extension.json +1 -1
- package/package.json +1 -1
- package/server/src/Events/EntityActivityChanged.php +2 -2
- package/server/src/Events/EntityCompleted.php +2 -2
- package/server/src/Events/OrderCanceled.php +2 -2
- package/server/src/Events/OrderCompleted.php +2 -2
- package/server/src/Events/OrderDispatched.php +2 -2
- package/server/src/Events/OrderDriverAssigned.php +1 -1
- package/server/src/Events/OrderFailed.php +2 -2
- package/server/src/Events/OrderReady.php +1 -1
- package/server/src/Events/OrderStarted.php +1 -1
- package/server/src/Events/WaypointActivityChanged.php +2 -2
- package/server/src/Events/WaypointCompleted.php +2 -2
- package/server/src/Listeners/NotifyOrderEvent.php +1 -0
- package/server/src/Models/Order.php +1 -1
package/composer.json
CHANGED
package/extension.json
CHANGED
package/package.json
CHANGED
|
@@ -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
|
}
|
|
@@ -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
|
}
|
|
@@ -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
|
}
|