Redirect on checkin if the asset is already checked in

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-04-04 15:00:55 +01:00
parent f22803c59f
commit e11287ec25

View file

@ -39,6 +39,12 @@ class AssetCheckinController extends Controller
$this->authorize('checkin', $asset);
// This asset is already checked in, redirect
if (is_null($asset->assignedTo)) {
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.checkin.already_checked_in'));
}
return view('hardware/checkin', compact('asset'))->with('statusLabel_list', Helper::statusLabelList())->with('backto', $backto);
}