mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
WIP license checkin
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
eb7e24eeb0
commit
a617c0545e
|
@ -28,16 +28,11 @@ class LicenseCheckinController extends Controller
|
||||||
* @return \Illuminate\Contracts\View\View
|
* @return \Illuminate\Contracts\View\View
|
||||||
* @throws \Illuminate\Auth\Access\AuthorizationException
|
* @throws \Illuminate\Auth\Access\AuthorizationException
|
||||||
*/
|
*/
|
||||||
public function create($seatId = null, $backTo = null)
|
public function create(LicenseSeat $licenseSeat, $backTo = null)
|
||||||
{
|
{
|
||||||
// Check if the asset exists
|
// Check if the asset exists
|
||||||
if (is_null($licenseSeat = LicenseSeat::find($seatId)) || is_null($license = License::find($licenseSeat->license_id))) {
|
$license = License::find($licenseSeat->license_id);
|
||||||
// Redirect to the asset management page with error
|
|
||||||
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.not_found'));
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->authorize('checkout', $license);
|
$this->authorize('checkout', $license);
|
||||||
|
|
||||||
return view('licenses/checkin', compact('licenseSeat'))->with('backto', $backTo);
|
return view('licenses/checkin', compact('licenseSeat'))->with('backto', $backTo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue