Merge pull request #17730 from Godmartinz/update-asset-accepance-with-category
Adds #9000 Item type to Account Asset Acceptance index
This commit is contained in:
@@ -32,7 +32,19 @@ class CheckoutAcceptance extends Model
|
||||
|
||||
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
|
||||
*
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('general.name')}}</th>
|
||||
<th>{{ trans('general.type')}}</th>
|
||||
<th>{{ trans('general.serial_number')}}</th>
|
||||
<th>{{ trans('table.actions')}}</th>
|
||||
</tr>
|
||||
@@ -40,6 +41,7 @@
|
||||
<tr>
|
||||
@if ($acceptance->checkoutable)
|
||||
<td>{{ ($acceptance->checkoutable) ? $acceptance->checkoutable->present()->name : '' }}</td>
|
||||
<td>{{ $acceptance->checkoutable_item_type }}</td>
|
||||
<td>{{ ($acceptance->checkoutable) ? $acceptance->checkoutable->serial : '' }}</td>
|
||||
<td><a href="{{ route('account.accept.item', $acceptance) }}" class="btn btn-default btn-sm">{{ trans('general.accept_decline') }}</a></td>
|
||||
@else
|
||||
|
||||
Reference in New Issue
Block a user