v0.10.11a - Made hide filter, filter washing machine search semi done, and texts fixs
This commit is contained in:
@@ -12,6 +12,14 @@
|
||||
@section("content")
|
||||
<div class="row align-items-center">
|
||||
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('washing-machines.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Vaskemaskine</a>
|
||||
<div class="mt-1 ml-1">
|
||||
<select name="risRosName" id="locationID">
|
||||
<option selected="selected" name="all" value="all">Alle</option>
|
||||
@foreach(\App\Location::query()->get() as $location)
|
||||
<option value="{{$location->name}}">{{$location->name}}</option>
|
||||
@endforeach
|
||||
</select> <label>Vælg bygning</label>
|
||||
</div>
|
||||
</div>
|
||||
<table class="tbl mt-2">
|
||||
<tr>
|
||||
@@ -35,4 +43,21 @@
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
<script>
|
||||
$('#locationID').change(function () {
|
||||
$value = $('#locationID').find(":selected").val();
|
||||
// alert($value);
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '{{route('locations.search')}}',
|
||||
data: {'option':$value},
|
||||
success:function (data) {
|
||||
$('tbody').html(data);
|
||||
},
|
||||
error:function (data) {
|
||||
console.log(data);
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user