From 22dfb129484ac5c98ba3c22c90f94ddddeac5bb2 Mon Sep 17 00:00:00 2001 From: twotalesanimation <80506065+twotalesanimation@users.noreply.github.com> Date: Fri, 2 Jan 2026 21:25:05 +0200 Subject: [PATCH] fix: Add height parameter to OrderPacked event Added height to the OrderPacked event constructor and dispatch call to match the packing form which captures width, length, height, and weight. --- app/Events/OrderPacked.php | 1 + app/Http/Controllers/OpsController.php | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/Events/OrderPacked.php b/app/Events/OrderPacked.php index 368953b..91b25b9 100644 --- a/app/Events/OrderPacked.php +++ b/app/Events/OrderPacked.php @@ -14,6 +14,7 @@ class OrderPacked public Order $order, public float $width, public float $length, + public float $height, public float $weight, public ?int $packedBy = null, ) { diff --git a/app/Http/Controllers/OpsController.php b/app/Http/Controllers/OpsController.php index abb22ff..3a9bfa2 100644 --- a/app/Http/Controllers/OpsController.php +++ b/app/Http/Controllers/OpsController.php @@ -92,7 +92,14 @@ class OpsController extends Controller ]); // Emit event to trigger Slack notification and Trello update - \App\Events\OrderPacked::dispatch($order); + \App\Events\OrderPacked::dispatch( + $order, + (float) $validated['width'], + (float) $validated['length'], + (float) $validated['height'], + (float) $validated['weight'], + auth()->id() + ); return response()->json([ 'success' => true,