Requestable status not saving with manual [sc-26848]

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-09-20 14:02:28 +01:00
parent f53b852dff
commit bc540b6564
2 changed files with 11 additions and 3 deletions

View file

@ -329,9 +329,7 @@ class AssetsController extends Controller
}
$asset->supplier_id = $request->input('supplier_id', null);
$asset->expected_checkin = $request->input('expected_checkin', null);
// If the box isn't checked, it's not in the request at all.
$asset->requestable = $request->filled('requestable', 0);
$asset->requestable = $request->input('requestable', 0);
$asset->rtd_location_id = $request->input('rtd_location_id', null);
$asset->byod = $request->input('byod', 0);

View file

@ -657,6 +657,16 @@
</div>
</div>
<!-- requestable -->
<div class="row">
<div class="col-md-3">
<strong>{{ trans('admin/hardware/general.requestable') }}</strong>
</div>
<div class="col-md-9">
{!! ($asset->requestable=='1') ? '<i class="fas fa-check text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fas fa-times text-danger" aria-hidden="true"></i> '.trans('general.no') !!}
</div>
</div>
@if (($asset->model) && ($asset->model->fieldset))
@foreach($asset->model->fieldset->fields as $field)
<div class="row">