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.
This commit is contained in:
@@ -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,
|
||||
) {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user