Formatting

This commit is contained in:
Marcus Moore 2024-04-10 17:37:11 -07:00
parent fa5016713f
commit 5567a1e9ac
No known key found for this signature in database

View file

@ -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')));
}