More specific gate for checkin

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-08-23 08:40:41 +01:00
parent 8546bbdd65
commit 52894615ce

View file

@ -190,7 +190,7 @@
@if (($asset->assetstatus) && ($asset->assetstatus->deployable=='1'))
@if (($asset->assigned_to != '') && ($asset->deleted_at==''))
@can('checkin', \App\Models\Asset::class)
@can('checkin', $asset)
<div class="col-md-12 hidden-print" style="padding-top: 5px;">
<span class="tooltip-wrapper"{!! (!$asset->model ? ' data-tooltip="true" title="'.trans('admin/hardware/general.model_invalid_fix').'"' : '') !!}>
<a role="button" href="{{ route('hardware.checkin.create', $asset->id) }}" class="btn btn-sm btn-primary bg-purple btn-social btn-block hidden-print{{ (!$asset->model ? ' disabled' : '') }}">