Skip to content

Commit deeb2fa

Browse files
committed
Merge remote-tracking branch 'origin/develop'
2 parents ef8d5ff + 5e10c21 commit deeb2fa

34 files changed

+424
-126
lines changed

app/Exceptions/Handler.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ public function render($request, Throwable $e)
141141
$route = 'kits.index';
142142
} elseif ($route == 'assetmaintenances.index') {
143143
$route = 'maintenances.index';
144+
} elseif ($route === 'licenseseats.index') {
145+
$route = 'licenses.index';
144146
}
145147

146148
return redirect()
@@ -203,4 +205,4 @@ public function register()
203205
//
204206
});
205207
}
206-
}
208+
}

database/factories/UserFactory.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,11 @@ public function deleteAssetModels()
150150
return $this->appendPermission(['models.delete' => '1']);
151151
}
152152

153+
public function viewAssetModels()
154+
{
155+
return $this->appendPermission(['models.view' => '1']);
156+
}
157+
153158
public function viewAccessories()
154159
{
155160
return $this->appendPermission(['accessories.view' => '1']);
@@ -360,6 +365,11 @@ public function deletePredefinedKits()
360365
return $this->appendPermission(['kits.delete' => '1']);
361366
}
362367

368+
public function viewPredefinedKits()
369+
{
370+
return $this->appendPermission(['kits.view' => '1']);
371+
}
372+
363373
public function deleteStatusLabels()
364374
{
365375
return $this->appendPermission(['statuslabels.delete' => '1']);
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
@props([
2+
// <options> can either be provided as key => value pairs
3+
// or passed in via the default $slot
4+
'options',
5+
'selected' => null,
6+
'includeEmpty' => false,
7+
'forLivewire' => false,
8+
])
9+
10+
<select
11+
{{ $attributes->class(['select2', 'livewire-select2' => $forLivewire]) }}
12+
@if($forLivewire) data-livewire-component="{{ $this->getId() }}" @endif
13+
>
14+
@if($includeEmpty)
15+
<option value=""></option>
16+
@endif
17+
{{-- map the simple key => value pairs when nothing is passed in via the slot --}}
18+
@if($slot->isEmpty())
19+
@foreach($options as $key => $value)
20+
<option value="{{ $key }}" @selected($selected == $key)>{{ $value }}</option>
21+
@endforeach
22+
@else
23+
{{ $slot }}
24+
@endif
25+
</select>

resources/views/categories/edit.blade.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@
1515
<div class="form-group {{ $errors->has('category_type') ? ' has-error' : '' }}">
1616
<label for="category_type" class="col-md-3 control-label">{{ trans('general.type') }}</label>
1717
<div class="col-md-7 required">
18-
{{ Form::select('category_type', $category_types , old('category_type', $item->category_type), array('class'=>'select2', 'style'=>'min-width:350px', 'aria-label'=>'category_type', ($item->category_type!='') || ($item->itemCount() > 0) ? 'disabled' : '')) }}
18+
<x-input.select
19+
name="category_type"
20+
:options="$category_types"
21+
:selected="old('category_type', $item->category_type)"
22+
:disabled="$item->category_type!='' || $item->itemCount() > 0"
23+
style="min-width:350px"
24+
aria-label="category_type"
25+
/>
1926
{!! $errors->first('category_type', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
2027
</div>
2128
<div class="col-md-7 col-md-offset-3">

resources/views/custom_fields/fields/edit.blade.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,14 @@
9494
}
9595
@endphp
9696
<div class="col-md-8 required">
97-
{{ Form::select("format",Helper::predefined_formats(), ($field_format == '') ? $field->format : $field_format, array('class'=>'format select2 form-control', 'aria-label'=>'format', 'style' => 'width:100%;')) }}
97+
<x-input.select
98+
name="format"
99+
:options="Helper::predefined_formats()"
100+
:selected="($field_format == '') ? $field->format : $field_format"
101+
class="format form-control"
102+
style="width:100%"
103+
aria-label="format"
104+
/>
98105
{!! $errors->first('format', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
99106
</div>
100107
</div>

resources/views/custom_fields/fieldsets/view.blade.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,12 @@
9595
<label for="field_id" class="sr-only">
9696
{{ trans('admin/custom-field/general.add_field_to_fieldset')}}
9797
</label>
98-
{{ Form::select("field_id",$custom_fields_list,"",['aria-label'=>'field_id', 'class'=>'select2', 'style' => 'min-width:400px;']) }}
99-
98+
<x-input.select
99+
name="field_id"
100+
:options="$custom_fields_list"
101+
style="min-width:400px"
102+
aria-label="field_id"
103+
/>
100104
</div>
101105

102106
<div class="form-group" style="display: none;">

resources/views/depreciations/view.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ class="table table-striped snipe-table"
171171
</div>
172172

173173
</div>
174-
{{ Form::close() }}
174+
</form>
175175

176176
</div> <!--/.row-->
177177
</div> <!-- /.tab-pane -->

resources/views/hardware/bulk.blade.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,13 @@
125125
{{ trans('admin/hardware/form.status') }}
126126
</label>
127127
<div class="col-md-7">
128-
{{ Form::select('status_id', $statuslabel_list , old('status_id'), array('class'=>'select2', 'style'=>'width:100%', 'aria-label'=>'status_id')) }}
128+
<x-input.select
129+
name="status_id"
130+
:options="$statuslabel_list"
131+
:selected="old('status_id')"
132+
style="width: 100%"
133+
aria-label="status_id"
134+
/>
129135
<p class="help-block">{{ trans('general.status_compatibility') }}</p>
130136
{!! $errors->first('status_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
131137
</div>

resources/views/hardware/checkin.blade.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,13 @@
8484
{{ trans('admin/hardware/form.status') }}
8585
</label>
8686
<div class="col-md-8 required">
87-
{{ Form::select('status_id', $statusLabel_list, '', array('class'=>'select2', 'style'=>'width:100%','id' =>'modal-statuslabel_types', 'aria-label'=>'status_id')) }}
87+
<x-input.select
88+
name="status_id"
89+
id="modal-statuslabel_types"
90+
:options="$statusLabel_list"
91+
style="width: 100%"
92+
aria-label="status_id"
93+
/>
8894
{!! $errors->first('status_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
8995
</div>
9096
</div>
@@ -154,4 +160,4 @@
154160
</div>
155161
</div>
156162

157-
@stop
163+
@stop

resources/views/hardware/checkout.blade.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,13 @@
8282
{{ trans('admin/hardware/form.status') }}
8383
</label>
8484
<div class="col-md-7 required">
85-
{{ Form::select('status_id', $statusLabel_list, $asset->status_id, array('class'=>'select2', 'style'=>'width:100%','', 'aria-label'=>'status_id')) }}
85+
<x-input.select
86+
name="status_id"
87+
:options="$statusLabel_list"
88+
:selected="$asset->status_id"
89+
style="width: 100%;"
90+
aria-label="status_id"
91+
/>
8692
{!! $errors->first('status_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
8793
</div>
8894
</div>

0 commit comments

Comments
 (0)