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:
@@ -4,6 +4,7 @@ namespace App\Providers;
|
||||
|
||||
use App\Events\BalancePaid;
|
||||
use App\Events\DepositPaid;
|
||||
use App\Events\InspectionPassed;
|
||||
use App\Events\OrderCreated;
|
||||
use App\Events\OrderPacked;
|
||||
use App\Events\ParcelCollected;
|
||||
@@ -18,6 +19,7 @@ use App\Events\ShipmentCreated;
|
||||
use App\Events\ShipmentCreationFailed;
|
||||
use App\Listeners\CreateShipmentOnReadyToShip;
|
||||
use App\Listeners\GenerateQrCodeOnOrderCreated;
|
||||
use App\Listeners\MoveCardToPackingOnInspectionPassed;
|
||||
use App\Listeners\NotifySlackOnOrderCreated;
|
||||
use App\Listeners\NotifySlackOnOrderPacked;
|
||||
use App\Listeners\NotifySlackOnParcelCollected;
|
||||
@@ -46,7 +48,14 @@ class EventServiceProvider extends ServiceProvider
|
||||
// Packing events
|
||||
OrderPacked::class => [
|
||||
NotifySlackOnOrderPacked::class,
|
||||
],Ready to Ship intent (from Trello webhook)
|
||||
],
|
||||
|
||||
// Inspection events
|
||||
InspectionPassed::class => [
|
||||
MoveCardToPackingOnInspectionPassed::class,
|
||||
],
|
||||
|
||||
// Ready to Ship intent (from Trello webhook)
|
||||
ReadyToShipIntent::class => [
|
||||
CreateShipmentOnReadyToShip::class,
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user