mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -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'));
|
$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')) {
|
if ($request->filled('asset_maintenance_type')) {
|
||||||
$maintenances->where('asset_maintenance_type', '=', $request->input('asset_maintenance_type'));
|
$maintenances->where('asset_maintenance_type', '=', $request->input('asset_maintenance_type'));
|
||||||
}
|
}
|
||||||
|
@ -97,9 +101,6 @@ class AssetMaintenancesController extends Controller
|
||||||
case 'status_label':
|
case 'status_label':
|
||||||
$maintenances = $maintenances->OrderStatusName($order);
|
$maintenances = $maintenances->OrderStatusName($order);
|
||||||
break;
|
break;
|
||||||
case 'created_by':
|
|
||||||
$maintenances = $maintenances->OrderByCreatedBy($order);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
$maintenances = $maintenances->orderBy($sort, $order);
|
$maintenances = $maintenances->orderBy($sort, $order);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue