mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 22:37:28 -08:00
Merge pull request #14552 from snipe/bug/sc-25229/redirect_if_already_checked_in
Redirect on checkin if the asset is already checked in
This commit is contained in:
commit
db1c44f921
|
@ -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