mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-26 05:01:06 -08:00
Formatting
This commit is contained in:
parent
fa5016713f
commit
5567a1e9ac
|
@ -820,7 +820,6 @@ class AssetsController extends Controller
|
|||
'asset_tag' => $asset->asset_tag,
|
||||
];
|
||||
|
||||
|
||||
// This item is checked out to a location
|
||||
if (request('checkout_to_type') == 'location') {
|
||||
$target = Location::find(request('assigned_location'));
|
||||
|
@ -851,7 +850,6 @@ class AssetsController extends Controller
|
|||
$asset->status_id = $request->get('status_id');
|
||||
}
|
||||
|
||||
|
||||
if (! isset($target)) {
|
||||
// @todo: test this code path
|
||||
return response()->json(Helper::formatStandardApiResponse('error', $error_payload, 'Checkout target for asset '.e($asset->asset_tag).' is invalid - '.$error_payload['target_type'].' does not exist.'));
|
||||
|
@ -875,8 +873,6 @@ class AssetsController extends Controller
|
|||
// $asset->location_id = $target->rtd_location_id;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
if ($asset->checkOut($target, Auth::user(), $checkout_at, $expected_checkin, $note, $asset_name, $asset->location_id)) {
|
||||
return response()->json(Helper::formatStandardApiResponse('success', ['asset'=> e($asset->asset_tag)], trans('admin/hardware/message.checkout.success')));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue