1
0
Fork 0
mirror of https://github.com/snipe/snipe-it.git synced 2025-03-05 20:52:15 -08:00

Only prompt for checkin if there is an assigned user

This commit is contained in:
snipe 2017-05-10 03:37:30 -07:00
parent f4095c6dd0
commit c8796cf045

View file

@ -1802,7 +1802,7 @@ class AssetsController extends Controller
}
} else {
if (Gate::allows('assets.checkin')) {
if (($asset->assigned_to!='') && (Gate::allows('assets.checkin'))) {
$inout = '<a href="' . route('checkin/hardware',
$asset->id) . '" class="btn btn-primary btn-sm" title="Checkin this asset" data-toggle="tooltip">' . trans('general.checkin') . '</a>';
}