Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Create Release
on:
push:
tags:
- 'v*'

jobs:
create:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Publish GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
generate_release_notes: true
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fleetbase/fleetops-api",
"version": "0.6.13",
"version": "0.6.14",
"description": "Fleet & Transport Management Extension for Fleetbase",
"keywords": [
"fleetbase-extension",
Expand Down
2 changes: 1 addition & 1 deletion extension.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Fleet-Ops",
"version": "0.6.13",
"version": "0.6.14",
"description": "Fleet & Transport Management Extension for Fleetbase",
"repository": "https://github.com/fleetbase/fleetops",
"license": "AGPL-3.0-or-later",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fleetbase/fleetops-engine",
"version": "0.6.13",
"version": "0.6.14",
"description": "Fleet & Transport Management Extension for Fleetbase",
"fleetbase": {
"route": "fleet-ops"
Expand Down
4 changes: 2 additions & 2 deletions server/src/Events/EntityActivityChanged.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ class EntityActivityChanged implements ShouldBroadcast
/**
* The entity which has new activity.
*/
public Entity $entity;
public ?Entity $entity = null;

/**
* The activity which triggered the waypoint completed.
*/
public Activity $activity;
public ?Activity $activity = null;

/**
* The event id.
Expand Down
4 changes: 2 additions & 2 deletions server/src/Events/EntityCompleted.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ class EntityCompleted implements ShouldBroadcast
/**
* The entity which is completed.
*/
public Entity $entity;
public ?Entity $entity = null;

/**
* The activity which triggered the waypoint completed.
*/
public Activity $activity;
public ?Activity $activity = null;

/**
* The event id.
Expand Down
4 changes: 2 additions & 2 deletions server/src/Events/OrderCanceled.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ class OrderCanceled extends ResourceLifecycleEvent
/**
* Assosciated activity which triggered the event.
*/
public ?Activity $activity;
public ?Activity $activity = null;

/**
* Assosciated order waypoint which event is for.
*/
public ?Waypoint $waypoint;
public ?Waypoint $waypoint = null;
}
4 changes: 2 additions & 2 deletions server/src/Events/OrderCompleted.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ class OrderCompleted extends ResourceLifecycleEvent
/**
* Assosciated activity which triggered the event.
*/
public ?Activity $activity;
public ?Activity $activity = null;

/**
* Assosciated order waypoint which event is for.
*/
public ?Waypoint $waypoint;
public ?Waypoint $waypoint = null;
}
4 changes: 2 additions & 2 deletions server/src/Events/OrderDispatched.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ class OrderDispatched extends ResourceLifecycleEvent
/**
* Assosciated activity which triggered the event.
*/
public ?Activity $activity;
public ?Activity $activity = null;

/**
* Assosciated order waypoint which event is for.
*/
public ?Waypoint $waypoint;
public ?Waypoint $waypoint = null;
}
2 changes: 1 addition & 1 deletion server/src/Events/OrderDriverAssigned.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ class OrderDriverAssigned extends ResourceLifecycleEvent
/**
* Assosciated activity which triggered the event.
*/
public ?Activity $activity;
public ?Activity $activity = null;
}
4 changes: 2 additions & 2 deletions server/src/Events/OrderFailed.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ class OrderFailed extends ResourceLifecycleEvent
/**
* Assosciated activity which triggered the event.
*/
public ?Activity $activity;
public ?Activity $activity = null;

/**
* Assosciated order waypoint which event is for.
*/
public ?Waypoint $waypoint;
public ?Waypoint $waypoint = null;
}
2 changes: 1 addition & 1 deletion server/src/Events/OrderReady.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ class OrderReady extends ResourceLifecycleEvent
/**
* Assosciated activity which triggered the event.
*/
public ?Activity $activity;
public ?Activity $activity = null;
}
2 changes: 1 addition & 1 deletion server/src/Events/OrderStarted.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ class OrderStarted extends ResourceLifecycleEvent
/**
* Assosciated activity which triggered the event.
*/
public ?Activity $activity;
public ?Activity $activity = null;
}
4 changes: 2 additions & 2 deletions server/src/Events/WaypointActivityChanged.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ class WaypointActivityChanged implements ShouldBroadcast
/**
* The waypoint which is completed.
*/
public Waypoint $waypoint;
public ?Waypoint $waypoint = null;

/**
* The activity which triggered the waypoint completed.
*/
public Activity $activity;
public ?Activity $activity = null;

/**
* The event id.
Expand Down
4 changes: 2 additions & 2 deletions server/src/Events/WaypointCompleted.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ class WaypointCompleted implements ShouldBroadcast
/**
* The waypoint which is completed.
*/
public Waypoint $waypoint;
public ?Waypoint $waypoint = null;

/**
* The activity which triggered the waypoint completed.
*/
public Activity $activity;
public ?Activity $activity = null;

/**
* The event id.
Expand Down
1 change: 1 addition & 0 deletions server/src/Listeners/NotifyOrderEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public function handle($event)
$reason = $event->activity ? $event->activity->get('details') : '';
NotificationRegistry::notify(OrderCanceled::class, $order, $reason, $event->waypoint);
}

if ($event instanceof \Fleetbase\FleetOps\Events\OrderCompleted) {
NotificationRegistry::notify(OrderCompleted::class, $order, $event->waypoint);
}
Expand Down
2 changes: 1 addition & 1 deletion server/src/Models/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,7 @@ public function cancel()
}
}

return event(new OrderCanceled($this));
return dispatch(fn () => event(new OrderCanceled($this)))->afterCommit();
}

/**
Expand Down
Loading