From 96c6d8896fcb03289171cae9f575e2d7e7463b5f Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Wed, 3 May 2023 17:04:01 -0700 Subject: [PATCH] Add additional information to acceptance notifications for assets, accessories, and consumables --- app/Http/Controllers/Account/AcceptanceController.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Http/Controllers/Account/AcceptanceController.php b/app/Http/Controllers/Account/AcceptanceController.php index 6d5f911161..9187593eeb 100644 --- a/app/Http/Controllers/Account/AcceptanceController.php +++ b/app/Http/Controllers/Account/AcceptanceController.php @@ -248,10 +248,14 @@ class AcceptanceController extends Controller // This is the most horriblest switch($acceptance->checkoutable_type){ case 'App\Models\Asset': + $asset_model = AssetModel::find($item->model_id); + $display_model = $asset_model->name; $assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName; break; case 'App\Models\Accessory': + $accessory = Accessory::find($item->id); + $display_model = $accessory->name; $assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName; break; @@ -264,6 +268,8 @@ class AcceptanceController extends Controller break; case 'App\Models\Consumable': + $consumable = Consumable::find($item->id); + $display_model = $consumable->name; $assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName; break; }