Skip to content

Commit

Permalink
ran linter
Browse files Browse the repository at this point in the history
  • Loading branch information
roncodes committed Feb 17, 2024
1 parent dc8f1c4 commit b37bad2
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 36 deletions.
14 changes: 7 additions & 7 deletions server/src/Notifications/OrderAssigned.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ public function broadcastOn()
public function toArray()
{
$order = new OrderResource($this->order);

return [
'title' => 'New order ' . $this->order->public_id . ' assigned!',
'body' => $this->order->isScheduled ? 'You have a new order scheduled for ' . $this->order->scheduled_at : 'You have a new order assigned, tap for details.',
'data' => [
'id' => $this->order->public_id,
'type' => 'order_assigned',
'order' => $order->toWebhookPayload()
]
'body' => $this->order->isScheduled ? 'You have a new order scheduled for ' . $this->order->scheduled_at : 'You have a new order assigned, tap for details.',
'data' => [
'id' => $this->order->public_id,
'type' => 'order_assigned',
'order' => $order->toWebhookPayload(),
],
];
}

Expand Down
14 changes: 7 additions & 7 deletions server/src/Notifications/OrderCanceled.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ public function broadcastOn()
public function toArray()
{
$order = new OrderResource($this->order);

return [
'title' => 'Order ' . $this->order->public_id . ' was canceled',
'body' => 'Order ' . $this->order->public_id . ' has been canceled.',
'data' => [
'id' => $this->order->public_id,
'type' => 'order_canceled',
'order' => $order->toWebhookPayload()
]
'body' => 'Order ' . $this->order->public_id . ' has been canceled.',
'data' => [
'id' => $this->order->public_id,
'type' => 'order_canceled',
'order' => $order->toWebhookPayload(),
],
];
}

Expand Down
16 changes: 8 additions & 8 deletions server/src/Notifications/OrderDispatchFailed.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Fleetbase\FleetOps\Notifications;

use Fleetbase\FleetOps\Http\Resources\v1\Order as OrderResource;
use Fleetbase\FleetOps\Events\OrderDispatchFailed as OrderDispatchFailedEvent;
use Fleetbase\FleetOps\Http\Resources\v1\Order as OrderResource;
use Fleetbase\FleetOps\Models\Order;
use Fleetbase\FleetOps\Support\Utils;
use Illuminate\Broadcasting\Channel;
Expand Down Expand Up @@ -90,15 +90,15 @@ public function via($notifiable)
public function toArray()
{
$order = new OrderResource($this->order);

return [
'title' => 'Order ' . $this->order->public_id . ' has dispatch has failed!',
'body' => $this->reason,
'data' => [
'id' => $this->order->public_id,
'type' => 'order_dispatch_failed',
'order' => $order->toWebhookPayload()
]
'body' => $this->reason,
'data' => [
'id' => $this->order->public_id,
'type' => 'order_dispatch_failed',
'order' => $order->toWebhookPayload(),
],
];
}

Expand Down
14 changes: 7 additions & 7 deletions server/src/Notifications/OrderDispatched.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ public function broadcastOn()
public function toArray()
{
$order = new OrderResource($this->order);

return [
'title' => 'Order ' . $this->order->public_id . ' has been dispatched!',
'body' => 'An order has just been dispatched to you and is ready to be started.',
'data' => [
'id' => $this->order->public_id,
'type' => 'order_dispatched',
'order' => $order->toWebhookPayload()
]
'body' => 'An order has just been dispatched to you and is ready to be started.',
'data' => [
'id' => $this->order->public_id,
'type' => 'order_dispatched',
'order' => $order->toWebhookPayload(),
],
];
}

Expand Down
14 changes: 7 additions & 7 deletions server/src/Notifications/OrderPing.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ public function broadcastOn()
public function toArray()
{
$order = new OrderResource($this->order);

return [
'title' => 'New incoming order!',
'body' => $this->distance ? 'New order available for pickup about ' . Utils::formatMeters($this->distance, false) . ' away' : 'New order is available for pickup.',
'data' => [
'id' => $this->order->public_id,
'type' => 'order_ping',
'order' => $order->toWebhookPayload()
]
'body' => $this->distance ? 'New order available for pickup about ' . Utils::formatMeters($this->distance, false) . ' away' : 'New order is available for pickup.',
'data' => [
'id' => $this->order->public_id,
'type' => 'order_ping',
'order' => $order->toWebhookPayload(),
],
];
}

Expand Down

0 comments on commit b37bad2

Please sign in to comment.