Made Live search is done

This commit is contained in:
2020-07-27 16:03:49 +02:00
parent f1fb73beec
commit b9633d36a9
12 changed files with 296 additions and 5 deletions
@@ -16,7 +16,7 @@
<form method="post" action="{{ route("users.store") }}">
@csrf
<input type="text" class="form-controller" id="search" name="search" placeholder="Søg på navn,email,telefon"></input>
<input type="text" class="form-controller" id="search" name="search" placeholder="Søg på Navn, Email, Telefon"></input>
</form>
@@ -50,7 +50,6 @@
<script>
$('#search').on('keyup', function () {
//alert('Test');
$value = $(this).val();
$.ajax({
type: 'get',
@@ -58,7 +57,6 @@
data: {'search':$value},
success:function (data) {
$('tbody').html(data);
console.log(data)
},
error:function (data) {
console.log(data);
@@ -10,8 +10,15 @@
@endsection
@section("content")
<script src="http://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<div class="row align-items-center">
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('events.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Event</a>
<form method="post" action="{{ route("events.store") }}">
@csrf
<input type="text" class="form-controller" id="search" name="search" placeholder="Søg på Evt Navn, Evt Dato"></input>
</form>
</div>
<table class="tbl mt-2">
<tr>
@@ -40,4 +47,24 @@
{{ $events->links() }}
<script>
$('#search').on('keyup', function () {
$value = $(this).val();
$.ajax({
type: 'get',
url: '{{route('events.search')}}',
data: {'search':$value},
success:function (data) {
$('tbody').html(data);
console.log(data);
},
error:function (data) {
console.log(data);
}
});
})
</script>
@endsection
@@ -10,8 +10,15 @@
@endsection
@section("content")
<script src="http://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<div class="row align-items-center">
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('menu-plans.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Menuplan</a>
<form method="post" action="{{ route("menu-plans.store") }}">
@csrf
<input type="number" class="form-controller" id="search" name="search" pattern="[0-9]{2}" placeholder="Søg efter ugenummer"></input>
</form>
</div>
<table class="tbl mt-2">
<tr>
@@ -43,4 +50,24 @@
</table>
{{ $menuPlans->links() }}
<script>
$('#search').on('keyup', function () {
$value = $(this).val();
$.ajax({
type: 'get',
url: '{{route('menu-plans.search')}}',
data: {'search':$value},
success:function (data) {
$('tbody').html(data);
},
error:function (data) {
console.log(data);
}
});
})
</script>
@endsection
@@ -10,8 +10,16 @@
@endsection
@section("content")
<script src="http://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<div class="row align-items-center">
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('roles.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Rolle</a>
<form method="post" action="{{ route("roles.store") }}">
@csrf
<input type="text" class="form-controller" id="search" name="search" placeholder="Søg efter navn"></input>
</form>
</div>
<table class="tbl mt-2">
<tr>
@@ -35,4 +43,26 @@
</tr>
@endforeach
</table>
<script>
$('#search').on('keyup', function () {
$value = $(this).val();
$.ajax({
type: 'get',
url: '{{route('roles.search')}}',
data: {'search':$value},
success:function (data) {
$('tbody').html(data);
console.log(data);
},
error:function (data) {
console.log(data);
}
});
})
</script>
@endsection
@@ -10,11 +10,17 @@
@endsection
@section("content")
<script src="http://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<div class="row align-items-center">
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('users.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Bruger</a>
<form method="post" action="{{ route("users.store") }}">
@csrf
<input type="text" class="form-controller" id="search" name="search" placeholder="Søg efter navn"></input>
</form>
</div>
<table class="tbl mt-2">
<tr>
@@ -54,4 +60,26 @@
@endforeach
</table>
{{ $users->links() }}
<script>
$('#search').on('keyup', function () {
$value = $(this).val();
$.ajax({
type: 'get',
url: '{{route('users.search')}}',
data: {'search':$value},
success:function (data) {
$('tbody').html(data);
console.log(data);
},
error:function (data) {
console.log(data);
}
});
})
</script>
@endsection
@@ -12,6 +12,12 @@
@section("content")
<div class="row align-items-center">
<a class="btn btn-inline btn-sde-blue mb-0" href="{{ route('washing-reservations.create') }}"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Reservation</a>
<form method="post" action="{{ route("users.store") }}">
@csrf
<input type="text" class="form-controller" id="search" name="search" placeholder="Søg på Navn, Telefon"></input>
</form>
</div>
<table class="tbl mt-2">
<tr>