mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -08:00
Removed duplicate code
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
65eba30038
commit
5c3180ffa0
|
@ -48,6 +48,10 @@ class AssetMaintenancesController extends Controller
|
|||
$maintenances->where('asset_maintenances.supplier_id', '=', $request->input('supplier_id'));
|
||||
}
|
||||
|
||||
if ($request->filled('created_by')) {
|
||||
$maintenances->where('asset_maintenances.created_by', '=', $request->input('created_by'));
|
||||
}
|
||||
|
||||
if ($request->filled('asset_maintenance_type')) {
|
||||
$maintenances->where('asset_maintenance_type', '=', $request->input('asset_maintenance_type'));
|
||||
}
|
||||
|
@ -97,9 +101,6 @@ class AssetMaintenancesController extends Controller
|
|||
case 'status_label':
|
||||
$maintenances = $maintenances->OrderStatusName($order);
|
||||
break;
|
||||
case 'created_by':
|
||||
$maintenances = $maintenances->OrderByCreatedBy($order);
|
||||
break;
|
||||
default:
|
||||
$maintenances = $maintenances->orderBy($sort, $order);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue