diff --git a/app/Http/Controllers/TrelloWebhookController.php b/app/Http/Controllers/TrelloWebhookController.php index 45013f4..1550171 100644 --- a/app/Http/Controllers/TrelloWebhookController.php +++ b/app/Http/Controllers/TrelloWebhookController.php @@ -110,8 +110,14 @@ class TrelloWebhookController extends Controller 'Printing' => $order->update(['status' => 'printing']), 'Inspection' => $order->update(['status' => 'inspection']), 'Packing' => $order->update(['status' => 'packing']), - 'Ready to Ship' => $this->handleReadyToShipIntent($order, $cardId), - 'Awaiting Collection' => $this->handleAwaitingCollectionIntent($order, $cardId), + 'Ready to Ship' => (function () use ($order, $cardId) { + $order->update(['status' => 'ready_to_ship']); + $this->handleReadyToShipIntent($order, $cardId); + })(), + 'Awaiting Collection' => (function () use ($order, $cardId) { + $order->update(['status' => 'awaiting_collection']); + $this->handleAwaitingCollectionIntent($order, $cardId); + })(), 'In Transit' => $order->update(['status' => 'in_transit']), 'Done' => $order->update(['status' => 'completed']), default => Log::debug('Card moved to list', [