diff --git a/app/Models/CheckoutAcceptance.php b/app/Models/CheckoutAcceptance.php index 0599286f859d..f65fb219a88a 100644 --- a/app/Models/CheckoutAcceptance.php +++ b/app/Models/CheckoutAcceptance.php @@ -32,7 +32,19 @@ public function routeNotificationForMail() return array_filter($recipients); } - + public function getCheckoutableItemTypeAttribute(): string + { + $type = $this->checkoutable_type; + + return match ($type) { + Asset::class => trans('general.asset'), + LicenseSeat::class => trans('general.license'), + Accessory::class => trans('general.accessory'), + Component::class => trans('general.component'), + Consumable::class => trans('general.consumable'), + default => class_basename($type), + }; + } /** * The resource that was is out * diff --git a/resources/views/account/accept/index.blade.php b/resources/views/account/accept/index.blade.php index 0d36ef18ca80..52045fc86d79 100755 --- a/resources/views/account/accept/index.blade.php +++ b/resources/views/account/accept/index.blade.php @@ -31,6 +31,7 @@ class="table table-striped snipe-table" {{ trans('general.name')}} + {{ trans('general.type')}} {{ trans('general.serial_number')}} {{ trans('table.actions')}} @@ -40,6 +41,7 @@ class="table table-striped snipe-table" @if ($acceptance->checkoutable) {{ ($acceptance->checkoutable) ? $acceptance->checkoutable->present()->name : '' }} + {{ $acceptance->checkoutable_item_type }} {{ ($acceptance->checkoutable) ? $acceptance->checkoutable->serial : '' }} {{ trans('general.accept_decline') }} @else