Add radio buttons to alter asset checkin location behavior

This commit is contained in:
Ivan Nieto Vivanco 2023-07-06 10:38:48 -06:00
parent 011726154c
commit 743e852998
2 changed files with 15 additions and 1 deletions

View file

@ -102,7 +102,6 @@ class AssetCheckinController extends Controller
if ($request->filled('location_id')) {
\Log::debug('NEW Location ID: '.$request->get('location_id'));
$asset->location_id = $request->get('location_id');
$asset->rtd_location_id = $request->get('location_id');
}
$checkin_at = date('Y-m-d H:i:s');

View file

@ -30,6 +30,21 @@
</div>
@endif
<!-- Update actual location -->
<div class="form-group">
<div class="col-md-9 col-md-offset-3">
<label class="form-control">
{{ Form::radio('update_default_location', '1', old('update_default_location'), ['checked'=> 'checked', 'aria-label'=>'update_default_location']) }}
{{ trans('admin/hardware/form.asset_location') }}
</label>
<label class="form-control">
{{ Form::radio('update_default_location', '0', old('update_default_location'), ['aria-label'=>'update_default_location']) }}
{{ trans('admin/hardware/form.asset_location_update_default_current') }}
</label>
</div>
</div> <!--/form-group-->
</div>