Fewo Mails / Booking Country Services

This commit is contained in:
Kevin Adametz 2020-05-28 19:03:42 +02:00
parent b9c26d06d0
commit 48a6eb2282
154 changed files with 7761 additions and 1643 deletions

View file

@ -6,10 +6,41 @@
</h4>
<div class="card">
<div class="card-datatable table-responsive py-2">
<div class="mr-4 mb-2 text-right">
<a href="{{ route('travel_user_booking_fewo_detail', ['new']) }}" class="btn btn-sm btn-primary">Neue Buchung anlegen</a>
<div class="card-header">
<div class="">
<div class=" mb-2 text-right">
<a href="{{ route('travel_user_booking_fewo_detail', ['new']) }}" class="btn btn-sm btn-primary">Neue Buchung anlegen</a>
</div>
<div class="form-row align-items-center">
<div class="col-md-5 mb-3">
<label class="form-label" for="option_fewo_id">Filter FeWo</label>
<select class="custom-select" name="option_fewo_id" id="option_fewo_id">
<option value="">Filter aus</option>
@foreach($filter_fewo_options as $id=>$name)
<option value="{{$id}}">{{$name}}</option>
@endforeach
</select>
</div>
<div class="col-10 col-md-5 mb-3">
<label class="form-label" for="option_channel_id">Filter Kanal</label>
<select class="custom-select" name="option_channel_id" id="option_channel_id">
<option value="">Filter aus</option>
@foreach($filter_channel_options as $id=>$name)
<option value="{{$id}}">{{$name}}</option>
@endforeach
</select>
</div>
<div class="col-2 col-sm-2 mb-2 mt-4">
<a href="{{ route('travel_user_booking_fewos') }}?reset=filter" data-toggle="tooltip" data-placement="top" title="Reset Filter" class="btn icon-btn btn-sm btn-outline-dark float-right">
<span class="fa fa-sync"></span>
</a>
</div>
</div>
</div>
</div>
<div class="card-datatable table-responsive py-2">
<input type="hidden" name="sort_travel_country_id" value="">
<input type="hidden" name="sort_travelagenda_id" value="">
<table id="datatables-default" class="table table-striped table-bordered">
<thead>
<tr>
@ -21,7 +52,7 @@
<th>{{__('bis')}}</th>
<th>{{__('Eingetragen')}}</th>
<th>{{__('Mails')}}</th>
<th>{{__('Status')}}</th>
<th>{{__('Kanal')}}</th>
<th>{{__('Datum')}}</th>
<th>{{__('R.-Nr.')}}</th>
<th style="max-width: 60px;">{{__('delete')}}</th>
@ -36,21 +67,27 @@
<script>
$( document ).ready(function() {
$('#datatables-default').dataTable({
var table =$('#datatables-default').DataTable({
"processing": true,
"serverSide": true,
"searching": false,
"ajax": '{!! route('data_table_travel_user_booking_fewos') !!}',
"searching": true,
ajax: {
url: '{!! route('data_table_travel_user_booking_fewos') !!}',
data: function(d) {
d.option_fewo_id = $('select[name=option_fewo_id]').val();
d.option_channel_id = $('select[name=option_channel_id]').val();
}
},
"columns": [
{ data: 'action_edit', orderable: false, searchable: false},
{ data: 'id', name: 'id' },
{ data: 'fewo_lodging', name: 'fewo_lodging' },
{ data: 'fewo_lodging.name', name: 'fewo_lodging.name' },
{ data: 'travel_user', name: 'travel_user', orderable: false, },
{ data: 'from_date', name: 'from_date' },
{ data: 'to_date', name: 'to_date' },
{ data: 'is_calendar', name: 'is_calendar', orderable: false },
{ data: 'is_mail', name: 'is_mail', orderable: false },
{ data: 'status_name', name: 'status_name' },
{ data: 'travel_booking_fewo_channel.name', name: 'travel_booking_fewo_channel.name' },
{ data: 'booking_date', name: 'booking_date' },
{ data: 'invoice_number', name: 'invoice_number' },
{ data: 'action_delete', orderable: false, searchable: false},
@ -60,35 +97,13 @@
"iDisplayLength": 50,
"language": {
"url": "/js/German.json"
},
/*
initComplete: function () {
this.api().columns(2).every( function () {
var column = this;
var title = $(column.header()).html();
var select = $('<select class="selectpicker"><option value="">'+title+'</option></select>')
.appendTo( $(column.header()).empty() )
.on( 'change', function () {
var val = $.fn.dataTable.util.escapeRegex(
$(this).val()
);
column
.search( val ? '^'+val+'$' : '', true, false )
.draw();
} );
column.data().unique().sort().each( function ( d, j ) {
if(d !== ""){
var text = $(d+' span').text();
if(text != "" && text != "-"){
select.append( '<option value="'+$(d).data('order')+'">'+ $(d+' span').text()+'</option>' );
}
}
} );
} );
$('.selectpicker').selectpicker();
}*/
}
});
$('#option_fewo_id').on('change', function(){
table.draw();
});
$('#option_channel_id').on('change', function(){
table.draw();
});
$('#datatables-default').tooltip({selector: '[data-toggle="tooltip"]'});
});