Mails etc. in Lead finish

This commit is contained in:
Kevin Adametz 2021-05-11 17:07:20 +02:00
parent 66ca252bfa
commit b362b93bca
45 changed files with 1460 additions and 418 deletions

View file

@ -41,7 +41,7 @@
<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">
<table id="datatables-fewos" class="table table-striped table-bordered">
<thead>
<tr>
<th style="max-width: 10px;">&nbsp;</th>
@ -52,6 +52,7 @@
<th>{{__('bis')}}</th>
<th>{{__('Eingetragen')}}</th>
<th>{{__('Mails')}}</th>
<th>{{__('N.')}}</th>
<th>{{__('Kanal')}}</th>
<th>{{__('Datum')}}</th>
<th>{{__('R.-Nr.')}}</th>
@ -67,7 +68,7 @@
<script>
$( document ).ready(function() {
var table =$('#datatables-default').DataTable({
var table =$('#datatables-fewos').DataTable({
"processing": true,
"serverSide": true,
"searching": true,
@ -87,6 +88,7 @@
{ data: 'to_date', name: 'to_date' },
{ data: 'is_calendar', name: 'is_calendar', orderable: false },
{ data: 'is_mail', name: 'is_mail', orderable: false },
{ data: 'booking_fewo_notice', name: 'booking_fewo_notice', orderable: false },
{ data: 'travel_booking_fewo_channel.name', name: 'travel_booking_fewo_channel.name' },
{ data: 'booking_date', name: 'booking_date' },
{ data: 'invoice_number', name: 'invoice_number' },
@ -97,6 +99,10 @@
"iDisplayLength": 50,
"language": {
"url": "/js/German.json"
},
drawCallback: function () {
$('#datatables-fewos [rel="tooltip"]').tooltip({trigger: "hover"});
$('#datatables-fewos [data-toggle="popover"]').popover({trigger: "hover", content: get_popover_content, html: true,});
}
});
$('#option_fewo_id').on('change', function(){
@ -105,7 +111,38 @@
$('#option_channel_id').on('change', function(){
table.draw();
});
$('#datatables-default').tooltip({selector: '[data-toggle="tooltip"]'});
$('#datatables-fewos').tooltip({selector: '[data-toggle="tooltip"]'});
function get_popover_content() {
if ($(this).data('travel_user_booking_fewo_id')) {
var data = {};
data['action'] = $(this).data('action');
data['travel_user_booking_fewo_id'] = $(this).data('travel_user_booking_fewo_id');
$(this).addClass("loading");
var icontent = $.ajax({
url: '{!! route( 'travel_user_booking_fewo_ajax_requests' ) !!}',
data: data,
type: "POST",
dataType: "html",
cache: false,
contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
encode: true,
async: false,
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
success: function() {
// just get the response
},
error: function() {
// nothing
}
}).responseText;
$(this).removeClass("loading");
return icontent;
}
return "Keine Buchungs-ID";
}
});
</script>