Mail and Booking

This commit is contained in:
Kevin Adametz 2020-04-15 12:11:42 +02:00
parent 62e84637b6
commit 5daea268f7
250 changed files with 5377 additions and 1473 deletions

View file

@ -0,0 +1,141 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-3 mb-1">
Leistungsträger-Zahlungen
<a class="btn btn-default btn-sm float-right" href="{{ make_old_url('backend.php') }}" > zurück ins v1 CRM</a>
</h4>
<div class="card">
{!! Form::open(['url' => route('admin_report_export_bookings'), 'class' => '']) !!}
<div class="ui-bordered px-4 pt-3 mb-0">
<div class="form-row align-items-center">
<div class="col-12 col-md-4 mb-4">
<label class="form-label">Reisedatum</label>
<div class="row">
<div class="input-group col-6 pr-0">
<div class="input-group-prepend">
<span class="input-group-text">von</span>
</div>
<input class="form-control datepicker-base" name="filter_travel_date_from" type="text" value="">
</div>
<div class="input-group col-6 pl-1">
<div class="input-group-prepend">
<span class="input-group-text">bis</span>
</div>
<input class="form-control datepicker-base" name="filter_travel_date_to" type="text" value="">
</div>
</div>
</div>
<div class="col-12 col-md-4 mb-4">
<label class="form-label">Buchungsdatum</label>
<div class="row">
<div class="input-group col-6 pr-0">
<div class="input-group-prepend">
<span class="input-group-text">von</span>
</div>
<input class="form-control datepicker-base" name="filter_booking_date_from" type="text" value="">
</div>
<div class="input-group col-6 pl-1">
<div class="input-group-prepend">
<span class="input-group-text">bis</span>
</div>
<input class="form-control datepicker-base" name="filter_booking_date_to" type="text" value="">
</div>
</div>
</div>
<div class="col-6 col-md-1 mb-4 mt-4">
<a href="{{ route('admin_report_bookings') }}" class="btn icon-btn btn-sm btn-outline-dark float-right">
<span class="fa fa-sync"></span>
</a>
</div>
</div>
</div>
<div class="card-datatable table-responsive">
<table class="datatables-report table table-striped table-bordered">
<thead>
<tr>
<th>BuchungsID</th>
<th>{{__('Status')}}</th>
<th>{{__('MyJack Nr.')}}</th>
<th>{{__('Reisepreis')}}</th>
<th>{{__('Erlös')}}</th>
<th>{{__('Kunde')}}</th>
<th>{{__('Reisedatum')}}</th>
<th>{{__('bis')}}</th>
<th>{{__('Buchungsdatum')}}</th>
<th>{{__('Reiseveranstalter')}}</th>
</tr>
</thead>
<tbody></tbody>
<tfoot>
<tr>
<td colspan="3">Total</td>
<td id="price_total_sum">0</td>
<td id="proceed_total_sum">0</td>
<td colspan="5"></td>
</tr>
</tfoot>
</table>
<div class="mt-4 col">
<button type="submit" name="export" value="export" class="btn btn-primary"><i class="ion"></i> Export </button>
</div>
</div>
{!! Form::close() !!}
</div>
<script>
$( document ).ready(function() {
var table = $('.datatables-report').DataTable({
"processing": true,
"serverSide": true,
"ajax": {
"url": '{!! route( 'admin_report_bookings_datatable' ) !!}',
"data": function(d) {
d.filter_travel_date_from = $('input[name=filter_travel_date_from]').val();
d.filter_travel_date_to = $('input[name=filter_travel_date_to]').val();
d.filter_booking_date_from = $('input[name=filter_booking_date_from]').val();
d.filter_booking_date_to = $('input[name=filter_booking_date_to]').val();
}
},
"columns": [
{ data: 'id', name: 'id' },
{ data: 'lead.status_id', name: 'lead.status_id', orderable: false, searchable: false },
{ data: 'merlin_order_number', name: 'merlin_order_number' },
{ data: 'price', name: 'price' },
{ data: 'proceeds', name: 'proceeds' },
{ data: 'customer.fullName', name: 'customer.fullName' },
{ data: 'start_date', name: 'start_date' },
{ data: 'end_date', name: 'end_date' },
{ data: 'booking_date', name: 'booking_date' },
{ data: 'service_provider.names', name: 'service_provider.names' },
],
"order": [[ 0, "desc" ]],
"orderSequence": ["desc", "asc"],
"bLengthChange": false,
"iDisplayLength": 100,
"language": {
"url": "/js/German.json"
},
drawCallback: function (settings) {
$('#price_total_sum').html(settings.json.price_total_sum);
$('#proceed_total_sum').html(settings.json.proceed_total_sum);
}
});
$('#filter_service_provider_id, #filter_is_cleared, #filter_sort_by').on('change', function(){
table.order( [ 0, 'desc' ] ).draw();
});
$('.datepicker-base').on('change', function(){
table.order( [ 0, 'desc' ] ).draw();
});
});
</script>
@endsection

View file

@ -11,7 +11,7 @@
<div class="ui-bordered px-4 pt-3 mb-0">
<div class="form-row align-items-center">
<div class="col-12 col-md-4 mb-4">
<label class="form-label" for="travel_option_search">Leistungsträger</label>
<label class="form-label" for="filter_service_provider_id">Leistungsträger</label>
<select class="custom-select" name="filter_service_provider_id" id="filter_service_provider_id">
<option value="">Filter aus</option>
@foreach($serviceProviders as $serviceProvider)
@ -38,7 +38,7 @@
</div>
</div>
<div class="col-6 col-md-3 mb-4">
<label class="form-label" for="travel_option_search">Bezahlt</label>
<label class="form-label" for="filter_is_cleared">Bezahlt</label>
<select class="custom-select" name="filter_is_cleared" id="filter_is_cleared">
<option value="">Filter aus</option>
<option value="1">Ja</option>
@ -57,16 +57,27 @@
<table class="datatables-report table table-striped table-bordered">
<thead>
<tr>
<th>ID</th>
<th>SPE ID</th>
<th>BuchungsID</th>
<th>{{__('Reiseveranstalter')}}</th>
<th>{{__('MyJack Nr.')}}</th>
<th>{{__('Reisepreis')}}</th>
<th>{{__('Erlös')}}</th>
<th>{{__('Kunde')}}</th>
<th>{{__('Reisedatum')}}</th>
<th>{{__('bis')}}</th>
<th>{{__('bezahlt')}}</th>
</tr>
</thead>
<tbody></tbody>
<tfoot>
<tr>
<td colspan="4">Total</td>
<td id="price_total_sum">0</td>
<td id="proceed_total_sum">0</td>
<td colspan="3"></td>
</tr>
</tfoot>
</table>
<div class="mt-4 col">
@ -85,6 +96,7 @@
"ajax": {
"url": '{!! route( 'admin_report_providers_datatable' ) !!}',
"data": function(d) {
d.filter_sort_by = $('select[name=filter_sort_by]').val();
d.filter_service_provider_id = $('select[name=filter_service_provider_id]').val();
d.filter_travel_date_from = $('input[name=filter_travel_date_from]').val();
d.filter_travel_date_to = $('input[name=filter_travel_date_to]').val();
@ -93,12 +105,14 @@
},
"columns": [
{ data: 'id', name: 'id' },
{ data: 'booking.id', name: 'booking.id' },
{ data: 'service_provider.name', name: 'service_provider.name' },
{ data: 'booking.merlin_order_number', name: 'booking.merlin_order_number' },
{ data: 'booking.price', name: 'booking.price' },
{ data: 'booking.proceeds', name: 'booking.proceeds' },
{ data: 'booking.customer.fullName', name: 'booking.customer.fullName' },
{ data: 'booking.start_date', name: 'booking.start_date' },
{ data: 'booking.end_date', name: 'booking.end_date' },
{ data: 'is_cleared', name: 'is_cleared' },
],
"order": [[ 0, "desc" ]],
@ -107,10 +121,14 @@
"iDisplayLength": 100,
"language": {
"url": "/js/German.json"
},
drawCallback: function (settings) {
$('#price_total_sum').html(settings.json.price_total_sum);
$('#proceed_total_sum').html(settings.json.proceed_total_sum);
}
});
$('#filter_service_provider_id, #filter_is_cleared').on('change', function(){
$('#filter_service_provider_id, #filter_is_cleared, #filter_sort_by').on('change', function(){
table.order( [ 0, 'desc' ] ).draw();
});

View file

@ -32,6 +32,10 @@
.input-group-text {
padding: 0.438rem 0.475rem;
}
.badge.indicator:not(.badge-dot) {
-webkit-transform: translate(20%, -30%);
transform: translate(20%, -30%);
}
</style>
@ -96,6 +100,11 @@
<span class="badge badge-primary">{{$booking->customer_mails->count()}}</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="javascript:void(0)" data-collapse="#collapseBookingFiles">
PDF Dateien
</a>
</li>
</ul>
@ -303,7 +312,7 @@
</div>
</div>
</div>
{{--
{{--
<div class="text-left mt-3">
<button type="submit" name="action" value="saveAll" class="btn btn-submit">{{ __('save changes') }}</button>&nbsp;
<a href="{{route('bookings')}}" class="btn btn-default">{{ __('zur Übersicht') }}</a>
@ -321,7 +330,8 @@
@php($i = 1)
<div class="text-right mb-2 pr-2">
<button type="submit" name="action" value="addItemUp" class="btn btn-sm btn-primary"><i class="fa fa-plus"></i> Neue Leistung hinzufügen <i class="fa fa-arrow-up"></i></button>
<button type="submit" name="action" value="addItemUp" class="btn btn-sm btn-primary"><i class="fa fa-plus"></i> Neue Leistung hinzufügen <i class="fa fa-arrow-up"></i></button><br>
<button type="button" name="" class="btn btn-sm btn-info mt-2" data-toggle="modal" data-target="#modals-change-travel-dates"><i class="fa fa-sync"></i> Datum der Reise ändern </button>
</div>
<div class="table-responsive mb-4" style="overflow: visible">
<table class="table mb-0" id="table_dragula_tbody" style="min-width: 1080px">
@ -449,217 +459,505 @@
</div>
{!! Form::close() !!}
<!-- Mails -->
<div class="card mb-2">
<h6 class="card-header bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseBookingMails" aria-expanded="true" aria-controls="collapseBookingMails">
<strong style="line-height: 1.6em">E-Mails</strong>
</h6>
<div class="collapse show" id="collapseBookingMails">
<div class="card-body px-0">
<div class="pl-2">
<button type="button" class="btn btn-sm btn-secondary" data-toggle="modal"
data-target="#modals-load-content"
data-id="new-send"
data-model="customerMail"
data-action="new-customer-mail"
data-url="{{route('customer_mail_send_mail')}}"
data-redirect="back"
data-booking_id="{{$booking->id}}"
data-route="{{ route('booking_modal_load') }}"><i class="ion ion-md-mail-open"></i>&nbsp; Neue E-Mail an Kunden</button>
<div class="container-fluid d-flex align-items-stretch flex-grow-1 p-0">
<button type="button" class="btn btn-sm btn-default" data-toggle="modal"
data-target="#modals-load-content"
data-id="new-save"
data-model="customerMail"
data-action="reply-customer-mail"
data-url="{{route('customer_mail_reply_mail')}}"
data-redirect="back"
data-booking_id="{{$booking->id}}"
data-route="{{ route('booking_modal_load') }}"><i class="ion ion-md-mail-unread"></i>&nbsp;E-Mail Antwort speichern</button>
</div>
@if($booking->customer_mails)
<div class="table-responsive">
<table class="datatables-customer table table-striped">
<!-- `.messages-wrapper` fills all available space of container -->
<div class="messages-wrapper">
<!-- Messages sidebox -->
<div class="messages-sidebox messages-scroll bg-body border-right">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Mail-ID')}}</th>
{{-- <th>{{__('E-Mail')}}</th> --}}
<th>{{__('Betreff')}}</th>
<th>{{__('Anhang')}}</th>
<th>{{__('gesendet')}}</th>
<th>{{__('Gesendet')}}</th>
<th>{{__('#')}}</th>
<div class="py-3 px-4">
<div class="media align-items-center">
<div class="media-body text-center">
<button type="button" class="btn btn-sm btn-secondary mb-3 btn-compare-customer-mails" data-toggle="modal"
data-target="#modals-load-content"
data-id="new-send"
data-model="customerMail"
data-action="new-customer-mail"
data-url="{{route('customer_mail_send_mail')}}"
data-redirect="back"
data-booking_id="{{$booking->id}}"
data-customer_mail_dir="0"
data-customer_mail_country="0"
data-route="{{ route('booking_modal_load') }}"><i class="ion ion-md-mail-open"></i>&nbsp;E-Mail schreiben</button>
</tr>
</thead>
<tbody>
@foreach($booking->customer_mails as $customer_mail)
<tr role="row" class="odd">
<td>
<a href="#" class="btn icon-btn btn-sm btn-primary"><span class="fa fa-edit"></span></a>
</td>
<td>
<a data-order="{{ $customer_mail->id }}" href="{{route('customer_mail_detail', [$customer_mail->id])}}" data-id="{{$customer_mail->id}}">{{$customer_mail->id}}</a>
</td>
{{-- <td>{{ $customer_mail->email }}</td> --}}
<td> <a href="javascript:void(0)" class="badge @if($customer_mail->is_answer) badge-default @else badge-secondary @endif" data-toggle="modal"
data-target="#modals-load-content"
data-id="new"
data-model="customerMail"
data-action="show-customer-mail"
data-url=""
data-redirect="back"
data-customer_mail_id="{{$customer_mail->id}}"
data-route="{{ route('booking_modal_load') }}">
@if($customer_mail->reply_id)
<i class="ion ion-ios-redo ui-w-30 text-center" style="opacity: 0.7"></i>
@else
<i class="ion ion-ios-mail ui-w-30 text-center" style="opacity: 0.7"></i>
@endif
{{ $customer_mail->subject }}
</a>
</td>
<td>{{ $customer_mail->customer_files->count() }}</td>
<td>
@if($customer_mail->send)
<span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>
@else
<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>
@endif
</td>
<td>{{ $customer_mail->sent_at }}</td>
<td>
<a href="javascript:void(0)" class="btn btn-xs btn-secondary" data-toggle="modal"
data-target="#modals-load-content"
data-id="reply-send"
data-model="customerMail"
data-action="new-customer-mail"
data-url="{{route('customer_mail_send_mail')}}"
data-redirect="back"
data-customer_mail_id="{{$customer_mail->id}}"
data-booking_id="{{$booking->id}}"
data-route="{{ route('booking_modal_load') }}">
<span title="Antwort auf E-Mail senden" data-placement="left" rel="tooltip">
<i class="ion ion-ios-redo"></i> <i class="ion ion-md-mail-open"></i>
</span>
</a>
&nbsp;
<a href="javascript:void(0)" class="btn btn-xs btn-default" data-toggle="modal"
data-target="#modals-load-content"
data-id="reply-save"
data-model="customerMail"
data-action="reply-customer-mail"
data-url="{{route('customer_mail_reply_mail')}}"
data-redirect="back"
data-customer_mail_id="{{$customer_mail->id}}"
data-booking_id="{{$booking->id}}"
data-route="{{ route('booking_modal_load') }}">
<span title="Antwort auf E-Mail speichern" data-placement="left" rel="tooltip">
<i class="ion ion-ios-redo"></i> <i class="ion ion-md-mail-unread"></i>
</span>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
<button type="button" class="btn btn-sm btn-next btn-compare-customer-mails" data-toggle="modal"
data-target="#modals-load-content"
data-id="new-save"
data-model="customerMail"
data-action="reply-customer-mail"
data-url="{{route('customer_mail_reply_mail')}}"
data-redirect="back"
data-booking_id="{{$booking->id}}"
data-customer_mail_dir="0"
data-customer_mail_country="0"
data-route="{{ route('booking_modal_load') }}"><i class="ion ion-md-mail-unread"></i>&nbsp;Antwort speichern</button>
</div>
<a href="javascript:void(0)" class="messages-sidebox-toggler d-lg-none d-block text-muted text-large font-weight-light pl-4">&times;</a>
</div>
</div>
@endif
<hr class="border-light mx-4 mt-0 mb-4">
<style>
.sidebox-nav-item {
color: #a3a4a6 !important;
}
.sidebox-nav-item[href]:hover,
.sidebox-nav-item[href]:focus {
color: #8c8e90 !important;
}
.sidebox-nav-item.active .item {
color: #4E5155 !important;
font-weight: 700 !important;
}
</style>
<!-- Mail boxes -->
@foreach($booking::$customer_mail_dirs as $dir_id => $customer_mail_dir)
@php($badge = $dir_id === 0 ? "badge-primary" : "badge-outline-primary")
<a href="javascript:void(0)" class="d-flex justify-content-between align-items-center py-2 px-4 sidebox-nav-item @if($dir_id === 0) active @endif"
data-dir="{{$dir_id}}" data-country="0" data-icon="{{$customer_mail_dir['icon']}}" data-name="{{$customer_mail_dir['name']}}">
<div class="item">
<i class="ion {{$customer_mail_dir['icon']}}"></i> {{$customer_mail_dir['name']}}
</div>
<div class="badge {{$badge}}">{{$booking->countCustomerMailsBy($dir_id)}}</div>
</a>
@if($dir_id === 1 && $booking->travel_country)
@foreach($booking->travel_country->getCountryLands() as $id => $name)
<a href="javascript:void(0)" class="d-flex justify-content-between align-items-center py-2 px-4 sidebox-nav-item"
data-dir="{{$dir_id}}" data-country="{{$id}}" data-icon="{{$customer_mail_dir['icon']}}" data-name="{{$name}}">
<div class="item pl-2">
<i class="ion {{$customer_mail_dir['icon']}}"></i> {{$name}}
</div>
<div class="badge {{$badge}}">{{$booking->countCustomerMailsBy($dir_id, $id)}}</div>
</a>
@endforeach
@endif
@endforeach
<hr class="border-light m-4">
</div>
<!-- / Messages sidebox -->
<!-- Messages content wrapper -->
<div class="d-flex flex-column w-100">
<!-- Header -->
<div class="flex-grow-0">
<h4 class="media align-items-center font-weight-bold container-p-x py-3 py-lg-4 m-0">
<a href="javascript:void(0)" class="messages-sidebox-toggler d-lg-none d-block align-self-center text-muted px-3 mr-3"><i class="ion ion-md-more"></i></a>
<div class="media-body">&nbsp;
<i id="message-sidebox-title-icon" class="ion ion-ios-filing"></i> <span id="message-sidebox-title-name">Reisender</span>
</div>
<input type="text" class="form-control form-control-sm" placeholder="Suche ..." style="max-width: 10rem;" id="dataTableInputSearchField">
</h4>
<hr class="border-light m-0">
</div>
<!-- / Header -->
<style>
div.dataTables_info, div.dataTables_paginate {
padding: 10px;
}
</style>
<!-- Wrap `.messages-scroll` to properly position scroll area. Remove this wrapper if you don't need scroll -->
<div class="flex-grow-1 position-relative">
<!-- Remove `.messages-scroll` and add `.flex-grow-1` if you don't need scroll -->
<div class="messages-content flex-grow-1">
<div class="table-responsive" id="customer_mails_table">
<input type="hidden" name="booking_id" value="{{$booking->id}}">
<input type="hidden" name="customer_mail_dir" value="0">
<input type="hidden" name="customer_mail_country" value="">
<table id="datatables-customer-mails" class="table table-striped">
<thead>
<tr>
<th>&nbsp;</th>
{{-- <th>{{__('E-Mail')}}</th> --}}
<th>{{__('Betreff')}}</th>
<th>{{__('Datum')}}</th>
<th style="width: 100px">{{__('#')}}</th>
</tr>
</thead>
<tbody class="">
</tbody>
</table>
</div>
</div><!-- / .messages-content -->
</div>
</div>
</div><!-- / .messages-wrapper -->
</div>
</div>
</div>
<div class="modal fade" id="modals-load-next">
<div class="modal-dialog modal-lg">
<!-- Preis -->
<div class="card mb-2">
<h6 class="card-header bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseBookingFiles" aria-expanded="false" aria-controls="collapseBookingFiles">
<strong style="line-height: 1.6em">PDF Dateien</strong>
</h6>
<div class="collapse" id="collapseBookingFiles">
@php($booking_files_count = 1)
<div class="card-body row">
<div class="table-responsive" id="booking_files_table">
<table class="table table-striped table-sm">
<thead>
<tr>
<th>#</th>
<th>Datei</th>
<th>Inhalt</th>
<th>Datum</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
@if($booking->booking_applications)
@foreach($booking->booking_applications as $booking_application)
<tr>
<th scope="row">{{$booking_files_count++}}</th>
<td>
<a href="{{ route('customer_file_show', ['booking_application', $booking_application->id]) }}" target="_blank" class="badge badge-md badge-primary">
<i class="fa fa-file-pdf mr-1"></i> Reiseanmeldung
</a>
</td>
<td>
Gesamtpreis: {{ \App\Services\Util::_number_format($booking_application->total)}} &euro;
</td>
<td>{{\App\Services\Util::_format_date($booking_application->updated_at, 'date')}}</td>
<td>
<a href="{{ route('customer_file_show', ['booking_application', $booking_application->id, true]) }}" class="btn btn-xs btn-default"
title="Download" data-placement="left" rel="tooltip">
<i class="fa fa-download"></i>
</a>
</td>
</tr>
@endforeach
@endif
@if($booking->booking_confirmations)
@foreach($booking->booking_confirmations as $booking_confirmation)
<tr>
<th scope="row">{{$booking_files_count++}}</th>
<td>
<a href="{{ route('customer_file_show', ['booking_confirmation', $booking_confirmation->id]) }}" target="_blank" class="badge badge-md badge-success">
<i class="fa fa-file-pdf mr-1"></i> Reisebestätigung
</a>
</td>
<td>
Gesamtpreis: {{ \App\Services\Util::_number_format($booking_confirmation->total)}} &euro; |
Anzahlung: {{ \App\Services\Util::_number_format($booking_confirmation->deposit)}} &euro; |
Restzahlung: {{ \App\Services\Util::_number_format($booking_confirmation->final_payment)}} &euro;
</td>
<td>{{\App\Services\Util::_format_date($booking_confirmation->updated_at, 'date')}}</td>
<td>
<a href="{{ route('customer_file_show', ['booking_confirmation', $booking_confirmation->id, true]) }}" class="btn btn-xs btn-default"
title="Download" data-placement="left" rel="tooltip">
<i class="fa fa-download"></i>
</a>
</td>
</tr>
@endforeach
@endif
@if($booking->booking_stornos)
@foreach($booking->booking_stornos as $booking_storno)
<tr>
<th scope="row">{{$booking_files_count++}}</th>
<td>
<a href="{{ route('customer_file_show', ['booking_storno', $booking_storno->id]) }}" target="_blank" class="badge badge-md badge-danger">
<i class="fa fa-file-pdf mr-1"></i> Stornobestätigung
</a>
</td>
<td>
Stornobetrag: {{ \App\Services\Util::_number_format($booking_storno->total)}} &euro;
</td>
<td>{{\App\Services\Util::_format_date($booking_storno->updated_at, 'date')}}</td>
<td>
<a href="{{ route('customer_file_show', ['booking_storno', $booking_storno->id, true]) }}" class="btn btn-xs btn-default"
title="Download" data-placement="left" rel="tooltip">
<i class="fa fa-download"></i>
</a>
</td>
</tr>
@endforeach
@endif
@if($booking->coupons)
@foreach($booking->coupons as $coupon)
<tr>
<th scope="row">{{$booking_files_count++}}</th>
<td>
<a href="{{ route('customer_file_show', ['coupon', $coupon->id]) }}" target="_blank" class="badge badge-md badge-warning">
<i class="fa fa-file-pdf mr-1"></i> Gutschein {{$coupon->number}}
</a>
</td>
<td>
Wert: {{ \App\Services\Util::_number_format($coupon->value)}} &euro; |
bis: {{\App\Services\Util::_format_date($coupon->valid_date, 'date')}} |
@if($coupon->is_redeemed) <i class="fa fa-check-circle text-success"></i> {{\App\Services\Util::_format_date($coupon->redeem_date, 'date')}} @else <i class="fa fa-times-circle text-danger"></i> @endif
</td>
<td>{{\App\Services\Util::_format_date($coupon->issue_date, 'date')}}</td>
<td>
<a href="{{ route('customer_file_show', ['coupon', $coupon->id, true]) }}" class="btn btn-xs btn-default"
title="Download" data-placement="left" rel="tooltip">
<i class="fa fa-download"></i>
</a>
</td>
</tr>
@endforeach
@endif
@if($booking->booking_vouchers)
@foreach($booking->booking_vouchers as $booking_voucher)
<tr>
<th scope="row">{{$booking_files_count++}}</th>
<td>
<a href="{{ route('customer_file_show', ['booking_voucher', $booking_voucher->id]) }}" target="_blank" class="badge badge-md badge-dark">
<i class="fa fa-file-pdf mr-1"></i> Voucher-ID {{$booking_voucher->id}}
</a>
</td>
<td>
&nbsp;
</td>
<td>{{\App\Services\Util::_format_date($booking_voucher->updated_at, 'date')}}</td>
<td>
<a href="{{ route('customer_file_show', ['booking_vouchers', $booking_voucher->id, true]) }}" class="btn btn-xs btn-default"
title="Download" data-placement="left" rel="tooltip">
<i class="fa fa-download"></i>
</a>
</td>
</tr>
@endforeach
@endif
@if($booking->insurance_certificates)
@foreach($booking->insurance_certificates as $insurance_certificate)
<tr>
<th scope="row">{{$booking_files_count++}}</th>
<td>
<a href="{{ route('customer_file_show', ['insurance_certificate', $insurance_certificate->id]) }}" target="_blank" class="badge badge-md badge-next">
<i class="fa fa-file-pdf mr-1"></i> Sicherungsschein Nr. {{$insurance_certificate->internal_id}}
</a>
</td>
<td>
&nbsp;
</td>
<td>{{\App\Services\Util::_format_date($insurance_certificate->updated_at, 'date')}}</td>
<td>
<a href="{{ route('customer_file_show', ['insurance_certificates', $insurance_certificate->id, true]) }}" class="btn btn-xs btn-default"
title="Download" data-placement="left" rel="tooltip">
<i class="fa fa-download"></i>
</a>
</td>
</tr>
@endforeach
@endif
@if($booking->travel_insurances)
@foreach($booking->travel_insurances as $travel_insurances)
<tr>
<th scope="row">{{$booking_files_count++}}</th>
<td>
<i class="fa fa-info-circle mr-1"></i> Policennummer {{$travel_insurances->policy_number}}
</td>
<td>
Gesamtprämie: {{ \App\Services\Util::_number_format($travel_insurances->premium)}} &euro;
</td>
<td>{{\App\Services\Util::_format_date($travel_insurances->updated_at, 'date')}}</td>
<td>
&nbsp;
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
</div>
</div>
<script>
$(document).ready(function() {
<div class="modal fade" id="modals-load-next">
<div class="modal-dialog modal-lg">
$('[rel="tooltip"]').tooltip({trigger: "hover"});
</div>
</div>
<!-- Modal template -->
<div class="modal fade" id="modals-change-travel-dates">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('booking_action', ['change_travel_dates', $booking->id]) }}" method="post" onsubmit="return confirm('Datum wirklich ändern?');">
@csrf
<div class="modal-header">
<h5 class="modal-title">Reise verschieben</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row mb-2">
<label for="">Neues Start-Datum von:</label>
<input type="text" class="form-control datepicker-base" name="change_travel_start_date" value="{{ \App\Services\Util::_format_date($booking->start_date)}}">
</div>
<p>Alle Einträge der Organisistion werden auf das neue Start-Datum angepasst.<br>
Neue Reiseanmeldung, Reisebestätigung vorerst im CRM v2 erstellen.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary">{{__('ändern')}}</button>
</div>
</form>
</div>
</div>
<script>
$(document).ready(function() {
$('[rel="tooltip"]').tooltip({trigger: "hover"});
$('#top-nav-quick-jump .nav-link').on('click', function (e) {
e.preventDefault();
$('#top-nav-quick-jump .nav-link').removeClass('active');
$(this).addClass('active');
$('#top-nav-quick-jump .nav-link').on('click', function (e) {
e.preventDefault();
$('#top-nav-quick-jump .nav-link').removeClass('active');
$(this).addClass('active');
var collapse_id = $(this).data('collapse');
console.log(collapse_id);
$(collapse_id).collapse('show');
// animate
$('html, body').animate({
scrollTop: $(collapse_id).parent('.card').offset().top
}, 300, function(){
var collapse_id = $(this).data('collapse');
console.log(collapse_id);
$(collapse_id).collapse('show');
// animate
$('html, body').animate({
scrollTop: $(collapse_id).parent('.card').offset().top
}, 300, function(){
// when done, add hash to url
// (default click behaviour)
//window.location.hash = collapse_id;
});
// when done, add hash to url
// (default click behaviour)
//window.location.hash = collapse_id;
});
});
$('.datatables-customer').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"order": [[ 5, "desc" ]],
"language": {
"url": "/js/German.json"
}
});
$.dragYScroll();
var sort_item_pos_number = function(){
var index = 1;
$('#table_dragula_tbody .draft_item_tbody').each(function () {
$(this).find('.item_pos_number').html(index);
$(this).data('rowPosition', index);
index++;
});
};
$(function() {
// Drag handle
var sortableItems = dragula([$('#table_dragula_tbody')[0]], {
moves: function (el, container, handle) {
return handle.classList.contains('handle');
var oTable = $('#datatables-customer-mails').DataTable({
"processing": true,
"serverSide": true,
"searching": false,
ajax: {
url: '{!! route( 'customer_mail_data_table' ) !!}',
data: function(d) {
d.booking_id = $('#customer_mails_table input[name=booking_id]').val();
d.customer_mail_dir = $('#customer_mails_table input[name=customer_mail_dir]').val();
d.customer_mail_country = $('#customer_mails_table input[name=customer_mail_country]').val();
d.data_table_search = $('#dataTableInputSearchField').val();
}
},
"columns": [
/* { data: 'checkbox', width: '10px', orderable: false, searchable: false}, */
{ data: 'important', width: '15px', searchable: false },
{ data: 'subject', name: 'subject', width: '', orderable: false, },
{ data: 'date', name: 'date', width: '' },
{ data: 'action', width: '100px', orderable: false, searchable: false},
],
"bLengthChange": false,
"iDisplayLength": 25,
"orderSequence": ["desc", "asc"],
"order": [[ 2, "desc" ]],
"language": {
"url": "/js/German.json"
},
"drawCallback": function( settings ) {
$('#datatables-customer-mails [rel="tooltip"]').tooltip({trigger: "hover"});
$('#datatables-customer-mails .customer-mail-ajax-action').on('click', function (event) {
ajax_object_action(event, $(this), callback_ajax);
});
}
});
sortableItems.on('dragend', function() {
//sort new
sort_item_pos_number();
$('.messages-wrapper .sidebox-nav-item').on('click', function (event) {
event.preventDefault();
if($(this).hasClass('active')){
return;
}
$('#customer_mails_table input[name=customer_mail_dir]').val($(this).data('dir'));
$('#customer_mails_table input[name=customer_mail_country]').val($(this).data('country'));
console.log($(this).data('country'));
if($(this).data('dir') <= 10){
$('.btn-compare-customer-mails').data('customer_mail_dir', $(this).data('dir'));
$('.btn-compare-customer-mails').data('customer_mail_country', $(this).data('country'));
$('.btn-compare-customer-mails').prop('disabled', false);
}else{
$('.btn-compare-customer-mails').prop('disabled', true);
}
oTable.draw();
$('.messages-wrapper .sidebox-nav-item').removeClass('active');
$(this).addClass('active');
$('#message-sidebox-title-icon').removeClass().addClass('fa ' + $(this).data('icon'));
$('#message-sidebox-title-name').html($(this).data('name'));
$('.messages-wrapper .sidebox-nav-item').find('.badge-primary').removeClass('badge-primary').addClass('badge-outline-primary');
$(this).find('.badge').removeClass('badge-outline-primary').addClass('badge-primary');
});
function callback_ajax(data) {
if(data.status === 'success'){
oTable.draw();
}
}
$('#dataTableInputSearchField').keyup(function(){
oTable.search($(this).val()).draw();
});
$.dragYScroll();
var sort_item_pos_number = function(){
var index = 1;
$('#table_dragula_tbody .draft_item_tbody').each(function () {
$(this).find('.item_pos_number').html(index);
$(this).data('rowPosition', index);
index++;
});
};
$(function() {
// Drag handle
var sortableItems = dragula([$('#table_dragula_tbody')[0]], {
moves: function (el, container, handle) {
return handle.classList.contains('handle');
}
});
sortableItems.on('dragend', function() {
//sort new
sort_item_pos_number();
});
});
$('table .move-up-btn').on('click', function () {
var thisRow = $(this).closest('tbody');
var prevRow = thisRow.prev();
if (prevRow.length) {
prevRow.before(thisRow);
sort_item_pos_number()
}
});
$('table .move-down-btn').on('click', function () {
var thisRow = $(this).closest('tbody');
var nextRow = thisRow.next();
if (nextRow.length) {
nextRow.after(thisRow);
sort_item_pos_number()
}
});
});
</script>
$('table .move-up-btn').on('click', function () {
var thisRow = $(this).closest('tbody');
var prevRow = thisRow.prev();
if (prevRow.length) {
prevRow.before(thisRow);
sort_item_pos_number()
}
});
$('table .move-down-btn').on('click', function () {
var thisRow = $(this).closest('tbody');
var nextRow = thisRow.next();
if (nextRow.length) {
nextRow.after(thisRow);
sort_item_pos_number()
}
});
});
</script>
@endsection
@endsection

View file

@ -114,10 +114,15 @@
</div>
</div>
<hr>
<br>
<h4>Kontaktdaten</h4>
<h4>E-Mail-Adressen</h4>
<div class="form-row">
<div class="form-group col-sm-6">
<label class="form-label" for="contact_headline">Der Agenturen für interene Mails <span class="text-muted">(jede E-Mail in eine extra Zeile)</span></label>
{{ Form::textarea('contact_emails', $model->getContactEmailsStr(), ['class' => 'form-control', 'rows'=>4]) }}
</div>
</div>
<hr>
<h4>Kontaktdaten PDF</h4>
<div class="form-row">
<div class="form-group col-sm-12">
<label class="form-label" for="contact_headline">Überschrift</label>
@ -142,7 +147,7 @@
</div>
</div>
<hr>
<h4>Rückfragen</h4>
<h4>Rückfragen PDF</h4>
<p>Übergreifende Texte für jedes Land sind unter: <a href="{{route('cms_content_all')}}">Inhalte Allgemein</a><br>
- PDF Footer Hinweise Rückfragen<br>
- PDF Footer Hinweise Reisebedingungen<br>

View file

@ -30,6 +30,8 @@
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Name')}}</th>
<th>{{__('Bezug')}}</th>
<th>{{__('E-Mail(s)')}}</th>
<th><i class="fa fa-eye"></i> {{__('Seite')}}</th>
<th><i class="fa fa-eye"></i> {{__('CRM')}}</th>
<th><i class="fa fa-eye"></i> {{__('Kunden')}}</th>
@ -38,12 +40,19 @@
<tbody>
@foreach($travel_countries as $value)
<tr>
<td>
<td data-sort="{{ $value->id }}">
<a href="{{ route('cms_content_country_detail', [$value->id]) }}" class="btn icon-btn btn-sm btn-primary">
<span class="fa fa-edit"></span>
</a>
</td>
<td><a href="{{ route('cms_content_country_detail', [$value->id]) }}">{{ $value->name }}</a></td>
<td>
{!! implode("<br>", $value->getContactLandsArray()) !!}
</td>
<td>
{!! $value->getContactEmailsStr("<br>") !!}
</td>
<td data-sort="{{ $value->active_frontend }}">
@if($value->active_frontend)
<span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>

View file

@ -13,30 +13,15 @@
<div class="modal-body">
{!! Form::open(['url' => $value->url, 'class' => '', 'id'=>'customer-mail-form']) !!}
{{ Form::hidden('booking_id', $value->id) }}
@if(isset($value->customers))
<div class="form-row">
<div class="form-group col">
<label for="to" class="form-label">E-Mail senden an:</label>
@foreach($value->customers as $key=>$val)
<label class="custom-control custom-checkbox mt-2" style="margin-right: 20px;">
{!! Form::checkbox('send_mail_to['.$key.']', 1, $key, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{$val}}</span>
</label>
@endforeach
</div>
</div>
{{ Form::hidden('action', '') }}
@if(isset($value->save_customer_mail_id))
{{ Form::hidden('save_customer_mail_id', $value->save_customer_mail_id) }}
@endif
@if(isset($value->booking))
<div class="">
@if(isset($value->customer_mail))
<p><strong>Antwort auf: </strong>
{{ $value->customer_mail->id }} || {{ $value->customer_mail->subject }}
</p>
@endif
<p><strong>Buchung: </strong>
@if($value->show === 'single' || $value->show === 'reply')
<div class="row">
<div class="col-sm-4">
<strong>Buchung: </strong><br>
{{ $value->booking->id }}
@if($value->booking->travel_country_id)
{{ " | ".$value->booking->travel_country->name }}
@ -44,13 +29,76 @@
@if($value->booking->travelagenda_id)
{{ " | ".$value->booking->travel_agenda->name }}
@endif
</p>
@if($value->booking->customer)
<p><strong>Kunde: </strong>
{{ $value->booking->customer->salutation->name }} {{ $value->booking->customer->firstname }} {{ $value->booking->customer->name }}
</p>
@endif
</div>
<div class="col-sm-4">
@if($value->booking->customer)
<strong>Kunde: </strong><br>{{ $value->booking->customer->salutation->name }} {{ $value->booking->customer->firstname }} {{ $value->booking->customer->name }}
@endif
</div>
<div class="col-sm-4">
@if(isset($value->customer_mail))
<strong>Antwort auf: </strong><br>{{ $value->customer_mail->id }} || {{ $value->customer_mail->subject }}
@endif
</div>
<div class="col-sm-12">
<hr>
</div>
</div>
@endif
@if(isset($value->customers))
@if($value->show === 'single')
<div class="form-row">
<div class="form-group col-sm-12 mb-1">
<label for="to" class="form-label">E-Mail senden an:*</label>
@foreach($value->customers as $key=>$val)
<label class="custom-control custom-checkbox mt-2" style="margin-right: 20px;">
{!! Form::checkbox('send_mail_to['.$key.']', 1, $key, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">
<div class="row">
<div class="col-sm-6">
{{ Form::text('send_mail_to_mail['.$key.']', $val['email'], array('placeholder'=>'Erste E-Mail: Pflichtpfeld', 'id'=>'send_mail_to_mail_'.$key, 'class'=>'form-control', 'style'=>'margin-top: -8px;', 'required')) }}
</div>
<div class="col-sm-6">
<button type="button" class="btn btn-sm btn-outline-primary mt-1 mb-2" data-toggle="collapse" data-target="#collapseModalNewMailRe" aria-expanded="false" aria-controls="collapseModalNewMailRe"><i class="fa fa-plus-circle"></i> Weitere Empfänger</button>
</div>
</div>
</span>
</label>
@endforeach
</div>
</div>
<div class="collapse form-row" id="collapseModalNewMailRe">
<div class="form-group col-sm-4">
<label class="form-label" for="recipient">TO: (weitere Empfänger)</label>
{{ Form::textarea('recipient', $value->recipient, ['class' => 'form-control', 'rows'=>4]) }}
</div>
<div class="form-group col-sm-4">
<label class="form-label" for="cc">CC: (Kopie Empfänger)</label>
{{ Form::textarea('cc', $value->cc, ['class' => 'form-control', 'rows'=>4]) }}
</div>
<div class="form-group col-sm-4">
<label class="form-label" for="bcc">BCC: (Blindkopie Empfänger)</label>
{{ Form::textarea('bcc', $value->bcc, ['class' => 'form-control', 'rows'=>4]) }}
</div>
</div>
@endif
@if($value->show === 'multi')
<div class="form-row">
<div class="form-group col-sm-12 mb-1">
<label for="to" class="form-label">E-Mail senden an:</label>
@foreach($value->customers as $key=>$val)
<label class="custom-control custom-checkbox mt-2" style="margin-right: 20px;">
{!! Form::checkbox('send_mail_to['.$key.']', 1, $key, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{ $val['email'] }} | {{ $val['name'] }}</span>
</label>
@endforeach
</div>
</div>
@endif
@endif
@if($value->show === 'reply' && isset($value->booking))
<div class="form-row">
<div class="form-group col">
<label for="mail_from" class="form-label">E-Mail von:</label>
@ -75,10 +123,64 @@
<div class="form-group mb-1">
<label class="form-label" for="message">Nachricht</label>
{{ Form::textarea('message', $value->message, array('placeholder'=>$value->m_placeholder, 'class'=>'form-control', 'rows'=>15)) }}
<div id="message-editor-toolbar">
<span class="ql-formats">
<button class="ql-bold"></button>
<button class="ql-italic"></button>
<button class="ql-underline"></button>
<button class="ql-strike"></button>
</span>
<span class="ql-formats">
<button class="ql-header" value="1"></button>
<button class="ql-header" value="2"></button>
<button class="ql-blockquote"></button>
<button class="ql-code-block"></button>
</span>
<span class="ql-formats">
<button class="ql-list" value="ordered"></button>
<button class="ql-list" value="bullet"></button>
<button class="ql-indent" value="-1"></button>
<button class="ql-indent" value="+1"></button>
</span>
<span class="ql-formats">
<select class="ql-align"></select>
</span>
<span class="ql-formats">
<button class="ql-clean"></button>
</span>
</div>
<div id="message-editor" style="height: 400px">{!! $value->message !!}</div>
{{ Form::textarea('message', $value->message, array('placeholder'=>$value->m_placeholder, 'id'=>'message-editor-fallback', 'class'=>'form-control d-none', 'rows'=>15)) }}
</div>
@if(isset($value->customers))
<p>Platzhalter: #geehrte/r# #Anrede# #Vorname# #Nachname# #Reiseland# #Programm# </p>
<p>Platzhalter: #geehrte/r# #Anrede# #Vorname# #Nachname# #Reiseland# #Programm# #Anreisedatum# #Abreisedatum# #Buchungsdatum# #Airline#</p>
@endif
@if($value->show === 'single' || $value->show === 'reply')
<div class="form-row">
<div class="col-sm-6">
<label for="to" class="form-label">Ablegen unter:</label>
<select class="custom-select" name="dir" id="send_mail_dir">
@foreach($value->booking::$customer_mail_dirs as $dir_id=>$customer_mail_dirs)
@if($dir_id <= 10)
<option value="{{$dir_id}}" @if($value->customer_mail_dir == $dir_id) selected @endif>{{$customer_mail_dirs['name']}}</option>
@endif
@endforeach
</select>
</div>
<div class="col-sm-6">
<label for="send_mail_country" class="form-label">&nbsp;</label>
<select class="custom-select" name="travel_country_id" id="send_mail_country">
@if($value->booking->travel_country)
@foreach($value->booking->travel_country->getCountryLands() as $country_id => $country_name)
<option value="0">Nur bei Agentur -> Land</option>
<option value="{{$country_id}}" @if($value->customer_mail_country == $country_id) selected @endif>{{$country_name}}</option>
@endforeach
@endif
</select>
</div>
</div>
@endif
@if(isset($value->customer_mail))
{{ Form::hidden('customer_mail_id', $value->customer_mail->id) }}
@ -92,10 +194,23 @@
</div>
<div class="col-12">
<div class="alert alert-danger alert-dismissable" style="display:none;"></div>
</div>
<div class="col-6" id="preview-mail-attachment">
@if(isset($value->customer_files))
@foreach($value->customer_files as $customer_file)
<div class="message-attachment ui-bordered p-2 mr-3 mb-3">
<div class="message-attachment-file display-4"><i class="mail-att-icon {{$customer_file->getIconExt()}}"></i></div>
<div class="media-body ml-3">
<strong class="message-attachment-filename">{{$customer_file->filename}}</strong>
<div class="text-muted small mail-att-size">{{$customer_file->formatBytes()}}</div>
<div>
<a href="{{$customer_file->getURL()}}" target="_blank" class="mail-att-show">Vorschau</a> &nbsp;
{{-- <a href="javascript:void(0)" class="mail-att-delete">entfernen</a> --}}
</div>
</div>
</div>
@endforeach
@endif
</div>
<div class="col-6">
@ -113,12 +228,15 @@
@endif
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
@if(isset($value->customers))
<button type="submit" id="submit-button-form" class="btn btn-primary"><i class="ion ion-ios-mail-open"></i> senden</button>
<button type="button" class="btn btn-default float-left" data-dismiss="modal">schließen</button>
@if($value->show === 'single' || $value->show === 'multi')
@if($value->draft)
<button type="submit" class="btn btn-next submit-button-form" value="draft"><i class="ion ion-ios-save"></i> Entwurf speichern</button>
@endif
<button type="submit" class="btn btn-primary submit-button-form" value="send"><i class="ion ion-ios-mail-open"></i> E-Mail senden</button>
@endif
@if(isset($value->booking))
<button type="submit" id="submit-button-form" class="btn btn-primary"><i class="ion ion-ios-mail-open"></i> speichern</button>
@if($value->show === 'reply')
<button type="submit" class="btn btn-primary submit-button-form" value="save"><i class="ion ion-ios-mail-open"></i> Antwort speichern</button>
@endif
</div>
<div class="message-attachment ui-bordered p-2 mr-3 mb-3 d-none" id="mail-attachment-template">
@ -134,6 +252,9 @@
</div>
</div>
<script type="text/javascript">
function add_mail_attachment_preview(file, response){
@ -152,8 +273,38 @@
$('#preview-mail-attachment').append(template);
}
function change_dir_country_select(){
//agentur
if($('#send_mail_dir').val() == 1){
$('#send_mail_country').prop('disabled', false);
}else{
$('#send_mail_country').prop('disabled', true);
$('#send_mail_country').val(0);
}
}
$(document).ready(function() {
change_dir_country_select();
$('#send_mail_dir').on('change', function () {
change_dir_country_select();
});
if (!window.Quill) {
$('#message-editor,#message-editor-toolbar').remove();
$('#message-editor-fallback').removeClass('d-none');
} else {
//$('#message-editor-fallback').remove();
var quill = new Quill('#message-editor', {
modules: {
toolbar: '#message-editor-toolbar'
},
placeholder: '{{$value->m_placeholder}}',
theme: 'snow'
});
}
$('.b-material-datetime-picker').bootstrapMaterialDatePicker({
weekStart: 1,
format : 'DD.MM.YYYY HH:mm',
@ -164,19 +315,20 @@
//currentDate: ''
});
$("#submit-button-form").click(function(event) {
$(".submit-button-form").click(function(event) {
@if(isset($value->customers))
if( !confirm('E-Mail wirklich senden?') ){
if($(this).val() === 'send' && !confirm('E-Mail wirklich senden?')){
event.preventDefault();
return;
}
@endif
$('#customer-mail-form input[name=action]').val($(this).val());
$("#message-editor-fallback").val($('#message-editor .ql-editor').html());
var message_attachment = $('#preview-mail-attachment').find('.message-attachment');
$.each( message_attachment, function( index, value ){
$('#customer-mail-form').append('<input type="hidden" name="message_attachment_id[]" value="'+$(value).data('id')+'">');
});
$( "#customer-mail-form" ).submit();
// event.preventDefault();
});
Dropzone.autoDiscover = false;

View file

@ -14,6 +14,15 @@
Gesendet an:<br>
@endif
&lt;<a href="mailto:{{$customer_mail->email}}">{{$customer_mail->email}}</a>&gt; {{$customer_mail->sent_at }}
@if($customer_mail->recipient)
<div>TO: {{\App\Services\Util::_implodeLines($customer_mail->recipient, ', ')}}</div>
@endif
@if($customer_mail->cc)
<div>CC: {{\App\Services\Util::_implodeLines($customer_mail->cc, ', ')}}</div>
@endif
@if($customer_mail->bcc)
<div>BCC: {{\App\Services\Util::_implodeLines($customer_mail->bcc, ', ')}}</div>
@endif
</div>
<!-- Subject -->

View file

@ -58,7 +58,7 @@
<body class="body" style="padding:0; margin:0; display:block; background:#f8f8f8; -webkit-text-size-adjust:none" bgcolor="#f8f8f8">
<div style="display: none; mso-hide: all; width: 0px; height: 0px; max-width: 0px; max-height: 0px; font-size: 0px; line-height: 0px;">
{{ $content }}
{{ strip_tags($content) }}
</div>
<table align="center" cellpadding="0" cellspacing="0" width="100%" height="100%">

View file

@ -41,9 +41,7 @@
<link rel="stylesheet" href="{{ mix('/vendor/libs/select2/select2.css') }}">
<link rel="stylesheet" href="{{ mix('/vendor/libs/datatables/datatables.css') }}">
<link rel="stylesheet" href="{{ mix('/vendor/libs/bootstrap-datepicker/bootstrap-datepicker.css') }}">
<link rel="stylesheet" href="{{ asset('/vendor/libs/bootstrap-material-datetimepicker/bootstrap-material-datetimepicker.css') }}">
<!--
<link rel="stylesheet" href="{{ mix('/vendor/libs/bootstrap-daterangepicker/bootstrap-daterangepicker.css') }}">
@ -51,14 +49,15 @@
<link rel="stylesheet" href="{{ mix('/vendor/libs/dragula/dragula.css') }}">
<link rel="stylesheet" href="{{ mix('/vendor/libs/minicolors/minicolors.css') }}">
<link rel="stylesheet" href="{{ asset('/vendor/libs/summernote/dist/summernote-bs4.css?v=0.8.16') }}">
<link rel="stylesheet" href="{{ asset('/vendor/libs/quill/quill.snow.css?v=1.3.6') }}">
<link rel="stylesheet" href="{{ asset('/vendor/libs/nestable/nestable.css') }}">
<link rel="stylesheet" href="{{ asset('/vendor/css/pages/messages.css') }}">
<link rel="stylesheet" href="{{ asset('/vendor/css/pages/messages.css') }}?v=1">
<link rel="stylesheet" href="{{ asset('/vendor/css/pages/file-manager.css') }}">
<link rel="stylesheet" href="{{ asset('/vendor/laravel-filemanager/css/cropper.min.css') }}">
<!-- Layout helpers -->
<script src="{{ mix('/vendor/js/layout-helpers.js') }}"></script>
@ -66,12 +65,10 @@
<!-- `perfect-scrollbar` library required by SideNav plugin -->
<link rel="stylesheet" href="{{ mix('/vendor/libs/perfect-scrollbar/perfect-scrollbar.css') }}">
@yield('styles')
<!-- Application stylesheets -->
<link rel="stylesheet" href="{{ mix('/css/application.css') }}?v=1{{ get_file_last_time('js/application.css') }}">
<link rel="stylesheet" href="{{ mix('/css/application.css') }}?v=5{{ get_file_last_time('js/application.css') }}">
<script src="{{ asset('/js/jquery.min.js') }}"></script>
<link rel="stylesheet" type="text/css" href="{{ asset('/css/cookieconsent.min.css') }}" />
@ -146,6 +143,7 @@
<script src="{{ asset('/js/summernote-iq-content-extension.js?v=2') }}"></script>
<script src="{{ asset('/js/summernote-image-title.js?v=2') }}"></script>
<script src="{{ asset('/vendor/libs/quill/quill.min.js?v=1.3.6') }}"></script>
@if(isset($lfm_helper))
<script src="{{ asset('/vendor/laravel-filemanager/js/cropper.min.js') }}"></script>
@ -160,7 +158,7 @@
<!-- Application javascripts -->
<script src="{{ mix('/js/application.js') }}"></script>
<script src="{{ asset('/js/custom.js?v=4') }}{{ get_file_last_time('/js/custom.js') }}"></script>
<script src="{{ asset('/js/custom.js?v=6') }}{{ get_file_last_time('/js/custom.js') }}"></script>
@include('asset.js')

View file

@ -220,11 +220,12 @@
<a href="{{ route('admin_settings_travel_program') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-airplane"></i><div>{{ __('Reiseprogramme') }}</div></a>
</li>
@endif
@if(Auth::user()->isPermission('sua-st-tc'))
{{-- @if(Auth::user()->isPermission('sua-st-tc'))
<li class="sidenav-item{{ Request::is('admin/settings/travel/country') ? ' active' : '' }}">
<a href="{{ route('admin_settings_travel_country') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-globe"></i><div>{{ __('Reiseländer') }}</div></a>
</li>
@endif
--}}
@if(Auth::user()->isPermission('sua-st-tn'))
<li class="sidenav-item{{ Request::is('admin/settings/travel/nationality') ? ' active' : '' }}">
<a href="{{ route('admin_settings_travel_nationality') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-people"></i><div>{{ __('Nationalitäten') }}</div></a>
@ -240,6 +241,11 @@
<a href="{{ route('admin_settings_keyword') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-key"></i><div>{{ __('Keywords') }}</div></a>
</li>
@endif
@if(Auth::user()->isPermission('sua-st-al'))
<li class="sidenav-item{{ Request::is('admin/settings/airline') ? ' active' : '' }}">
<a href="{{ route('admin_settings_airline') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-airplane"></i><div>{{ __('Airline') }}</div></a>
</li>
@endif
</ul>
</li>
@endif

View file

@ -10,7 +10,7 @@
<div class="card-header">
<div class="">
<div class="form-row align-items-center">
<div class="col-md-4 mb-4">
<div class="col-md-4 mb-3">
<label class="form-label" for="travel_option_search">Filter Anreise</label>
<select class="custom-select" name="travel_option_search" id="travel_option_search">
<option value="">Filter aus</option>
@ -21,7 +21,7 @@
<option value="after_1">Anreise in 2 Monat</option>
</select>
</div>
<div class="col-md-4 mb-4">
<div class="col-md-4 mb-3">
<label class="form-label">Filter Anreise Datum</label>
<div class="row">
<div class="input-group col-6 pr-0">
@ -39,7 +39,7 @@
</div>
</div>
</div>
<div class="col-md-4 mb-4">
<div class="col-md-4 mb-3">
<label class="form-label">Filter Abreise Datum</label>
<div class="row">
<div class="input-group col-6 pr-0">
@ -59,7 +59,7 @@
</div>
</div>
<div class="form-row align-items-center">
<div class="col-md-4 mb-4">
<div class="col-md-3 mb-3">
<label class="form-label" for="travel_option_country_id">Filter Reiseland</label>
<select class="custom-select" name="travel_option_country_id" id="travel_option_country_id">
<option value="">Filter aus</option>
@ -68,13 +68,13 @@
@endforeach
</select>
</div>
<div class="col-md-4 mb-4">
<div class="col-md-3 mb-3">
<label class="form-label" for="travel_option_agenda_id">Filter Programm</label>
<select class="custom-select" name="travel_option_agenda_id" id="travel_option_agenda_id">
<option value="">Filter aus</option>
</select>
</div>
<div class="col-md-4 mb-4">
<div class="col-md-3 mb-3">
<label class="form-label" for="travel_option_lead_status_id">Filter Status</label>
<select class="custom-select" name="travel_option_lead_status_id" id="travel_option_lead_status_id">
<option value="">Filter aus</option>
@ -83,9 +83,18 @@
@endforeach
</select>
</div>
<div class="col-md-3 mb-3">
<label class="form-label" for="travel_option_airline_id">Filter Airline</label>
<select class="custom-select" name="travel_option_airline_id" id="travel_option_airline_id">
<option value="">Filter aus</option>
@foreach($filter_airlines as $id=>$name)
<option value="{{$id}}">{{$name}}</option>
@endforeach
</select>
</div>
</div>
<div class="form-row align-items-center">
<div class="col-md-3 mb-4">
<div class="col-md-3 mb-3">
<label class="form-label" for="travel_option_paying_out">Filter K-Wunsch</label>
<select class="custom-select" name="travel_option_paying_out" id="travel_option_paying_out">
<option value="">Filter aus</option>
@ -94,7 +103,7 @@
@endforeach
</select>
</div>
<div class="col-md-3 mb-4">
<div class="col-md-3 mb-3">
<label class="form-label" for="travel_option_paying_out_status">Filter KW-Status</label>
<select class="custom-select" name="travel_option_paying_out_status" id="travel_option_paying_out_status">
<option value="">Filter aus</option>
@ -103,7 +112,7 @@
@endforeach
</select>
</div>
<div class="col-md-3 mb-4">
<div class="col-md-3 mb-3">
<label class="form-label" for="travel_option_refund">Filter Refund</label>
<select class="custom-select" name="travel_option_refund" id="travel_option_refund">
<option value="">Filter aus</option>
@ -112,7 +121,7 @@
@endforeach
</select>
</div>
<div class="col-md-3 mb-4">
<div class="col-md-3 mb-3">
<label class="form-label" for="travel_option_xx_tkt">Filter XX TKT</label>
<select class="custom-select" name="travel_option_xx_tkt" id="travel_option_xx_tkt">
<option value="">Filter aus</option>
@ -123,24 +132,24 @@
</div>
</div>
<div class="form-row align-items-center">
<div class="col-5 col-sm-2 mb-4">
<div class="col-5 col-sm-2 mb-2">
<label class="form-label">AnfrageID</label>
<input class="form-control full_search" name="full_lead_id_search" placeholder="suche" type="text" value="">
</div>
<div class="col-6 col-sm-3 mb-4">
<div class="col-6 col-sm-3 mb-2">
<label class="form-label">Vorname</label>
<input class="form-control full_search" name="full_firstname_search" placeholder="suche" type="text" value="">
</div>
<div class="col-6 col-sm-3 mb-4">
<div class="col-6 col-sm-3 mb-2">
<label class="form-label">Nachname</label>
<input class="form-control full_search" name="full_lastname_search" placeholder="suche" type="text" value="">
</div>
<div class="col-5 col-sm-2 mb-4">
<div class="col-5 col-sm-2 mb-2">
<label class="form-label">BuchungsID</label>
<input class="form-control full_search" name="full_booking_id_search" placeholder="suche" type="text" value="">
</div>
<div class="col-2 col-sm-2 mb-4 mt-4">
<div class="col-2 col-sm-2 mb-2 mt-4">
<a href="{{ route('requests') }}" class="btn icon-btn btn-sm btn-outline-dark float-right">
<span class="fa fa-sync"></span>
</a>
@ -175,10 +184,10 @@
<th>{{__('E-Mail')}}</th>
<th>{{__('K-Wunsch')}}</th>
<th>{{__('KW-Status')}}</th>
<th>{{__('Al')}}</th>
<th>{{__('Refund')}}</th>
<th>{{__('H')}}</th>
<th>{{__('XX TKT')}}</th>
</tr>
</thead>
</table>
@ -227,6 +236,7 @@
d.travel_option_country_id = $('select[name=travel_option_country_id]').val();
d.travel_option_agenda_id = $('select[name=travel_option_agenda_id]').val();
d.travel_option_lead_status_id = $('select[name=travel_option_lead_status_id]').val();
d.travel_option_airline_id = $('select[name=travel_option_airline_id]').val();
d.travel_option_paying_out = $('select[name=travel_option_paying_out]').val();
d.travel_option_paying_out_status = $('select[name=travel_option_paying_out_status]').val();
d.travel_option_refund = $('select[name=travel_option_refund]').val();
@ -250,7 +260,9 @@
{ data: 'last_customer_email', name: 'last_customer_email', orderable: true },
{ data: 'paying_out', name: 'paying_out' },
{ data: 'paying_out_status', name: 'paying_out_status' },
{ data: 'airline_id', name: 'airline_id' },
{ data: 'refund', name: 'refund' },
{ data: 'hold', name: 'hold' },
{ data: 'xx_tkt', name: 'xx_tkt' },
],
"bLengthChange": false,
@ -373,29 +385,33 @@
$(this).removeClass('active');
}
clearTravelOptionAgenda();
table.order( [ 5, 'desc' ] ).draw();
table.draw();
});
$('#travel_option_country_id').on('change', function(){
clearTravelOptionAgenda();
table.order( [ 5, 'desc' ] ).draw();
table.draw();
});
$('#travel_option_agenda_id').on('change', function(){
table.order( [ 5, 'desc' ] ).draw();
table.draw();
});
$('#travel_option_lead_status_id').on('change', function(){
table.order( [ 5, 'desc' ] ).draw();
table.draw();
});
$('#travel_option_airline_id').on('change', function(){
table.draw();
});
$('#travel_option_paying_out').on('change', function(){
table.order( [ 5, 'desc' ] ).draw();
table.draw();
});
$('#travel_option_paying_out_status').on('change', function(){
table.order( [ 5, 'desc' ] ).draw();
table.draw();
});
$('#travel_option_refund').on('change', function(){
table.order( [ 5, 'desc' ] ).draw();
table.draw();
});
$('#travel_option_xx_tkt').on('change', function(){
table.order( [ 5, 'desc' ] ).draw();
table.draw();
});
$('.datepicker-base').on('change', function(){
@ -433,6 +449,8 @@
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
success: function(data) {
console.log(data);
$(data.response.target).find('.modal-dialog').html(data.html);
$('.selectpicker').selectpicker('refresh');
//datepicker_birthday_init();
@ -456,6 +474,7 @@
$.each(button.data(), function(index, value){
data[index] = value;
});
console.log(data['url']);
loadModalInner(this, data);
});

View file

@ -0,0 +1,106 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-3 mb-1">
Airline
</h4>
<div class="card">
<div class="card-datatable table-responsive">
<table class="datatables-default table table-striped table-bordered">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('#')}}</th>
<th>{{__('Name')}}</th>
<th>{{__('E-Mail(s)')}}</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($airline as $value)
<tr>
<td>
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
data-id="{{ $value->id }}"
data-name="{{ $value->name }}"
data-name_full="{{ $value->name_full }}"
data-contact_emails="{{$value->getContactEmailsStr()}}">
<span class="fa fa-edit"></span>
</button>
</td>
<td data-sort="{{ $value->name }}">{{ $value->name }}</td>
<td data-sort="{{ $value->name_full }}">{{ $value->name_full }}</td>
<td>{!! $value->getContactEmailsStr("<br>") !!}</td>
<td><a class="text-danger" href="{{ route('admin_settings_airline_delete', [$value->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a></td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4 col">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
data-id="new"
data-name=""
>Neue Airline anlegen</button>
</div>
</div>
</div>
<!-- Modal template -->
<div class="modal fade" id="modals-default">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_settings_airline_update') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<div class="modal-header">
<h5 class="modal-title">Airline <span class="font-weight-light">anlegen/bearbeiten</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="name" class="form-label">Kürzel*</label>
<input type="text" class="form-control" name="name" placeholder="{{__('Kürzel')}}" required>
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="name_full" class="form-label">Name*</label>
<input type="text" class="form-control" name="name_full" placeholder="{{__('Name')}}" required>
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label class="form-label" for="contact_emails">Für interene Mails <span class="text-muted">(jede E-Mail in eine extra Zeile)</span></label>
<textarea class="form-control" rows="4" name="contact_emails" cols="50"></textarea>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<script>
$( document ).ready(function() {
$('#modals-default').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body input[name='name']").val(button.data('name'));
$(this).find(".modal-body input[name='name_full']").val(button.data('name_full'));
$(this).find(".modal-body textarea[name='contact_emails']").val(button.data('contact_emails'));
});
$('.datatables-default').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"order": [[ 1, "asc" ]],
"language": {
"url": "/js/German.json"
}
});
});
</script>
@endsection

View file

@ -16,7 +16,6 @@
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Name')}}</th>
<th>{{__('Slug')}}</th>
<th><i class="fa fa-eye"></i> {{__('Seite')}}</th>
<th><i class="fa fa-eye"></i> {{__('CRM')}}</th>
<th><i class="fa fa-eye"></i> {{__('Kunden')}}</th>
@ -26,7 +25,7 @@
<tbody>
@foreach($travel_countries as $value)
<tr>
<td>
<td data-sort="{{ $value->id }}">
<a href="{{ route('admin_settings_travel_country_detail', [$value->id]) }}" class="btn icon-btn btn-sm btn-primary">
<span class="fa fa-edit"></span>
</a>