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
+3 -3
View File
@@ -119,7 +119,7 @@ class OpsController extends Controller
], 409);
}
// Update status and emit event
// Update status
$order->update(['status' => 'packing']);
Log::info('Inspection passed via QR', [
@@ -127,8 +127,8 @@ class OpsController extends Controller
'marked_by' => auth()->user()->name,
]);
// Emit event for listeners to handle Slack/Trello updates
// TODO: Create InspectionPassed event
// Emit event to trigger Slack/Trello updates
\App\Events\InspectionPassed::dispatch($order);
return response()->json([
'success' => true,