Switched back to old version

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-11-28 15:54:42 +00:00
parent 2c6b957fbe
commit 3b9f069627

View file

@ -42,6 +42,9 @@ class BulkAssetsController extends Controller
{
$this->authorize('view', Asset::class);
/**
* No asset IDs were passed
*/
if (! $request->filled('ids')) {
return redirect()->back()->with('error', trans('admin/hardware/message.update.no_assets_selected'));
}
@ -50,6 +53,7 @@ class BulkAssetsController extends Controller
$bulk_back_url = request()->headers->get('referer');
session(['bulk_back_url' => $bulk_back_url]);
$asset_ids = $request->input('ids');
$assets = Asset::with('assignedTo', 'location', 'model')->find($asset_ids);
@ -92,9 +96,9 @@ class BulkAssetsController extends Controller
return view('hardware/bulk')
->with('assets', $asset_ids)
->with('statuslabel_list', Helper::statusLabelList())
->with('models', $models->pluck(['model']))
->with('modelNames', $modelNames)
->with('statuslabel_list', Helper::statusLabelList());
->with('modelNames', $modelNames);
}
}