mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 06:04:08 -08:00
Search on status label type
This commit is contained in:
parent
4cf01e4f48
commit
72ec362f72
|
@ -49,7 +49,7 @@ class AssetsController extends Controller
|
||||||
* @since [v4.0]
|
* @since [v4.0]
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
*/
|
*/
|
||||||
public function index(Request $request, $status = null)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->authorize('index', Asset::class);
|
$this->authorize('index', Asset::class);
|
||||||
|
@ -116,7 +116,7 @@ class AssetsController extends Controller
|
||||||
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'assets.created_at';
|
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'assets.created_at';
|
||||||
$assets->orderBy($sort, $order);
|
$assets->orderBy($sort, $order);
|
||||||
|
|
||||||
switch ($status) {
|
switch ($request->input('status')) {
|
||||||
case 'Deleted':
|
case 'Deleted':
|
||||||
$assets->withTrashed()->Deleted();
|
$assets->withTrashed()->Deleted();
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue