mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 22:19:41 -08:00
Added filter by status type
This commit is contained in:
parent
11dc20de61
commit
85f3e7e3d4
|
@ -1588,7 +1588,7 @@ class AssetsController extends Controller
|
||||||
* @since [v2.0]
|
* @since [v2.0]
|
||||||
* @return String JSON
|
* @return String JSON
|
||||||
*/
|
*/
|
||||||
public function getDatatable($status = null)
|
public function getDatatable(Request $request, $status = null, $status_id = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
@ -1640,6 +1640,12 @@ class AssetsController extends Controller
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($request->has('status_id')) {
|
||||||
|
$assets->where('status_id','=', e($request->get('status_id')));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$allowed_columns = [
|
$allowed_columns = [
|
||||||
'id',
|
'id',
|
||||||
'name',
|
'name',
|
||||||
|
|
Loading…
Reference in a new issue