Merge pull request #13584 from Godmartinz/Bulk_location_edit_fix_gh-13572

added an option to bulk edit location & fixed location bug
This commit is contained in:
snipe 2023-10-25 20:57:18 +01:00 committed by GitHub
commit da08f0e26f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 3 deletions

View file

@ -195,9 +195,15 @@ class BulkAssetsController extends Controller
}
if ($request->filled('rtd_location_id')) {
$this->update_array['rtd_location_id'] = $request->input('rtd_location_id');
if (($request->filled('update_real_loc')) && (($request->input('update_real_loc')) == '0')) {
$this->update_array['rtd_location_id'] = $request->input('rtd_location_id');
}
if (($request->filled('update_real_loc')) && (($request->input('update_real_loc')) == '1')) {
$this->update_array['location_id'] = $request->input('rtd_location_id');
$this->update_array['rtd_location_id'] = $request->input('rtd_location_id');
}
if (($request->filled('update_real_loc')) && (($request->input('update_real_loc')) == '2')) {
$this->update_array['location_id'] = $request->input('rtd_location_id');
}
}

View file

@ -49,6 +49,7 @@ return [
'asset_location' => 'Update Asset Location',
'asset_location_update_default_current' => 'Update default location AND actual location',
'asset_location_update_default' => 'Update only default location',
'asset_location_update_actual' => 'Update only actual location',
'asset_not_deployable' => 'That asset status is not deployable. This asset cannot be checked out.',
'asset_deployable' => 'That status is deployable. This asset can be checked out.',
'processing_spinner' => 'Processing... (This might take a bit of time on large files)',

View file

@ -92,9 +92,13 @@
{{ Form::radio('update_real_loc', '1', old('update_real_loc'), ['checked'=> 'checked', 'aria-label'=>'update_real_loc']) }}
{{ trans('admin/hardware/form.asset_location_update_default_current') }}
</label>
<label class="form-control">
{{ Form::radio('update_real_loc', '0', old('update_real_loc'), ['aria-label'=>'update_default_loc']) }}
{{ trans('admin/hardware/form.asset_location_update_default') }}
</label>
<label class="form-control">
{{ Form::radio('update_real_loc', '0', old('update_real_loc'), ['aria-label'=>'update_default_loc']) }}
{{ trans('admin/hardware/form.asset_location_update_default') }}
{{ Form::radio('update_real_loc', '2', old('update_real_loc'), ['aria-label'=>'update_default_loc']) }}
{{ trans('admin/hardware/form.asset_location_update_actual') }}
</label>
</div>