mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 06:04:08 -08:00
Add additional information to acceptance notifications for assets, accessories, and consumables
This commit is contained in:
parent
9efe13bb5e
commit
96c6d8896f
|
@ -248,10 +248,14 @@ class AcceptanceController extends Controller
|
||||||
// This is the most horriblest
|
// This is the most horriblest
|
||||||
switch($acceptance->checkoutable_type){
|
switch($acceptance->checkoutable_type){
|
||||||
case 'App\Models\Asset':
|
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;
|
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'App\Models\Accessory':
|
case 'App\Models\Accessory':
|
||||||
|
$accessory = Accessory::find($item->id);
|
||||||
|
$display_model = $accessory->name;
|
||||||
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
|
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -264,6 +268,8 @@ class AcceptanceController extends Controller
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'App\Models\Consumable':
|
case 'App\Models\Consumable':
|
||||||
|
$consumable = Consumable::find($item->id);
|
||||||
|
$display_model = $consumable->name;
|
||||||
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
|
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue