mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
Fix ID array
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
caad5be957
commit
52ea172e5d
|
@ -32,7 +32,8 @@ class BulkAssetsController extends Controller
|
|||
return redirect()->back()->with('error', 'No assets selected');
|
||||
}
|
||||
|
||||
$asset_ids = array_keys($request->input('ids'));
|
||||
|
||||
$asset_ids = array_values(array_unique($request->input('ids')));
|
||||
|
||||
if ($request->filled('bulk_actions')) {
|
||||
switch($request->input('bulk_actions')) {
|
||||
|
@ -50,7 +51,7 @@ class BulkAssetsController extends Controller
|
|||
return view('hardware/bulk-delete')->with('assets', $assets);
|
||||
case 'edit':
|
||||
return view('hardware/bulk')
|
||||
->with('assets', request('ids'))
|
||||
->with('assets', $asset_ids)
|
||||
->with('statuslabel_list', Helper::statusLabelList());
|
||||
}
|
||||
}
|
||||
|
@ -90,6 +91,8 @@ class BulkAssetsController extends Controller
|
|||
|| ($request->filled('model_id'))
|
||||
) {
|
||||
foreach ($assets as $assetId) {
|
||||
\Log::error($assetId);
|
||||
|
||||
$this->update_array = [];
|
||||
|
||||
$this->conditionallyAddItem('purchase_date')
|
||||
|
|
|
@ -149,7 +149,7 @@
|
|||
</div>
|
||||
|
||||
@foreach ($assets as $key => $value)
|
||||
<input type="hidden" name="ids[{{ $key }}]" value="1">
|
||||
<input type="hidden" name="ids[{{ $value }}]" value="1">
|
||||
@endforeach
|
||||
</div> <!--/.box-body-->
|
||||
|
||||
|
|
Loading…
Reference in a new issue