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:
twotalesanimation
2026-01-02 21:23:12 +02:00
parent 341421d2a0
commit 5cd8c05a7c
7 changed files with 347 additions and 6 deletions
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace App\Events;
use App\Models\Order;
use Illuminate\Broadcasting\Channel;
use Illuminate\Broadcasting\InteractsWithBroadcasting;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
class InspectionPassed
{
use Dispatchable, SerializesModels;
public function __construct(
public Order $order,
) {}
public function broadcastOn(): array
{
return [
new PrivateChannel('channel-name'),
];
}
}