feat: Move Trello card to Packing when inspection is passed
- Create InspectionPassed event - Create MoveCardToPackingOnInspectionPassed listener - Register event listener in EventServiceProvider - Dispatch event when markInspectionPassed() is called Now when an order passes inspection on the ops page, the Trello card automatically moves from Inspection to Packing list.
This commit is contained in:
@@ -106,15 +106,25 @@ class TrelloWebhookController extends Controller
|
||||
|
||||
// Handle list-specific actions
|
||||
match ($listName) {
|
||||
'Prep' => $order->update(['status' => 'prep']),
|
||||
'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),
|
||||
'In Transit' => Log::info('Card in transit', ['order_uuid' => $order->uuid]),
|
||||
'Done' => Log::info('Card completed', ['order_uuid' => $order->uuid]),
|
||||
'In Transit' => $order->update(['status' => 'in_transit']),
|
||||
'Done' => $order->update(['status' => 'completed']),
|
||||
default => Log::debug('Card moved to list', [
|
||||
'order_uuid' => $order->uuid,
|
||||
'list' => $listName,
|
||||
]),
|
||||
};
|
||||
|
||||
Log::info('Order status updated from Trello', [
|
||||
'order_uuid' => $order->uuid,
|
||||
'list' => $listName,
|
||||
'status' => $order->status,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user