Remove dead code
This commit is contained in:
parent
d5f659024c
commit
636c776620
1 changed files with 1 additions and 9 deletions
|
@ -320,7 +320,7 @@ class AccessoriesController extends Controller
|
||||||
$accessory = Accessory::find($accessory_checkout->accessory_id);
|
$accessory = Accessory::find($accessory_checkout->accessory_id);
|
||||||
$this->authorize('checkin', $accessory);
|
$this->authorize('checkin', $accessory);
|
||||||
|
|
||||||
$logaction = $accessory->logCheckin(User::find($accessory_checkout->assigned_to), $request->input('note'));
|
$accessory->logCheckin(User::find($accessory_checkout->assigned_to), $request->input('note'));
|
||||||
|
|
||||||
// Was the accessory updated?
|
// Was the accessory updated?
|
||||||
if ($accessory_checkout->delete()) {
|
if ($accessory_checkout->delete()) {
|
||||||
|
@ -328,14 +328,6 @@ class AccessoriesController extends Controller
|
||||||
$user = User::find($accessory_checkout->assigned_to);
|
$user = User::find($accessory_checkout->assigned_to);
|
||||||
}
|
}
|
||||||
|
|
||||||
$data['log_id'] = $logaction->id;
|
|
||||||
$data['first_name'] = $user->first_name;
|
|
||||||
$data['last_name'] = $user->last_name;
|
|
||||||
$data['item_name'] = $accessory->name;
|
|
||||||
$data['checkin_date'] = $logaction->created_at;
|
|
||||||
$data['item_tag'] = '';
|
|
||||||
$data['note'] = $logaction->note;
|
|
||||||
|
|
||||||
return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/accessories/message.checkin.success')));
|
return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/accessories/message.checkin.success')));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue