mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Redirect on checkin if the asset is already checked in
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
f22803c59f
commit
e11287ec25
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue