A free open source IT asset/license management system
Redirect on checkin if the asset is already checked in
snipee11287ec25d1
diff --git a/app/Http/Controllers/Assets/AssetCheckinController.php b/app/Http/Controllers/Assets/AssetCheckinController.phpindex 82cb98abe9..30ffd8bba2 100644--- a/app/Http/Controllers/Assets/AssetCheckinController.php+++ b/app/Http/Controllers/Assets/AssetCheckinController.php@@ -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);}