mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Merge pull request #15303 from snipe/features/#15301_optional_status_to_quickscan_checkin
Fixed #15301 - Added optional status to quickscan checkin
This commit is contained in:
commit
c3d4c821f3
|
@ -928,7 +928,7 @@ class AssetsController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request->has('status_id')) {
|
if ($request->filled('status_id')) {
|
||||||
$asset->status_id = $request->input('status_id');
|
$asset->status_id = $request->input('status_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -978,7 +978,7 @@ class AssetsController extends Controller
|
||||||
public function checkinByTag(Request $request, $tag = null) : JsonResponse
|
public function checkinByTag(Request $request, $tag = null) : JsonResponse
|
||||||
{
|
{
|
||||||
$this->authorize('checkin', Asset::class);
|
$this->authorize('checkin', Asset::class);
|
||||||
if(null == $tag && null !== ($request->input('asset_tag'))) {
|
if (null == $tag && null !== ($request->input('asset_tag'))) {
|
||||||
$tag = $request->input('asset_tag');
|
$tag = $request->input('asset_tag');
|
||||||
}
|
}
|
||||||
$asset = Asset::where('asset_tag', $tag)->first();
|
$asset = Asset::where('asset_tag', $tag)->first();
|
||||||
|
|
|
@ -844,7 +844,7 @@ class AssetsController extends Controller
|
||||||
{
|
{
|
||||||
$this->authorize('checkin', Asset::class);
|
$this->authorize('checkin', Asset::class);
|
||||||
|
|
||||||
return view('hardware/quickscan-checkin');
|
return view('hardware/quickscan-checkin')->with('statusLabel_list', Helper::statusLabelList());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function audit($id)
|
public function audit($id)
|
||||||
|
|
|
@ -279,6 +279,7 @@ return [
|
||||||
'site_name' => 'Site Name',
|
'site_name' => 'Site Name',
|
||||||
'state' => 'State',
|
'state' => 'State',
|
||||||
'status_labels' => 'Status Labels',
|
'status_labels' => 'Status Labels',
|
||||||
|
'status_label' => 'Status Label',
|
||||||
'status' => 'Status',
|
'status' => 'Status',
|
||||||
'accept_eula' => 'Acceptance Agreement',
|
'accept_eula' => 'Acceptance Agreement',
|
||||||
'supplier' => 'Supplier',
|
'supplier' => 'Supplier',
|
||||||
|
|
|
@ -33,14 +33,25 @@
|
||||||
<div class="form-group {{ $errors->has('asset_tag') ? 'error' : '' }}">
|
<div class="form-group {{ $errors->has('asset_tag') ? 'error' : '' }}">
|
||||||
{{ Form::label('asset_tag', trans('general.asset_tag'), array('class' => 'col-md-3 control-label', 'id' => 'checkin_tag')) }}
|
{{ Form::label('asset_tag', trans('general.asset_tag'), array('class' => 'col-md-3 control-label', 'id' => 'checkin_tag')) }}
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<div class="input-group date col-md-5" data-date-format="yyyy-mm-dd">
|
<div class="input-group date col-md-11" data-date-format="yyyy-mm-dd">
|
||||||
<input type="text" class="form-control" name="asset_tag" id="asset_tag" value="{{ old('asset_tag') }}">
|
<input type="text" class="form-control" name="asset_tag" id="asset_tag" value="{{ old('asset_tag') }}" required>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{!! $errors->first('asset_tag', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
{!! $errors->first('asset_tag', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Status -->
|
||||||
|
<div class="form-group {{ $errors->has('status_id') ? 'error' : '' }}">
|
||||||
|
<label for="status_id" class="col-md-3 control-label">
|
||||||
|
{{ trans('admin/hardware/form.status') }}
|
||||||
|
</label>
|
||||||
|
<div class="col-md-7">
|
||||||
|
{{ Form::select('status_id', $statusLabel_list, '', array('class'=>'select2', 'style'=>'width:100%','', 'aria-label'=>'status_id')) }}
|
||||||
|
{!! $errors->first('status_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Locations -->
|
<!-- Locations -->
|
||||||
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id'])
|
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id'])
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
<div class="form-group {{ $errors->has('asset_tag') ? 'error' : '' }}">
|
<div class="form-group {{ $errors->has('asset_tag') ? 'error' : '' }}">
|
||||||
{{ Form::label('asset_tag', trans('general.asset_tag'), array('class' => 'col-md-3 control-label', 'id' => 'audit_tag')) }}
|
{{ Form::label('asset_tag', trans('general.asset_tag'), array('class' => 'col-md-3 control-label', 'id' => 'audit_tag')) }}
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<div class="input-group date col-md-5" data-date-format="yyyy-mm-dd">
|
<div class="input-group date col-md-11 required" data-date-format="yyyy-mm-dd">
|
||||||
<input type="text" class="form-control" name="asset_tag" id="asset_tag" value="{{ old('asset_tag') }}">
|
<input type="text" class="form-control" name="asset_tag" id="asset_tag" value="{{ old('asset_tag') }}">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -49,10 +49,13 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-sm-offset-3 col-md-9">
|
<div class="col-sm-offset-3 col-md-9">
|
||||||
<label class="form-control">
|
<label class="form-control">
|
||||||
<input type="checkbox" value="1" name="update_location" {{ old('update_location') == '1' ? ' checked="checked"' : '' }}> {{ trans('admin/hardware/form.asset_location') }}
|
<input type="checkbox" value="1" name="update_location" {{ old('update_location') == '1' ? ' checked="checked"' : '' }}>
|
||||||
|
<span>{{ trans('admin/hardware/form.asset_location') }}
|
||||||
|
<a href="#" class="text-dark-gray" tabindex="0" role="button" data-toggle="popover" data-trigger="focus" title="<i class='far fa-life-ring'></i> {{ trans('general.more_info') }}" data-html="true" data-content="{{ trans('general.quickscan_bulk_help') }}"><i class="far fa-life-ring"></i></a></span>
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<a href="#" class="text-dark-gray" tabindex="0" role="button" data-toggle="popover" data-trigger="focus" title="<i class='far fa-life-ring'></i>"{{ trans('general.more_info') }} data-html="true" data-content="{{ trans('general.quickscan_bulk_help') }}"><i class="far fa-life-ring"></i></a>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue