From 648c25a0a7e0ce7bd3b917dee99d9ca8d863d2b6 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 27 Aug 2025 14:06:10 -0700 Subject: [PATCH 1/3] adds item type to Accept asset index --- app/Models/CheckoutAcceptance.php | 12 ++++++++++++ resources/views/account/accept/index.blade.php | 2 ++ 2 files changed, 14 insertions(+) diff --git a/app/Models/CheckoutAcceptance.php b/app/Models/CheckoutAcceptance.php index 0599286f85..1bd237ef60 100644 --- a/app/Models/CheckoutAcceptance.php +++ b/app/Models/CheckoutAcceptance.php @@ -32,7 +32,19 @@ class CheckoutAcceptance extends Model return array_filter($recipients); } + public function getCheckoutableCategoryTypeAttribute(): 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 0d36ef18ca..6d49ac74c2 100755 --- a/resources/views/account/accept/index.blade.php +++ b/resources/views/account/accept/index.blade.php @@ -31,6 +31,7 @@ {{ trans('general.name')}} + {{ trans('general.category')}} {{ trans('general.serial_number')}} {{ trans('table.actions')}} @@ -40,6 +41,7 @@ @if ($acceptance->checkoutable) {{ ($acceptance->checkoutable) ? $acceptance->checkoutable->present()->name : '' }} + {{ $acceptance->checkoutable_category_type }} {{ ($acceptance->checkoutable) ? $acceptance->checkoutable->serial : '' }} {{ trans('general.accept_decline') }} @else From c1a6546eba64ce0738126a98d7a1ee8178438f9b Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 27 Aug 2025 14:09:13 -0700 Subject: [PATCH 2/3] change column header --- resources/views/account/accept/index.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/account/accept/index.blade.php b/resources/views/account/accept/index.blade.php index 6d49ac74c2..14f8f40362 100755 --- a/resources/views/account/accept/index.blade.php +++ b/resources/views/account/accept/index.blade.php @@ -31,7 +31,7 @@ {{ trans('general.name')}} - {{ trans('general.category')}} + {{ trans('general.type')}} {{ trans('general.serial_number')}} {{ trans('table.actions')}} From 95be847d87362883812f43c16cb1f089d337b892 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 27 Aug 2025 14:10:51 -0700 Subject: [PATCH 3/3] renamed attribute --- app/Models/CheckoutAcceptance.php | 2 +- resources/views/account/accept/index.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/CheckoutAcceptance.php b/app/Models/CheckoutAcceptance.php index 1bd237ef60..f65fb219a8 100644 --- a/app/Models/CheckoutAcceptance.php +++ b/app/Models/CheckoutAcceptance.php @@ -32,7 +32,7 @@ class CheckoutAcceptance extends Model return array_filter($recipients); } - public function getCheckoutableCategoryTypeAttribute(): string + public function getCheckoutableItemTypeAttribute(): string { $type = $this->checkoutable_type; diff --git a/resources/views/account/accept/index.blade.php b/resources/views/account/accept/index.blade.php index 14f8f40362..52045fc86d 100755 --- a/resources/views/account/accept/index.blade.php +++ b/resources/views/account/accept/index.blade.php @@ -41,7 +41,7 @@ @if ($acceptance->checkoutable) {{ ($acceptance->checkoutable) ? $acceptance->checkoutable->present()->name : '' }} - {{ $acceptance->checkoutable_category_type }} + {{ $acceptance->checkoutable_item_type }} {{ ($acceptance->checkoutable) ? $acceptance->checkoutable->serial : '' }} {{ trans('general.accept_decline') }} @else