Added byod to API controller

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-01-18 13:03:31 -08:00
parent 956bd384b0
commit ee4b8f4694

View file

@ -100,6 +100,7 @@ class AssetsController extends Controller
'checkout_counter', 'checkout_counter',
'checkin_counter', 'checkin_counter',
'requests_counter', 'requests_counter',
'byod',
]; ];
$filter = []; $filter = [];
@ -189,6 +190,10 @@ class AssetsController extends Controller
$assets->ByDepreciationId($request->input('depreciation_id')); $assets->ByDepreciationId($request->input('depreciation_id'));
} }
if ($request->filled('byod')) {
$assets->ByDepreciationId($request->input('byod'));
}
$request->filled('order_number') ? $assets = $assets->where('assets.order_number', '=', e($request->get('order_number'))) : ''; $request->filled('order_number') ? $assets = $assets->where('assets.order_number', '=', e($request->get('order_number'))) : '';
// Set the offset to the API call's offset, unless the offset is higher than the actual count of items in which // Set the offset to the API call's offset, unless the offset is higher than the actual count of items in which