Fewo Mails / Booking Country Services
This commit is contained in:
parent
b9c26d06d0
commit
48a6eb2282
154 changed files with 7761 additions and 1643 deletions
36
resources/views/admin/modal/country-service.blade.php
Executable file
36
resources/views/admin/modal/country-service.blade.php
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
<div class="modal-content">
|
||||
{!! Form::open(['url' => $data['url'], 'class' => '', 'enctype' => 'multipart/form-data']) !!}
|
||||
{{ Form::hidden('travel_county_service_id', $data['id']) }}
|
||||
{{ Form::hidden('back', $data['back']) }}
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">
|
||||
Länderleistungen Agenturleistungen
|
||||
<span class="font-weight-light">hinzufügen</span>
|
||||
</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="name" class="form-label">{{ __('Name') }}</label>
|
||||
{{ Form::text('name', $value->name, array('placeholder'=>__('Name'), 'class'=>'form-control', 'required')) }}
|
||||
</div>
|
||||
<div class="form-group ">
|
||||
<label for="full_text" class="form-label">{{ __('Beschreibung') }}</label>
|
||||
{{ Form::textarea('description', $value->description, array('Beschreibung'=>__('Beschreibung'), 'class'=>'form-control', 'rows'=>2)) }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pos" class="form-label">{{ __('Position') }}</label>
|
||||
{{ Form::text('pos', $value->pos, array('class'=>'form-control')) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
|
||||
<button type="submit" class="btn btn-primary" name="update-action" value="save-travel-county-service">speichern</button>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
98
resources/views/admin/modal/upload.blade.php
Executable file
98
resources/views/admin/modal/upload.blade.php
Executable file
|
|
@ -0,0 +1,98 @@
|
|||
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">
|
||||
{{ __('Datei') }}
|
||||
<span class="font-weight-light">hinzufügen</span>
|
||||
</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-row show-content-file">
|
||||
<div class="col-12">
|
||||
<div class="alert alert-danger alert-dismissable" style="display:none;"></div>
|
||||
</div>
|
||||
<div class="col-12 mt-2 mb-4">
|
||||
{!! Form::open([ 'url' => $data['url'], 'method' => 'post', 'files' => true, 'enctype' => 'multipart/form-data', 'class' => 'dropzone', 'id' => 'uploadModalFile' ]) !!}
|
||||
<input type="hidden" name="id" value="{{ $data['id'] }}">
|
||||
<input type="hidden" name="action" value="{{ $data['action'] }}">
|
||||
<input type="hidden" name="back" value="{{ $data['back'] }}">
|
||||
|
||||
<div class="fallback">
|
||||
<input name="file" type="file" multiple>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$( document ).ready(function() {
|
||||
Dropzone.autoDiscover = false;
|
||||
$("#uploadModalFile").dropzone({
|
||||
uploadMultiple: false,
|
||||
parallelUploads: 1,
|
||||
maxFilesize: 32,
|
||||
addRemoveLinks: true,
|
||||
dictDefaultMessage: '<i class="ion ion-ios-cloud-upload "></i>Hier klicken, oder Datei hier reinziehen (Drag&Drop)',
|
||||
dictFallbackMessage: 'Ihr Browser unterstützt Drag&Drop Dateiuploads nicht',
|
||||
dictFallbackText: 'Benutzen Sie das Formular um Ihre Dateien hochzuladen',
|
||||
dictFileTooBig: "Die Datei ist zu groß. Die maximale Dateigröße beträgt 32 MB",
|
||||
dictInvalidFileType: 'Eine Datei dieses Typs kann nicht hochgeladen werden',
|
||||
dictResponseError: "Der Server hat ihre Anfrage mit Status error abgelehnt",
|
||||
dictCancelUpload: 'Hochladen abbrechen',
|
||||
dictCancelUploadConfirmation: null,
|
||||
dictRemoveFile: 'Datei entfernen',
|
||||
dictMaxFilesExceeded: 'Sie können keine weiteren Dateien mehr hochladen',
|
||||
acceptedFiles: "image/jpeg,image/pjpeg,image/png,image/gif,application/pdf,text/plain",
|
||||
// The setting up of the dropzone
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
init:function() {
|
||||
this.on("removedfile", function(file) {
|
||||
var _ele = $('.alert-danger');
|
||||
_ele.fadeOut();
|
||||
|
||||
});
|
||||
this.on("addedfile", function (file) {
|
||||
var _ele = $('.alert-danger');
|
||||
_ele.fadeOut();
|
||||
});
|
||||
},
|
||||
error: function(file, response) {
|
||||
var message
|
||||
if($.type(response) === "string")
|
||||
message = response; //dropzone sends it's own error messages in string
|
||||
else
|
||||
message = response.message;
|
||||
var _ele = $('.alert-danger');
|
||||
_ele.fadeIn();
|
||||
console.log(message);
|
||||
_ele.text(message);
|
||||
},
|
||||
success: function(file, response) {
|
||||
console.log(file);
|
||||
console.log(response);
|
||||
if(response.error === false){
|
||||
if(response.redirect){
|
||||
window.location.href = response.redirect
|
||||
}else{
|
||||
//window.location.href = window.location.href; //This is a possibility
|
||||
window.location.reload(); //Another possiblity
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
|
@ -41,33 +41,94 @@
|
|||
<label class="form-label" for="title">{{ __('Reisetitel') }}</label>
|
||||
{{ Form::text('title', $booking->title, array('placeholder'=>__('Reisetitel'), 'class'=>'form-control', 'id'=>'title', 'readonly')) }}
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<hr>
|
||||
<h5 class="card-title mt-3 mb-1">Status</h5>
|
||||
<hr class="mt-0">
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="paying_out">{{ __('K-Wunsch') }}</label>
|
||||
{{ Form::select('paying_out', \App\Models\Booking::$paying_out_types , $booking->paying_out, array('class'=>'custom-select', 'id'=>'paying_out' )) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="paying_out_status">{{ __('KW-Status') }}</label>
|
||||
{{ Form::select('paying_out_status', \App\Models\Booking::$paying_out_status_types , $booking->paying_out_status, array('class'=>'custom-select', 'id'=>'paying_out_status' )) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="refund">{{ __('Refund') }}</label>
|
||||
{{ Form::select('refund', \App\Models\Booking::$refund_types , $booking->refund, array('class'=>'custom-select', 'id'=>'refund' )) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="refund_date">{{ __('Refund Datum') }}</label>
|
||||
{{ Form::text('refund_date', _format_date($booking->refund_date), array('placeholder'=>__('Refund Datum'), 'class'=>'form-control datepicker-base', 'id'=>'refund_date')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="xx_tkt">{{ __('XX TKT') }}</label>
|
||||
{{ Form::select('xx_tkt', \App\Models\Booking::$xx_tkt_types , $booking->xx_tkt, array('class'=>'custom-select', 'id'=>'xx_tkt' )) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="xx_tkt_date">{{ __('XX TKT Datum') }}</label>
|
||||
{{ Form::text('xx_tkt_date', _format_date($booking->xx_tkt_date), array('placeholder'=>__('XX TKT Datum'), 'class'=>'form-control datepicker-base', 'id'=>'xx_tkt_date')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="hold">{{ __('Hold') }}</label>
|
||||
{{ Form::select('hold', \App\Models\Booking::$hold_types , $booking->hold, array('class'=>'custom-select', 'id'=>'hold' )) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="airline_id">{{ __('Airline') }}</label>
|
||||
{{ Form::select('airline_id', \App\Models\Airline::getAsNameIdArray() , $booking->airline_id, array('class'=>'custom-select', 'id'=>'airline_id' )) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="filekey">{{ __('Filekey') }}</label>
|
||||
{{ Form::text('filekey', $booking->filekey, array('placeholder'=>__('Filekey'), 'class'=>'form-control', 'id'=>'filekey')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for=""> </label>
|
||||
<label class="custom-control custom-checkbox mt-2" style="margin-right: 20px;">
|
||||
{!! Form::checkbox('is_rail_fly', 1, $booking->is_rail_fly, ['class'=>'custom-control-input', 'id'=>'is_rail_fly']) !!}
|
||||
<span class="custom-control-label">{{__('Rail & Fly')}}</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="lawyer_date">{{ __('Anwaltsfrist') }}</label>
|
||||
{{ Form::text('lawyer_date', _format_date($booking->lawyer_date), array('placeholder'=>__('Anwaltsfrist'), 'class'=>'form-control datepicker-base', 'id'=>'lawyer_date')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<label class="form-label" for="paying_out">{{ __('K-Wunsch') }}</label>
|
||||
{{ Form::text('paying_out', $booking->getPayingOutType(), array('placeholder'=>__('K-Wunsch'), 'class'=>'form-control', 'id'=>'paying_out', 'readonly')) }}
|
||||
<div class="form-group col-sm-12 col-md-12">
|
||||
<label class="form-label" for="notice">{{ __('Bemerkung') }}</label>
|
||||
{{ Form::text('notice', $booking->notice, array('placeholder'=>__('Bemerkung'), 'class'=>'form-control', 'id'=>'notice')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<label class="form-label" for="paying_out_status">{{ __('KW-Status') }}</label>
|
||||
{{ Form::text('paying_out_status', $booking->getPayingOutStatusType(), array('placeholder'=>__('KW-Status'), 'class'=>'form-control', 'id'=>'paying_out_status', 'readonly')) }}
|
||||
|
||||
<div class="col-12">
|
||||
<h5 class="card-title mt-3 mb-1">Leistungen</h5>
|
||||
<hr class="mt-0">
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<label class="form-label" for="refund">{{ __('Refund') }}</label>
|
||||
{{ Form::text('refund', $booking->getRefundType(), array('placeholder'=>__('Refund'), 'class'=>'form-control', 'id'=>'refund', 'readonly')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<label class="form-label" for="refund_date">{{ __('Refund Datum') }}</label>
|
||||
{{ Form::text('refund_date', _format_date($booking->refund_date), array('placeholder'=>__('Refund Datum'), 'class'=>'form-control', 'id'=>'refund_date', 'readonly')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<label class="form-label" for="xx_tkt">{{ __('XX TKT') }}</label>
|
||||
{{ Form::text('xx_tkt', $booking->getXxTktType(), array('placeholder'=>__('XX TKT'), 'class'=>'form-control', 'id'=>'xx_tkt', 'readonly')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<label class="form-label" for="xx_tkt_date">{{ __('XX TKT Datum') }}</label>
|
||||
{{ Form::text('xx_tkt_date', _format_date($booking->xx_tkt_date), array('placeholder'=>__('XX TKT Datum'), 'class'=>'form-control', 'id'=>'xx_tkt_date', 'readonly')) }}
|
||||
|
||||
@foreach($booking->travel_country->getContactLandsModels() as $TravelCountry)
|
||||
@if($TravelCountry->stern_travel_country)
|
||||
@foreach($TravelCountry->stern_travel_country->travel_country_services as $travel_country_service)
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<label class="switcher switcher-on-off">
|
||||
{{ Form::hidden('country_service['.$travel_country_service->id.']', 0) }}
|
||||
{{ Form::checkbox('country_service['.$travel_country_service->id.']', 1, \App\Models\BookingCountryService::getStatus($travel_country_service->id, $booking->id), array('class'=>'switcher-input')) }}
|
||||
<span class="switcher-indicator">
|
||||
<span class="switcher-yes"><span class="ion ion-md-checkmark"></span></span>
|
||||
<span class="switcher-no"><span class="ion ion-md-close"></span></span>
|
||||
</span>
|
||||
<span class="switcher-label">{{ $travel_country_service->name }}</span>
|
||||
</label>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
<div class="col-12">
|
||||
<hr>
|
||||
<div class="text-left mt-3">
|
||||
<button type="submit" name="action" value="update_booking" class="btn btn-sm btn-secondary">{{ __('save changes') }}</button>
|
||||
<a href="{{route('bookings')}}" class="btn btn-sm btn-default">{{ __('zur Übersicht') }}</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -180,27 +180,59 @@
|
|||
@endforeach
|
||||
@endif
|
||||
|
||||
@if($security_certificate = \App\Models\CMSContent::getModelBySlug('sicherungsschein-nach-sis651r-pdf'))
|
||||
<tr>
|
||||
<th scope="row">{{$booking_files_count++}}</th>
|
||||
<td>
|
||||
<a target="_blank" href="{{ $security_certificate->getURL() }}" class="badge badge-md badge-next">
|
||||
<i class="fa fa-file-pdf mr-1"></i> {{$security_certificate->name}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ $security_certificate->formatBytes() }}
|
||||
</td>
|
||||
<td>{{\App\Services\Util::_format_date($security_certificate->created_at, 'date')}}</td>
|
||||
<td>
|
||||
<a href="{{ $security_certificate->getURL('download') }}" class="btn btn-xs btn-default"
|
||||
title="Download" data-placement="left" rel="tooltip">
|
||||
<i class="fa fa-download"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@foreach(\App\Services\Booking::contentFiles() as $content_file)
|
||||
@if($file = \App\Models\CMSContent::getModelBySlug($content_file))
|
||||
<tr>
|
||||
<th scope="row">{{$booking_files_count++}}</th>
|
||||
<td>
|
||||
<a target="_blank" href="{{ $file->getURL() }}" class="badge badge-md badge-next">
|
||||
<i class="fa fa-file-pdf mr-1"></i> {{$file->name}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
@if(Auth::user()->isPermission('sua-st-em'))
|
||||
<a href="{{route('admin_settings_emails', ['settings'])}}">E-Mails</a> |
|
||||
@endif
|
||||
{{ $file->formatBytes() }}
|
||||
</td>
|
||||
<td>{{\App\Services\Util::_format_date($file->created_at, 'date')}}</td>
|
||||
<td>
|
||||
<a href="{{ $file->getURL('download') }}" class="btn btn-xs btn-default"
|
||||
title="Download" data-placement="left" rel="tooltip">
|
||||
<i class="fa fa-download"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
@foreach($booking->travel_country->getContactLandsModels() as $TravelCountry)
|
||||
@if($TravelCountry->stern_travel_country)
|
||||
@foreach($TravelCountry->stern_travel_country->general_files as $general_files)
|
||||
<tr>
|
||||
<th scope="row">{{$booking_files_count++}}</th>
|
||||
<td>
|
||||
<a target="_blank" href="{{ $general_files->getURL() }}" class="badge badge-md badge-info">
|
||||
<i class="{{$general_files->getIconExt()}} mr-1"></i> {{$general_files->original_name}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
@if(Auth::user()->isPermission('sua-st-co'))
|
||||
<a href="{{route('admin_settings_travel_country_detail', [$TravelCountry->stern_travel_country->id, 'data'])}}">{{$TravelCountry->stern_travel_country->name }}</a> |
|
||||
@endif
|
||||
{{ $general_files->mine }} | {{ $general_files->formatBytes() }}
|
||||
</td>
|
||||
<td>{{\App\Services\Util::_format_date($general_files->created_at, 'date')}}</td>
|
||||
<td>
|
||||
<a href="{{ $general_files->getURL('download') }}" class="btn btn-xs btn-default"
|
||||
title="Download" data-placement="left" rel="tooltip">
|
||||
<i class="fa fa-download"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
@if($booking->booking_files)
|
||||
@foreach($booking->booking_files as $booking_file)
|
||||
|
|
@ -220,6 +252,8 @@
|
|||
title="Download" data-placement="left" rel="tooltip">
|
||||
<i class="fa fa-download"></i>
|
||||
</a>
|
||||
<a class="ml-2 btn btn-xs btn-danger" href="{{ route('booking_delete', [$booking_file->id, 'booking_file']) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
|
@ -228,8 +262,15 @@
|
|||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="text-right d-block w-100">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal"
|
||||
@if(Auth::user()->isPermission('sua-st-em'))
|
||||
<div class="float-left small">Allgemeine Dateien unter: <a href="{{route('admin_settings_emails', ['settings'])}}">Einstellungen -> E-Mails / Einstellungen</a></div>
|
||||
@endif
|
||||
@if(Auth::user()->isPermission('sua-st-co'))
|
||||
<br><div class="float-left small">Landesspezifische Dateien unter: <a href="{{route('admin_settings_travel_country', [])}}">Einstellungen -> Reieseländer</a></div>
|
||||
@endif
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal"
|
||||
data-target="#modals-load-content"
|
||||
data-id="new-file"
|
||||
data-model="bookingFile"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
<div class="card mb-2">
|
||||
<h6 class="card-header bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseBookingMails" aria-expanded="false" aria-controls="collapseBookingMails">
|
||||
<strong style="line-height: 1.6em">E-Mails</strong>
|
||||
<span class="badge badge-secondary">{{ $booking->customer_mails->count() }}</span>
|
||||
|
||||
</h6>
|
||||
<div class="collapse" id="collapseBookingMails">
|
||||
<div class="container-fluid d-flex align-items-stretch flex-grow-1 p-0">
|
||||
|
|
@ -16,25 +18,25 @@
|
|||
<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-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-customer_mail_subdir="0"
|
||||
data-route="{{ route('booking_modal_load') }}"><i class="ion ion-md-mail-open"></i> E-Mail schreiben</button>
|
||||
|
||||
<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-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-customer_mail_subdir="0"
|
||||
data-route="{{ route('booking_modal_load') }}"><i class="ion ion-md-mail-unread"></i> 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">×</a>
|
||||
|
|
@ -44,40 +46,50 @@
|
|||
|
||||
<style>
|
||||
.sidebox-nav-item {
|
||||
color: #838387 !important;
|
||||
}
|
||||
.sidebox-nav-item_sub {
|
||||
color: #a3a4a6 !important;
|
||||
}
|
||||
.sidebox-nav-item[href]:hover,
|
||||
.sidebox-nav-item[href]:focus {
|
||||
color: #8c8e90 !important;
|
||||
color: #606265 !important;
|
||||
}
|
||||
.sidebox-nav-item.active .item {
|
||||
color: #4E5155 !important;
|
||||
color: #3e4244 !important;
|
||||
font-weight: 700 !important;
|
||||
}
|
||||
</style>
|
||||
<!-- Mail boxes -->
|
||||
|
||||
@foreach(\App\Services\Booking::getCustomerMailDirs() as $customer_mail_dir)
|
||||
@php($badge = $customer_mail_dir->pos === 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($customer_mail_dir->pos === 0) active @endif"
|
||||
data-dir="{{$customer_mail_dir->pos}}" data-subdir="0" data-icon="{{$customer_mail_dir->getArrayContent('icon')}}" data-name="{{$customer_mail_dir->name}}">
|
||||
<div class="item">
|
||||
<i class="ion {{$customer_mail_dir->getArrayContent('icon')}}"></i> {{$customer_mail_dir->name}}
|
||||
</div>
|
||||
<div class="badge {{$badge}}">{{$booking->countCustomerMailsBy($customer_mail_dir->pos)}}</div>
|
||||
</a>
|
||||
@foreach($booking->travel_country->getMailDirs($customer_mail_dir->pos) as $mail_dir_id)
|
||||
@php ($mail_dir_name = \App\Services\Booking::getCustomerMailName($customer_mail_dir, $mail_dir_id))
|
||||
<a href="javascript:void(0)" class="d-flex justify-content-between align-items-center py-1 px-4 sidebox-nav-item sidebox-nav-item_sub"
|
||||
data-dir="{{$customer_mail_dir->pos}}" data-subdir="{{$mail_dir_id}}" data-icon="{{$customer_mail_dir->getArrayContent('icon')}}" data-name="{{$mail_dir_name}}">
|
||||
<div class="item pl-2">
|
||||
<i class="ion {{$customer_mail_dir->getArrayContent('icon')}}"></i> {{$mail_dir_name}}
|
||||
</div>
|
||||
<div class="badge {{$badge}}">{{$booking->countCustomerMailsBy($customer_mail_dir->pos, $mail_dir_id)}}</div>
|
||||
</a>
|
||||
@endforeach
|
||||
@endforeach
|
||||
@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']}}">
|
||||
<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-subdir="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>
|
||||
|
|
@ -110,7 +122,7 @@
|
|||
<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="">
|
||||
<input type="hidden" name="customer_mail_subdir" value="">
|
||||
<table id="datatables-customer-mails" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -3,14 +3,6 @@
|
|||
@section('content')
|
||||
|
||||
<style>
|
||||
/* body {
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}*/
|
||||
.btn-xs {
|
||||
line-height: 1.3em;
|
||||
}
|
||||
|
|
@ -46,23 +38,6 @@
|
|||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
Buchung verwalten
|
||||
</h4>
|
||||
|
||||
{{--
|
||||
<style>
|
||||
[class*="nav-tabs"]
|
||||
{
|
||||
position: fixed;
|
||||
z-index: 9;
|
||||
background-color: #fff;
|
||||
margin-top: -11%; // adjust according to your need
|
||||
}
|
||||
[class*="tab-content"]
|
||||
{
|
||||
margin-top: 5%;
|
||||
}
|
||||
</style>
|
||||
|
||||
--}}
|
||||
<ul class="nav nav-sm nav-tabs nav-justified tabs-alt mb-3" id="top-nav-quick-jump">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="javascript:void(0)" data-collapse="#collapseBookingInfo">
|
||||
|
|
@ -138,6 +113,11 @@
|
|||
|
||||
@include('booking._detail_files')
|
||||
|
||||
<div class="float-right mt-3">
|
||||
<a href="{{route('requests')}}" class="btn btn-sm btn-default">{{ __('zur Übersicht') }}</a>
|
||||
<a href="{{ make_old_url('/index.php/booking/'.$booking->id.'/edit') }}" class="btn btn-sm btn-default float-right">{{ __('zurück ins CRM v2') }}</a>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="modals-load-next">
|
||||
<div class="modal-dialog modal-lg">
|
||||
|
||||
|
|
@ -229,7 +209,6 @@
|
|||
init_site();
|
||||
|
||||
|
||||
|
||||
var oTable = $('#datatables-customer-mails').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
|
|
@ -237,9 +216,10 @@
|
|||
ajax: {
|
||||
url: '{!! route( 'customer_mail_data_table' ) !!}',
|
||||
data: function(d) {
|
||||
d.model = 'CustomerMail';
|
||||
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.customer_mail_subdir = $('#customer_mails_table input[name=customer_mail_subdir]').val();
|
||||
d.data_table_search = $('#dataTableInputSearchField').val();
|
||||
}
|
||||
},
|
||||
|
|
@ -276,10 +256,10 @@
|
|||
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'));
|
||||
$('#customer_mails_table input[name=customer_mail_subdir]').val($(this).data('subdir'));
|
||||
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').data('customer_mail_subdir', $(this).data('subdir'));
|
||||
$('.btn-compare-customer-mails').prop('disabled', false);
|
||||
}else{
|
||||
$('.btn-compare-customer-mails').prop('disabled', true);
|
||||
|
|
@ -291,7 +271,6 @@
|
|||
$('#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');
|
||||
|
||||
});
|
||||
|
||||
$('#dataTableInputSearchField').keyup(function(){
|
||||
|
|
|
|||
|
|
@ -26,7 +26,9 @@
|
|||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal"
|
||||
data-target="#modals-load-content"
|
||||
data-id="new"
|
||||
data-identifier="{{$identifier_content}}"
|
||||
data-model="content"
|
||||
data-back="{{route('cms_content_all')}}"
|
||||
data-route="{{ route('cms_content_all_load_modal') }}"
|
||||
>Neuen Content anlegen</button>
|
||||
</div>
|
||||
|
|
@ -39,7 +41,6 @@
|
|||
<th>{{__('Slug')}}</th>
|
||||
<th>{{__('Inhalt')}}</th>
|
||||
<th>{{__('Type')}}</th>
|
||||
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
@ -49,7 +50,9 @@
|
|||
<td class="not">
|
||||
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="{{ $value->id }}"
|
||||
data-identifier="{{$identifier_content}}"
|
||||
data-model="content"
|
||||
data-back="{{route('cms_content_all')}}"
|
||||
data-route="{{ route('cms_content_all_load_modal') }}">
|
||||
<span class="fa fa-edit"></span>
|
||||
</button>
|
||||
|
|
@ -58,9 +61,7 @@
|
|||
<td>{{ $value->slug }}</td>
|
||||
<td>@if($value->isFile()) {!! $value->getPreviewContent() !!} @else {{ $value->getPreviewContent() }} @endif</td>
|
||||
<td>{{ $value->getFieldName() }}</td>
|
||||
|
||||
<td><a class="text-danger" href="{{ route('cms_content_all_delete', [$value->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a></td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
|
@ -68,12 +69,13 @@
|
|||
<div class="mt-4 mr-4 text-right">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="new"
|
||||
data-identifier="{{$identifier_content}}"
|
||||
data-model="content"
|
||||
data-back="{{route('cms_content_all')}}"
|
||||
data-route="{{ route('cms_content_all_load_modal') }}"
|
||||
>Neuen Content anlegen</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
|
@ -89,8 +91,4 @@
|
|||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
@endsection
|
||||
|
|
@ -1,7 +1,9 @@
|
|||
|
||||
{!! Form::open(['url' => route('cms_content_all_store'), 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
|
||||
{!! Form::open(['url' => route('cms_content_all_store'), 'class' => 'modal-content', 'enctype' => 'multipart/form-data', 'id'=> 'cmsContentForm']) !!}
|
||||
|
||||
<input type="hidden" name="id" id="id" value="{{ $value->id > 0 ? $value->id : 'new' }}">
|
||||
<input type="hidden" name="identifier" id="identifier" value="{{ $value->identifier }}">
|
||||
<input type="hidden" name="back" id="back" value="{{ $data['back'] }}">
|
||||
|
||||
|
||||
<div class="modal-header">
|
||||
|
|
@ -39,7 +41,7 @@
|
|||
|
||||
<div class="form-row show-content-full_text" style="display:none ;">
|
||||
<div class="form-group col">
|
||||
<label for="text" class="form-label">{{ __('Full Text') }}</label>
|
||||
<label for="full_text" class="form-label">{{ __('Full Text') }}</label>
|
||||
{{ Form::textarea('full_text', $value->full_text, array('placeholder'=>__('Full Text'), 'class'=>'form-control', 'rows'=>20)) }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -81,16 +83,20 @@
|
|||
</div>
|
||||
<div class="col-12 mt-2 mb-4">
|
||||
<!-- You can add extra form fields here -->
|
||||
<div class="dropzone" id="fileUpload"></div>
|
||||
<div class="dropzone" id="fileUploadContentForm"></div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="form-row show-field-slug">
|
||||
<div class="form-group col">
|
||||
<label for="name" class="form-label">{{ __('Slug') }}</label>
|
||||
<div class="form-group col-sm-10">
|
||||
<label for="slug" class="form-label">{{ __('Slug') }}</label>
|
||||
{{ Form::text('slug', $value->slug, array('class'=>'form-control')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-2">
|
||||
<label for="pos" class="form-label">{{ __('Position') }}</label>
|
||||
{{ Form::text('pos', $value->pos, array('class'=>'form-control')) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
@ -107,24 +113,30 @@
|
|||
|
||||
$( document ).ready(function() {
|
||||
|
||||
$('div[class*="show-content"]').hide();
|
||||
$('.show-content-'+$('select[name="field"]').val()).show();
|
||||
$('#cmsContentForm div[class*="show-content"]').hide();
|
||||
$('#cmsContentForm .show-content-'+$('#cmsContentForm select[name="field"]').val()).show();
|
||||
|
||||
$('select[name="field"]').on('change', function () {
|
||||
$('div[class*="show-content"]').hide();
|
||||
$('.show-content-'+$(this).val()).show();
|
||||
if($(this).val() == 'file' && $('input[name="id"]').val() == 'new'){
|
||||
function cmsContentShowFileFields(){
|
||||
if($('#cmsContentForm select[name="field"]').val() === 'file' && $('#cmsContentForm input[name="id"]').val() === 'new'){
|
||||
$('.show-field-slug').hide();
|
||||
$('.show-field-name').hide();
|
||||
}else{
|
||||
$('.show-field-slug').show();
|
||||
$('.show-field-name').show();
|
||||
}
|
||||
}
|
||||
cmsContentShowFileFields();
|
||||
|
||||
$('#cmsContentForm select[name="field"]').on('change', function () {
|
||||
$('#cmsContentForm div[class*="show-content"]').hide();
|
||||
$('#cmsContentForm .show-content-'+$(this).val()).show();
|
||||
cmsContentShowFileFields();
|
||||
});
|
||||
|
||||
Dropzone.autoDiscover = false;
|
||||
$("#fileUpload").dropzone({
|
||||
$("#fileUploadContentForm").dropzone({
|
||||
url: "{{route('cms_content_all_store')}}",
|
||||
params: {'identifier':'{{ $value->identifier }}','back':'{{$data['back'] }}'},
|
||||
uploadMultiple: false,
|
||||
parallelUploads: 1,
|
||||
maxFilesize: 32,
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label class="form-label" for="feedback_pagetitle">{{ __('META-Titel (optional)') }}</label>
|
||||
|
|
@ -80,7 +79,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="text-left mt-3">
|
||||
<button type="submit" name="action" value="saveAll" class="btn btn-submit">{{ __('save changes') }}</button>
|
||||
<a href="{{route('cms_feedback')}}" class="btn btn-default">{{ __('back') }}</a>
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@
|
|||
<div class="message-attachment ui-bordered p-2 mr-3 mb-3">
|
||||
<div class="message-attachment-file display-4"><i class="{{$file->getIconExt()}}"></i></div>
|
||||
<div class="media-body ml-3">
|
||||
<strong class="message-attachment-filename">{{$file->filename}}</strong>
|
||||
<strong class="message-attachment-filename">{{$file->original_name}}</strong>
|
||||
<div class="text-muted small">{{$file->formatBytes()}}</div>
|
||||
<div>
|
||||
<a href="{{$file->getURL()}}" target="_blank" class="mail-att-show">Vorschau</a>
|
||||
|
|
|
|||
|
|
@ -154,27 +154,52 @@
|
|||
@endforeach
|
||||
@endif
|
||||
|
||||
@if($security_certificate = \App\Models\CMSContent::getModelBySlug('sicherungsschein-nach-sis651r-pdf'))
|
||||
<tr>
|
||||
<th scope="row">{{$booking_files_count++}}</th>
|
||||
<td>
|
||||
<a target="_blank" href="{{ $security_certificate->getURL() }}" class="badge badge-md badge-next">
|
||||
<i class="fa fa-file-pdf mr-1"></i> {{$security_certificate->name}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ $security_certificate->formatBytes() }}
|
||||
</td>
|
||||
<td>{{\App\Services\Util::_format_date($security_certificate->created_at, 'date')}}</td>
|
||||
<td>
|
||||
<button data-target="{{ $security_certificate->getURL() }}" data-name="{{ $security_certificate->name }}" class="btn btn-xs btn-primary add-file-to-attachment"
|
||||
title="als Anhang hinzufügen" data-placement="left" rel="tooltip">
|
||||
<i class="fa fa-cloud-download-alt"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@foreach(\App\Services\Booking::contentFiles() as $content_file)
|
||||
@if($file = \App\Models\CMSContent::getModelBySlug($content_file))
|
||||
<tr>
|
||||
<th scope="row">{{$booking_files_count++}}</th>
|
||||
<td>
|
||||
<a target="_blank" href="{{ $file->getURL() }}" class="badge badge-md badge-next">
|
||||
<i class="fa fa-file-pdf mr-1"></i> {{$file->name}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ $file->formatBytes() }}
|
||||
</td>
|
||||
<td>{{\App\Services\Util::_format_date($file->created_at, 'date')}}</td>
|
||||
<td>
|
||||
<button data-target="{{ $file->getURL() }}" data-name="{{ $file->name }}" class="btn btn-xs btn-primary add-file-to-attachment"
|
||||
title="als Anhang hinzufügen" data-placement="left" rel="tooltip">
|
||||
<i class="fa fa-cloud-download-alt"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
@foreach($booking->travel_country->getContactLandsModels() as $TravelCountry)
|
||||
@if($TravelCountry->stern_travel_country)
|
||||
@foreach($TravelCountry->stern_travel_country->general_files as $general_files)
|
||||
<tr>
|
||||
<th scope="row">{{$booking_files_count++}}</th>
|
||||
<td>
|
||||
<a target="_blank" href="{{ $general_files->getURL() }}" class="badge badge-md badge-info">
|
||||
<i class="{{$general_files->getIconExt()}} mr-1"></i> {{$general_files->original_name}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ $general_files->mine }} | {{ $general_files->formatBytes() }}
|
||||
</td>
|
||||
<td>{{\App\Services\Util::_format_date($general_files->created_at, 'date')}}</td>
|
||||
<td>
|
||||
<button data-target="{{ $general_files->getURL() }}" data-name="{{ $general_files->original_name }}" class="btn btn-xs btn-primary add-file-to-attachment"
|
||||
title="als Anhang hinzufügen" data-placement="left" rel="tooltip">
|
||||
<i class="fa fa-cloud-download-alt"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
@if($booking->booking_files)
|
||||
@foreach($booking->booking_files as $booking_file)
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -130,8 +130,8 @@
|
|||
<div class="form-group mb-1">
|
||||
<label class="form-label" for="message">Nachricht</label>
|
||||
@if($value->show === 'single' || $value->show === 'multi')
|
||||
@if(Auth::user()->isPermission('sua-st-et'))
|
||||
<div class="float-right small">Vorlage unter: <a href="{{route('admin_settings_email_template')}}">Einstellungen -> E-Mail Vorlagen</a></div>
|
||||
@if(Auth::user()->isPermission('sua-st-em'))
|
||||
<div class="float-right small">Vorlage unter: <a href="{{route('admin_settings_emails')}}">Einstellungen -> E-Mails / Vorlagen</a></div>
|
||||
@endif
|
||||
@endif
|
||||
<div id="message-editor-toolbar">
|
||||
|
|
@ -175,12 +175,21 @@
|
|||
</div>
|
||||
<div class="collapse col-12" id="collapseModalEmailTemplate">
|
||||
<hr class="mt-0">
|
||||
|
||||
<select class="custom-select" name="filter_email_templates_directory" id="filter_email_templates_directory" style="">
|
||||
<option value="">Alle Verzeichniss</option>
|
||||
@foreach($value->filter_email_templates_directories as $id=>$name)
|
||||
<option value="{{$id}}" >{{$name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<div class="table-responsive" id="email_templates_table">
|
||||
<table id="datatables-email-templates" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{__('Betreff')}}</th>
|
||||
<th>{{__('Vorlage Bezeichnung')}}</th>
|
||||
<th>{{__('Verzeichniss')}}</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
@ -197,23 +206,27 @@
|
|||
<div class="col-sm-6">
|
||||
<label for="send_mail_dir" 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
|
||||
@foreach(\App\Services\Booking::getCustomerMailDirs() as $customer_mail_dir)
|
||||
<option value="{{$customer_mail_dir->pos}}" @if($value->customer_mail_dir == $customer_mail_dir->pos) selected @endif>{{$customer_mail_dir->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label for="send_mail_country" class="form-label"> </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>
|
||||
<label for="subdir" class="form-label"> </label>
|
||||
{{-- TODO load subdirs by pos id --}}
|
||||
@if(isset($value->booking) && $value->booking->travel_country)
|
||||
@foreach(\App\Services\Booking::getCustomerMailDirs() as $customer_mail_dir)
|
||||
@if($customer_mail_dir->pos > 0)
|
||||
<select class="custom-select send_mail_subdir" name="subdir" id="send_mail_subdir_{{$customer_mail_dir->pos}}">
|
||||
<option value="0">keinen Unterordner</option>
|
||||
@foreach($value->booking->travel_country->getMailDirs($customer_mail_dir->pos) as $mail_dir_id)
|
||||
@php ($mail_dir_name = \App\Services\Booking::getCustomerMailName($customer_mail_dir, $mail_dir_id))
|
||||
<option value="{{$mail_dir_id}}" @if($value->customer_mail_subdir == $mail_dir_id) selected @endif>{{$mail_dir_name}}</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
</select>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
|
@ -244,7 +257,7 @@
|
|||
<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>
|
||||
<strong class="message-attachment-filename">{{$customer_file->original_name}}</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>
|
||||
|
|
@ -320,22 +333,25 @@
|
|||
$('#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);
|
||||
}
|
||||
function change_mail_subdir_select(){
|
||||
var $dir_id = $('#send_mail_dir').val();
|
||||
$('.send_mail_subdir').each(function () {
|
||||
var send_mail_subdir = 'send_mail_subdir_' + $dir_id;
|
||||
if($(this).attr('id') === send_mail_subdir){
|
||||
$(this).prop('disabled', false);
|
||||
$(this).show();
|
||||
}else{
|
||||
$(this).prop('disabled', true);
|
||||
$(this).val(0);
|
||||
$(this).hide();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
change_dir_country_select();
|
||||
change_mail_subdir_select();
|
||||
$('#send_mail_dir').on('change', function () {
|
||||
change_dir_country_select();
|
||||
change_mail_subdir_select();
|
||||
});
|
||||
if (!window.Quill) {
|
||||
$('#message-editor,#message-editor-toolbar').remove();
|
||||
|
|
@ -344,6 +360,7 @@
|
|||
Quill.register('modules/placeholder', PlaceholderModule.default(Quill))
|
||||
//$('#message-editor-fallback').remove();
|
||||
var quill = new Quill('#message-editor', {
|
||||
debug: 'error',
|
||||
modules: {
|
||||
toolbar: '#message-editor-toolbar',
|
||||
placeholder: {
|
||||
|
|
@ -400,7 +417,6 @@
|
|||
});
|
||||
|
||||
|
||||
|
||||
var emailTempplateTable = $('#datatables-email-templates').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
|
|
@ -408,10 +424,14 @@
|
|||
"autoWidth": false,
|
||||
ajax: {
|
||||
url: '{!! route( 'email_template_data_table' ) !!}',
|
||||
data: function(d) {
|
||||
d.filter_email_templates_directory = $('select[name=filter_email_templates_directory]').val();
|
||||
}
|
||||
},
|
||||
"columns": [
|
||||
{ data: 'id', width: '8%', searchable: true },
|
||||
{ data: 'subject', name: 'subject', width: '', searchable: true },
|
||||
{ data: 'name', name: 'name', width: '', searchable: true },
|
||||
{ data: 'email_template_dir.name', name: 'email_template_dir.name', width: '25%', orderable: false, searchable: false },
|
||||
{ data: 'action', width: '8%', orderable: false, searchable: false},
|
||||
],
|
||||
"bLengthChange": false,
|
||||
|
|
@ -428,6 +448,10 @@
|
|||
});
|
||||
}
|
||||
});
|
||||
$('#filter_email_templates_directory').on('change', function(){
|
||||
emailTempplateTable.draw();
|
||||
});
|
||||
|
||||
function callback_email_template_data_table(data) {
|
||||
if(data.status === 'success'){
|
||||
$('input#subject').val(data.response.subject + $('input#lead_title_id').val());
|
||||
|
|
|
|||
|
|
@ -110,34 +110,40 @@
|
|||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(isset($show_move_dirs))
|
||||
<hr class="border-light m-0">
|
||||
<div class="px-4 pt-4 pb-2">
|
||||
{!! Form::open(['url' => route('customer_mail_detail', [$customer_mail->id, 'move-mail']), 'class' => 'move-mail-form']) !!}
|
||||
<div class="form-row">
|
||||
<div class="col-sm-6">
|
||||
<label for="customer_mail_dir_{{$customer_mail->id}}" class="form-label">Ablegen unter:</label>
|
||||
<select class="custom-select customer_mail_dir" name="dir" id="customer_mail_dir_{{$customer_mail->id}}">
|
||||
@foreach($customer_mail->booking::$customer_mail_dirs as $dir_id=>$customer_mail_dirs)
|
||||
@if($dir_id <= 10)
|
||||
<option value="{{$dir_id}}" @if($customer_mail->dir == $dir_id) selected @endif>{{$customer_mail_dirs['name']}}</option>
|
||||
@endif
|
||||
<label for="customer_mail_dir" class="form-label">Ablegen unter:</label>
|
||||
<select class="custom-select customer_mail_dir" name="dir" id="customer_mail_dir">
|
||||
@foreach(\App\Services\Booking::getCustomerMailDirs() as $customer_mail_dir)
|
||||
<option value="{{$customer_mail_dir->pos}}" @if($customer_mail->dir == $customer_mail_dir->pos) selected @endif>{{$customer_mail_dir->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<button type="submit" class="btn btn-xs btn-default float-right mt-1"><i class="ion ion-ios-redo"></i> verschieben</button>
|
||||
<label for="customer_mail_country_{{$customer_mail->id}}" class="form-label"> </label>
|
||||
<select class="custom-select customer_mail_country" name="travel_country_id" id="customer_mail_country_{{$customer_mail->id}}">
|
||||
@if($customer_mail->booking->travel_country)
|
||||
@foreach($customer_mail->booking->travel_country->getCountryLands() as $country_id => $country_name)
|
||||
<option value="0">Nur bei Agentur -> Land</option>
|
||||
<option value="{{$country_id}}" @if($customer_mail->travel_country_id == $country_id) selected @endif>{{$country_name}}</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
|
||||
<label for="subdir" class="form-label"> </label>
|
||||
{{-- TODO load subdirs by pos id --}}
|
||||
@if($customer_mail->booking->travel_country)
|
||||
@foreach(\App\Services\Booking::getCustomerMailDirs() as $customer_mail_dir)
|
||||
@if($customer_mail_dir->pos > 0)
|
||||
<select class="custom-select customer_mail_subdir" name="subdir" id="customer_mail_subdir_{{$customer_mail_dir->pos}}">
|
||||
<option value="0">keinen Unterordner</option>
|
||||
@foreach($customer_mail->booking->travel_country->getMailDirs($customer_mail_dir->pos) as $mail_dir_id)
|
||||
@php ($mail_dir_name = \App\Services\Booking::getCustomerMailName($customer_mail_dir, $mail_dir_id))
|
||||
<option value="{{$mail_dir_id}}" @if($customer_mail->subdir == $mail_dir_id) selected @endif>{{$mail_dir_name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
@include('customer.mail.modal-show-mail-inner', ['customer_mail' => $customer_mail])
|
||||
@include('customer.mail.modal-show-mail-inner', ['customer_mail' => $customer_mail, 'show_move_dirs' => true])
|
||||
|
||||
@if($customer_mail->customer_mail)
|
||||
@include('customer.mail.modal-show-mail-inner', ['customer_mail' => $customer_mail->customer_mail])
|
||||
|
|
@ -21,26 +21,33 @@
|
|||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function change_dir_country_select(_form){
|
||||
if(_form.find('.customer_mail_dir').val() == 1){
|
||||
_form.find('.customer_mail_country').prop('disabled', false);
|
||||
}else{
|
||||
_form.find('.customer_mail_country').prop('disabled', true);
|
||||
_form.find('.customer_mail_country').val(0);
|
||||
}
|
||||
function change_mail_subdir_select(_form){
|
||||
|
||||
var $dir_id = _form.find('#customer_mail_dir').val();
|
||||
$('.customer_mail_subdir').each(function () {
|
||||
var customer_mail_subdir = 'customer_mail_subdir_' + $dir_id;
|
||||
if($(this).attr('id') === customer_mail_subdir){
|
||||
$(this).prop('disabled', false);
|
||||
$(this).show();
|
||||
}else{
|
||||
$(this).prop('disabled', true);
|
||||
$(this).val(0);
|
||||
$(this).hide();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('form.move-mail-form').each(function () {
|
||||
var _form = $(this);
|
||||
$(this).find('.customer_mail_dir').on('change', function () {
|
||||
change_dir_country_select(_form);
|
||||
change_mail_subdir_select(_form);
|
||||
_form.find('.btn-default').removeClass('btn-default').addClass('btn-primary');
|
||||
});
|
||||
$(this).find('.customer_mail_country').on('change', function () {
|
||||
$(this).find('.customer_mail_subdir').on('change', function () {
|
||||
_form.find('.btn-default').removeClass('btn-default').addClass('btn-primary');
|
||||
});
|
||||
change_dir_country_select(_form);
|
||||
change_mail_subdir_select(_form);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
@ -7,15 +7,15 @@
|
|||
<div class="nav-tabs-top mb-4">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link @if($step == false) active show @endif" data-toggle="tab" href="#navs-top-drafts">Übersicht</a>
|
||||
<a class="nav-link @if(!$step) active show @endif" data-toggle="tab" href="#navs-top-drafts">Übersicht</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link @if($step == 'type') active show @endif" data-toggle="tab" href="#navs-top-draft_types">Typen</a>
|
||||
<a class="nav-link @if($step === 'type') active show @endif" data-toggle="tab" href="#navs-top-draft_types">Typen</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade @if($step == false) active show @endif" id="navs-top-drafts">
|
||||
<div class="tab-pane fade @if(!$step) active show @endif" id="navs-top-drafts">
|
||||
<div class="card">
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="datatables-drafts table table-striped table-bordered">
|
||||
|
|
@ -71,9 +71,8 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade @if($step == 'type') active show @endif" id="navs-top-draft_types">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="tab-pane fade @if($step === 'type') active show @endif" id="navs-top-draft_types">
|
||||
<div class="card">
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="datatables-types table table-striped table-bordered">
|
||||
<thead>
|
||||
|
|
@ -122,7 +121,7 @@
|
|||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="mt-4 text-left">
|
||||
<div class="mt-4 ml-3 text-left">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-type"
|
||||
data-id="new"
|
||||
data-name=""
|
||||
|
|
@ -179,7 +178,6 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
|
|
@ -213,7 +211,6 @@
|
|||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
@yield('styles')
|
||||
|
||||
<!-- Application stylesheets -->
|
||||
<link rel="stylesheet" href="{{ mix('/css/application.css') }}?v=7{{ get_file_last_time('js/application.css') }}">
|
||||
<link rel="stylesheet" href="{{ mix('/css/application.css') }}?v=9{{ 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') }}" />
|
||||
|
|
@ -158,7 +158,7 @@
|
|||
|
||||
<!-- Application javascripts -->
|
||||
<script src="{{ mix('/js/application.js') }}"></script>
|
||||
<script src="{{ asset('/js/custom.js?v=7') }}{{ get_file_last_time('/js/custom.js') }}"></script>
|
||||
<script src="{{ asset('/js/custom.js?v=9') }}{{ get_file_last_time('/js/custom.js') }}"></script>
|
||||
|
||||
|
||||
@include('asset.js')
|
||||
|
|
@ -229,8 +229,6 @@
|
|||
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
|
||||
$('.summernote').summernote({
|
||||
height: 300,
|
||||
tabsize: 2,
|
||||
|
|
|
|||
|
|
@ -214,9 +214,9 @@
|
|||
<a href="{{ route('admin_settings_airline') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-airplane"></i><div>{{ __('Airline') }}</div></a>
|
||||
</li>
|
||||
@endif
|
||||
@if(Auth::user()->isPermission('sua-st-et'))
|
||||
<li class="sidenav-item{{ Request::is('cms/content/email_template') ? ' active' : '' }}">
|
||||
<a href="{{ route('admin_settings_email_template') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-mail"></i><div>{{ __('E-Mail Vorlagen') }}</div></a>
|
||||
@if(Auth::user()->isPermission('sua-st-em'))
|
||||
<li class="sidenav-item{{ Request::is('admin/settings/emails') ? ' active' : '' }}">
|
||||
<a href="{{ route('admin_settings_emails') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-mail"></i><div>{{ __('E-Mails') }}</div></a>
|
||||
</li>
|
||||
@endif
|
||||
@if(Auth::user()->isPermission('sua-st-ke'))
|
||||
|
|
@ -284,48 +284,11 @@
|
|||
</ul>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if(Auth::user()->isPermission('sua-ur-rt'))
|
||||
<li class="sidenav-item{{ Request::is('admin/users') ? ' active' : '' }} {{ Request::is('admin/user/edit/*') ? ' active' : '' }}">
|
||||
<a href="{{ route('admin_users') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-ribbon"></i><div>{{ __('User Rechte') }}</div></a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
|
||||
{{--
|
||||
<li class="sidenav-item @if(Request::is('iq/tools/content/*')) open @endif">
|
||||
<a href="javascript:void(0)" class="sidenav-link sidenav-toggle"><i class="sidenav-icon ion ion-md-apps"></i>
|
||||
<div>Tools</div>
|
||||
</a>
|
||||
<ul class="sidenav-menu">
|
||||
<li class="sidenav-item">
|
||||
<a target="_blank" href="{{route('iq_tools_content_links')}}" class="sidenav-link">
|
||||
<div>Tree from HTML</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
--}}
|
||||
|
||||
|
||||
{{-- <li class="sidenav-item{{ Request::is('admin/translate/*') ? ' open' : '' }}">
|
||||
<a href="javascript:void(0)" class="sidenav-link sidenav-toggle">
|
||||
<i class="sidenav-icon ion ion-ios-browsers"></i>
|
||||
<div>Inhalte</div>
|
||||
</a>
|
||||
|
||||
<ul class="sidenav-menu">
|
||||
<li class="sidenav-item{{ Request::is('admin/translate/file/*') ? ' active' : '' }}">
|
||||
<a href="{{ route('admin_translate_file') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-browsers"></i><div>{{ __('Vorlagen') }}</div></a>
|
||||
</li>
|
||||
<li class="sidenav-item{{ Request::is('admin/translate/all/*') ? ' active' : '' }}">
|
||||
<a href="{{ route('admin_translate_all') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-browsers"></i><div>{{ __('Allgemein') }}</div></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
--}}
|
||||
|
||||
|
||||
@endif
|
||||
|
||||
@if(Auth::user()->isSySAdmin())
|
||||
|
|
|
|||
|
|
@ -1,15 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="{{ url('/') }}">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title></title>
|
||||
{!! Html::style('css/stern_fewo_pdf.css') !!}
|
||||
<style>
|
||||
{!! \App\Services\Util::getURLasContent(asset('/css/stern_fewo_pdf.css')) !!}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="logo_box">
|
||||
<img src="{{asset('images/stern-tours-logo.png')}}">
|
||||
<img src="{{\App\Services\Util::getURLasContent(asset('/images/stern-tours-logo.png'), true)}}" alt="STERNTOURS">
|
||||
</div>
|
||||
|
||||
|
||||
@yield('content')
|
||||
|
||||
<div id="footer_box">
|
||||
|
|
|
|||
|
|
@ -188,6 +188,7 @@
|
|||
<th>{{__('Anreise')}}</th>
|
||||
<th>{{__('Abreise')}}</th>
|
||||
<th>{{__('U.')}}</th>
|
||||
<th>{{__('L.')}}</th>
|
||||
<th>{{__('Sachbearbeiter')}}</th>
|
||||
<th>{{__('Status')}}</th>
|
||||
<th>{{__('E-Mail')}}</th>
|
||||
|
|
@ -266,6 +267,7 @@
|
|||
{ data: 'start_date', name: 'start_date' },
|
||||
{ data: 'end_date', name: 'end_date' },
|
||||
{ data: 'travel_documents', name: 'travel_documents', orderable: false },
|
||||
{ data: 'booking_country_services', name: 'booking_country_services', orderable: false },
|
||||
{ data: 'sf_guard_user_id', name: 'sf_guard_user_id', orderable: false },
|
||||
{ data: 'lead.status_id', name: 'lead.status_id', orderable: false },
|
||||
{ data: 'last_customer_email', name: 'last_customer_email', orderable: true },
|
||||
|
|
@ -302,7 +304,7 @@
|
|||
}
|
||||
} );
|
||||
} );*/
|
||||
this.api().columns(11).every( function () {
|
||||
this.api().columns(13).every( function () {
|
||||
var column = this;
|
||||
var title = $(column.header()).html();
|
||||
var select = $('<select class="selectpicker"><option value="">'+title+'</option></select>')
|
||||
|
|
@ -344,6 +346,21 @@
|
|||
drawCallback: function () {
|
||||
//console.log($('#travel_option_agenda_id').prop('disabled'));
|
||||
//only when is disabled, refesh list is load by other filter.
|
||||
|
||||
$('#datatables-requests [rel="tooltip"]').tooltip({trigger: "hover"});
|
||||
$('#datatables-requests [data-toggle="popover"]').popover({trigger: "hover", content: get_popover_content, html: true,});
|
||||
|
||||
/* $('#datatables-requests [data-toggle="popover"]').hover(function() {
|
||||
var e = $(this);
|
||||
e.off('hover');
|
||||
console.log(e.data('booking_id'))
|
||||
e.popover({content: "test"}).popover('show');
|
||||
/*$.get(e.data('load_id'),function(d) {
|
||||
e.popover({content: d}).popover('show');
|
||||
});
|
||||
});*/
|
||||
|
||||
|
||||
if($('#travel_option_agenda_id').prop('disabled')) {
|
||||
var data = table.ajax.params();
|
||||
//console.log(data);
|
||||
|
|
@ -381,6 +398,41 @@
|
|||
}
|
||||
});
|
||||
|
||||
|
||||
function get_popover_content() {
|
||||
|
||||
|
||||
|
||||
if ($(this).data('booking_id')) {
|
||||
var data = {};
|
||||
data['action'] = 'get_popover_booking_services';
|
||||
data['booking_id'] = $(this).data('booking_id');
|
||||
$(this).addClass("loading");
|
||||
var icontent = $.ajax({
|
||||
url: '{!! route( 'data_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";
|
||||
}
|
||||
|
||||
function clearTravelOptionAgenda(){
|
||||
$('#travel_option_agenda_id').empty().prop('disabled', true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,64 +0,0 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
E-Mail Vorlagen
|
||||
</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;"> </th>
|
||||
<th>{{__('Betreff')}}</th>
|
||||
<th>{{__('sichtbar')}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($email_template as $value)
|
||||
<tr>
|
||||
<td data-sort="{{ $value->id }}">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal"
|
||||
data-target="#modals-load-content"
|
||||
data-id="{{ $value->id }}"
|
||||
data-model="emailTemplate"
|
||||
data-action="modal-email-template"
|
||||
data-url=""
|
||||
data-redirect="back"
|
||||
data-route="{{ route('admin_settings_email_template_load') }}"><span class="fa fa-edit"></span></button>
|
||||
</td>
|
||||
<td>{{ $value->subject }}</td>
|
||||
<td data-sort="{{ $value->active }}">{!! \App\Services\HTMLHelper::getActiveIcon($value->active) !!}</td>
|
||||
<td><a class="text-danger" href="{{ route('admin_settings_email_template_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-load-content"
|
||||
data-id="new"
|
||||
data-model="emailTemplate"
|
||||
data-action="modal-email-template"
|
||||
data-url=""
|
||||
data-redirect="back"
|
||||
data-route="{{ route('admin_settings_email_template_load') }}"> Neue E-Mail Vorlage anlegen</button>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
$('.datatables-default').dataTable({
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
"order": [[ 0, "desc" ]],
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
@endsection
|
||||
619
resources/views/settings/emails/index.blade.php
Executable file
619
resources/views/settings/emails/index.blade.php
Executable file
|
|
@ -0,0 +1,619 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
E-Mail Vorlagen
|
||||
</h4>
|
||||
|
||||
<div class="nav-tabs-top mb-4">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link @if(!$step) active show @endif" data-toggle="tab" href="#navs-top-drafts">Vorlagen</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link @if($step === 'directories') active show @endif" data-toggle="tab" href="#navs-top-directories">Verzeichnisse</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link @if($step === 'settings') active show @endif" data-toggle="tab" href="#navs-top-settings">Einstellungen</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="tab-pane fade @if(!$step) active show @endif" id="navs-top-drafts">
|
||||
<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;"> </th>
|
||||
<th>{{__('Vorlage Bezeichnung')}}</th>
|
||||
<th>{{__('Verzeichniss')}}</th>
|
||||
<th>{{__('sichtbar')}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($email_template as $value)
|
||||
<tr>
|
||||
<td data-sort="{{ $value->id }}">
|
||||
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal"
|
||||
data-target="#modals-load-content"
|
||||
data-id="{{ $value->id }}"
|
||||
data-model="emailTemplate"
|
||||
data-action="modal-email-template"
|
||||
data-url=""
|
||||
data-redirect="back"
|
||||
data-route="{{ route('admin_settings_emails_load') }}"><span class="fa fa-edit"></span></button>
|
||||
</td>
|
||||
<td>{{ $value->name }}</td>
|
||||
<td>@if($value->email_template_dir)
|
||||
<span class="badge badge-default" style="background-color: {{$value->email_template_dir->color}}">{{ $value->email_template_dir->name }}</span>
|
||||
@else
|
||||
|
||||
@endif
|
||||
</td>
|
||||
<td data-sort="{{ $value->active }}">{!! \App\Services\HTMLHelper::getActiveIcon($value->active) !!}</td>
|
||||
<td><a class="text-danger" href="{{ route('admin_settings_emails_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-load-content"
|
||||
data-id="new"
|
||||
data-model="emailTemplate"
|
||||
data-action="modal-email-template"
|
||||
data-url=""
|
||||
data-redirect="back"
|
||||
data-route="{{ route('admin_settings_emails_load') }}"> Neue E-Mail Vorlage anlegen</button>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
$('.datatables-default').dataTable({
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
"order": [[ 0, "desc" ]],
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade @if($step === 'directories') active show @endif" id="navs-top-directories">
|
||||
<div class="card">
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="datatables-types table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="max-width: 60px;"> </th>
|
||||
<th style="width: 2%;">{{__('POS')}}</th>
|
||||
<th>{{__('Name')}}</th>
|
||||
<th>{{__('Farbe')}}</th>
|
||||
<th>{{__('sichtbar')}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($email_template_dirs as $value)
|
||||
<tr>
|
||||
<td>
|
||||
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-type"
|
||||
data-id="{{ $value->id }}"
|
||||
data-name="{{ $value->name }}"
|
||||
data-color="{{ $value->color }}"
|
||||
data-active="{{ $value->active }}"
|
||||
data-pos="{{ $value->pos }}">
|
||||
<span class="fa fa-edit"></span>
|
||||
</button>
|
||||
</td>
|
||||
<td>{{ $value->pos }}</td>
|
||||
<td>{{ $value->name }}</td>
|
||||
<td>@if($value->color)
|
||||
<div style="display:inline-block; width: 20px; height: 20px; border: 1px solid #888a85; background-color: {{$value->color}}"></div>
|
||||
{{ $value->color }}
|
||||
@else
|
||||
<div style="display:inline-block; width: 20px; height: 20px; border: 1px solid #888a85; background-color: #fff"></div>
|
||||
@endif
|
||||
</td>
|
||||
<td data-sort="{{ $value->active }}">
|
||||
@if($value->active)
|
||||
<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><a class="text-danger" href="{{ route('draft_type_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 ml-3 text-left">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-type"
|
||||
data-id="new"
|
||||
data-name=""
|
||||
data-active="1"
|
||||
data-pos="0"
|
||||
>Neues Verzeichniss anlegen</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal template -->
|
||||
<div class="modal fade" id="modals-type">
|
||||
<div class="modal-dialog">
|
||||
<form class="modal-content" action="{{ route('admin_settings_emails_update') }}" method="post">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="id">
|
||||
<input type="hidden" class="form-control" name="action" value="email_template_dir">
|
||||
<input type="hidden" class="form-control" name="step" value="directories">
|
||||
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Verzeichniss <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">Name*</label>
|
||||
<input type="text" class="form-control" name="name" placeholder="{{__('Description')}}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="pos" class="form-label">POS*</label>
|
||||
<input type="text" class="form-control" name="pos" placeholder="{{__('Position')}}" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="name" class="form-label">Farbe*</label>
|
||||
<input type="text" name="color" id="minicolors-hue" class="form-control" value="#fff">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox m-0">
|
||||
<input type="checkbox" class="custom-control-input" name="active" checked>
|
||||
<span class="custom-control-label">{{__('sichtbar')}}</span>
|
||||
</label>
|
||||
</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() {
|
||||
|
||||
$('#minicolors-hue').minicolors({
|
||||
control: 'hue',
|
||||
position: 'bottom ' + 'left',
|
||||
});
|
||||
|
||||
$('#modals-type').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='pos']").val(button.data('pos'));
|
||||
color = '#fff';
|
||||
if(button.data('color') != ""){
|
||||
color = button.data('color');
|
||||
}
|
||||
$('#minicolors-hue').minicolors('value', color);
|
||||
|
||||
// $('.selectpicker').selectpicker('refresh');
|
||||
$(this).find(".modal-body input[name='active']").prop( "checked", button.data('active'));
|
||||
});
|
||||
|
||||
$('.datatables-types').dataTable({
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
"order": [[ 1, "desc" ]],
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade @if($step === 'settings') active show @endif" id="navs-top-settings">
|
||||
<div class="card">
|
||||
<h4 class="mt-4 mb-2 ml-4">Ordner für Buchungen/E-Mail Ablage</h4>
|
||||
<p class="ml-4">Unterordner werden für das jeweilige Reiseland der Buchung unter <a href="{{route('admin_settings_travel_country')}}">Reiseländer</a> -> Land / E-Mails zugewiesen </p>
|
||||
<div class="card-datatable table-responsive pt-0">
|
||||
<table class="datatables-customer-mail-dirs table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="max-width: 60px;"> </th>
|
||||
<th style="width: 2%;">{{__('ID')}}</th>
|
||||
<th>{{__('Name')}}</th>
|
||||
<th>{{__('Icon')}}</th>
|
||||
<th>{{__('Model')}}</th>
|
||||
<th>{{__('E-Mails')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php($next_customer_mail_dir_id = 0)
|
||||
@foreach($customer_mail_dirs as $customer_mail_dir)
|
||||
<tr>
|
||||
<td class="not">
|
||||
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-customer-mail-dirs"
|
||||
data-id="{{$customer_mail_dir->id}}"
|
||||
data-icon="{{$customer_mail_dir->getArrayContent('icon')}}"
|
||||
data-model="{{$customer_mail_dir->getArrayContent('model')}}"
|
||||
data-emails="{{\App\Services\Util::_implodeLines($customer_mail_dir->getArrayContent('emails'))}}"
|
||||
data-name="{{$customer_mail_dir->name}}"
|
||||
data-pos="{{$customer_mail_dir->pos}}">
|
||||
<span class="fa fa-edit"></span>
|
||||
</button>
|
||||
</td>
|
||||
<td>{{ $customer_mail_dir->pos }}</td>
|
||||
<td>{{ $customer_mail_dir->name }}</td>
|
||||
<td>{{ $customer_mail_dir->getArrayContent('icon') }}</td>
|
||||
<td>{{ $customer_mail_dir->getArrayContent('model') }}</td>
|
||||
<td>
|
||||
{!! \App\Services\Util::_implodeLines( $customer_mail_dir->getArrayContent('emails'), "<br>") !!}
|
||||
</td>
|
||||
{{-- <td><a class="text-danger" href="" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a></td> --}}
|
||||
</tr>
|
||||
@php($next_customer_mail_dir_id = $customer_mail_dir->pos+1)
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="mt-4 ml-3 text-left">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-customer-mail-dirs"
|
||||
data-id="new"
|
||||
data-icon=""
|
||||
data-model=""
|
||||
data-emails=""
|
||||
data-name=""
|
||||
data-pos="{{$next_customer_mail_dir_id}}"
|
||||
>Neuen Ordner anlegen</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal template -->
|
||||
<div class="modal fade" id="modals-customer-mail-dirs">
|
||||
<div class="modal-dialog">
|
||||
<form class="modal-content" action="{{ route('admin_settings_emails_update') }}" method="post">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="id">
|
||||
<input type="hidden" class="form-control" name="action" value="customer_mail_dirs">
|
||||
<input type="hidden" class="form-control" name="step" value="settings">
|
||||
<input type="hidden" class="form-control" name="identifier" value="customer-mail-dirs">
|
||||
<input type="hidden" class="form-control" name="field" value="array">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">E-Mail Ordner <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="pos" class="form-label">ID*</label>
|
||||
<input type="text" class="form-control" name="pos" placeholder="{{__('ID')}}" required>
|
||||
<em>Die ID definiert die Zuweisung der E-Mails in die jeweiligen Ordner, bei Änderungen der ID können schon zugeordnete E-Mails nicht mehr angezeigt werden.</em>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="name" class="form-label">Name*</label>
|
||||
<input type="text" class="form-control" name="name" placeholder="{{__('Description')}}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="icon" class="form-label">Icon*</label>
|
||||
<input type="text" class="form-control" name="icon" placeholder="{{__('Icon')}}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="model" class="form-label">Model <span class="text-muted">(wird benötigt um Unterordner unter Reiseländer zuzuweisen)</span></label>
|
||||
<input type="text" class="form-control" name="model" placeholder="{{__('Model')}}">
|
||||
<em>Das Model das muss vorab in der Programmierung erfasst werden.</em>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label class="form-label" for="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="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>
|
||||
<hr>
|
||||
<h4 class="mt-2 mb-0 ml-4">Allgemeine PDF Dateien für Buchungen/E-Mail-Anhänge</h4>
|
||||
<div class="card-datatable table-responsive pt-0">
|
||||
<table class="datatables-booking-email-files table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="max-width: 60px;"> </th>
|
||||
<th style="width: 2%;">{{__('POS')}}</th>
|
||||
<th>{{__('Name')}}</th>
|
||||
<th>{{__('Slug')}}</th>
|
||||
<th>{{__('Inhalt')}}</th>
|
||||
<th>{{__('Type')}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($booking_email_files as $value)
|
||||
<tr>
|
||||
<td class="not">
|
||||
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="{{ $value->id }}"
|
||||
data-pos="{{ $value->pos }}"
|
||||
data-identifier="{{$identifier_booking_file}}"
|
||||
data-model="content"
|
||||
data-back="{{route('admin_settings_emails', ['settings'])}}"
|
||||
data-route="{{ route('cms_content_all_load_modal') }}">
|
||||
<span class="fa fa-edit"></span>
|
||||
</button>
|
||||
</td>
|
||||
<td>{{ $value->pos }}</td>
|
||||
<td>{{ $value->name }}</td>
|
||||
<td>{{ $value->slug }}</td>
|
||||
<td>@if($value->isFile()) {!! $value->getPreviewContent() !!} @else {{ $value->getPreviewContent() }} @endif</td>
|
||||
<td>{{ $value->getFieldName() }}</td>
|
||||
<td><a class="text-danger" href="{{ route('cms_content_all_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 ml-3 text-left">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="new"
|
||||
data-identifier="{{$identifier_booking_file}}"
|
||||
data-field="file"
|
||||
data-model="content"
|
||||
data-back="{{route('admin_settings_emails', ['settings'])}}"
|
||||
data-route="{{ route('cms_content_all_load_modal') }}"
|
||||
>Neue Datei anlegen</button>
|
||||
</div>
|
||||
</div>
|
||||
<hr><hr>
|
||||
|
||||
<!-- FEWO -->
|
||||
<h4 class="mt-4 mb-2 ml-4">Ordner für FeWo/E-Mail Ablage</h4>
|
||||
<div class="card-datatable table-responsive pt-0">
|
||||
<table class="datatables-customer-fewo-mail-dirs table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="max-width: 60px;"> </th>
|
||||
<th style="width: 2%;">{{__('ID')}}</th>
|
||||
<th>{{__('Name')}}</th>
|
||||
<th>{{__('Icon')}}</th>
|
||||
<th>{{__('Model')}}</th>
|
||||
<th>{{__('E-Mails')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php($next_customer_fewo_mail_dir_id = 0)
|
||||
@foreach($customer_fewo_mail_dirs as $customer_fewo_mail_dir)
|
||||
<tr>
|
||||
<td class="not">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-customer-fewo-mail-dirs"
|
||||
data-id="{{$customer_fewo_mail_dir->id}}"
|
||||
data-icon="{{$customer_fewo_mail_dir->getArrayContent('icon')}}"
|
||||
data-model="{{$customer_fewo_mail_dir->getArrayContent('model')}}"
|
||||
data-emails="{{\App\Services\Util::_implodeLines($customer_fewo_mail_dir->getArrayContent('emails'))}}"
|
||||
data-name="{{$customer_fewo_mail_dir->name}}"
|
||||
data-pos="{{$customer_fewo_mail_dir->pos}}">
|
||||
<span class="fa fa-edit"></span>
|
||||
</button>
|
||||
</td>
|
||||
<td>{{ $customer_fewo_mail_dir->pos }}</td>
|
||||
<td>{{ $customer_fewo_mail_dir->name }}</td>
|
||||
<td>{{ $customer_fewo_mail_dir->getArrayContent('icon') }}</td>
|
||||
<td>{{ $customer_fewo_mail_dir->getArrayContent('model') }}</td>
|
||||
<td>
|
||||
{!! \App\Services\Util::_implodeLines( $customer_fewo_mail_dir->getArrayContent('emails'), "<br>") !!}
|
||||
</td>
|
||||
{{-- <td><a class="text-danger" href="" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a></td> --}}
|
||||
</tr>
|
||||
@php($next_customer_fewo_mail_dir_id = $customer_fewo_mail_dir->pos+1)
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="mt-4 ml-3 text-left">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-customer-fewo-mail-dirs"
|
||||
data-id="new"
|
||||
data-icon=""
|
||||
data-model=""
|
||||
data-emails=""
|
||||
data-name=""
|
||||
data-pos="{{$next_customer_fewo_mail_dir_id}}"
|
||||
>Neuen Ordner anlegen</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal template -->
|
||||
<div class="modal fade" id="modals-customer-fewo-mail-dirs">
|
||||
<div class="modal-dialog">
|
||||
<form class="modal-content" action="{{ route('admin_settings_emails_update') }}" method="post">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="id">
|
||||
<input type="hidden" class="form-control" name="action" value="customer_mail_dirs">
|
||||
<input type="hidden" class="form-control" name="step" value="settings">
|
||||
<input type="hidden" class="form-control" name="identifier" value="customer-fewo-mail-dirs">
|
||||
<input type="hidden" class="form-control" name="field" value="array">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">E-Mail Ordner <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="pos" class="form-label">ID*</label>
|
||||
<input type="text" class="form-control" name="pos" placeholder="{{__('ID')}}" required>
|
||||
<em>Die ID definiert die Zuweisung der E-Mails in die jeweiligen Ordner, bei Änderungen der ID können schon zugeordnete E-Mails nicht mehr angezeigt werden.</em>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="name" class="form-label">Name*</label>
|
||||
<input type="text" class="form-control" name="name" placeholder="{{__('Description')}}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="icon" class="form-label">Icon*</label>
|
||||
<input type="text" class="form-control" name="icon" placeholder="{{__('Icon')}}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="model" class="form-label">Model <span class="text-muted">(wird benötigt um Unterordner unter Reiseländer zuzuweisen)</span></label>
|
||||
<input type="text" class="form-control" name="model" placeholder="{{__('Model')}}">
|
||||
<em>Das Model das muss vorab in der Programmierung erfasst werden.</em>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label class="form-label" for="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="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>
|
||||
|
||||
<hr>
|
||||
<h4 class="mt-2 mb-0 ml-4">Allgemeine PDF Dateien für FeWo/E-Mail-Anhänge</h4>
|
||||
<div class="card-datatable table-responsive pt-0">
|
||||
<table class="datatables-fewo-email-files table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="max-width: 60px;"> </th>
|
||||
<th style="width: 2%;">{{__('POS')}}</th>
|
||||
<th>{{__('Name')}}</th>
|
||||
<th>{{__('Slug')}}</th>
|
||||
<th>{{__('Inhalt')}}</th>
|
||||
<th>{{__('Type')}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($fewo_email_files as $value)
|
||||
<tr>
|
||||
<td class="not">
|
||||
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="{{ $value->id }}"
|
||||
data-pos="{{ $value->pos }}"
|
||||
data-identifier="{{$identifier_fewo_file}}"
|
||||
data-model="content"
|
||||
data-back="{{route('admin_settings_emails', ['settings'])}}"
|
||||
data-route="{{ route('cms_content_all_load_modal') }}">
|
||||
<span class="fa fa-edit"></span>
|
||||
</button>
|
||||
</td>
|
||||
<td>{{ $value->pos }}</td>
|
||||
<td>{{ $value->name }}</td>
|
||||
<td>{{ $value->slug }}</td>
|
||||
<td>@if($value->isFile()) {!! $value->getPreviewContent() !!} @else {{ $value->getPreviewContent() }} @endif</td>
|
||||
<td>{{ $value->getFieldName() }}</td>
|
||||
<td><a class="text-danger" href="{{ route('cms_content_all_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 ml-3 text-left">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="new"
|
||||
data-identifier="{{$identifier_fewo_file}}"
|
||||
data-field="file"
|
||||
data-model="content"
|
||||
data-back="{{route('admin_settings_emails', ['settings'])}}"
|
||||
data-route="{{ route('cms_content_all_load_modal') }}"
|
||||
>Neue Datei anlegen</button>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
$('.datatables-booking-email-files').dataTable({
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
"order": [[ 1, "desc" ]],
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
}
|
||||
});
|
||||
$('.datatables-customer-mail-dirs').dataTable({
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
"order": [[ 1, "asc" ]],
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
}
|
||||
});
|
||||
$('.datatables-customer-fewo-mail-dirs').dataTable({
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
"order": [[ 1, "asc" ]],
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
}
|
||||
});
|
||||
$('.datatables-fewo-email-files').dataTable({
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
"order": [[ 1, "desc" ]],
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
}
|
||||
});
|
||||
|
||||
$('#modals-customer-mail-dirs').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='pos']").val(button.data('pos'));
|
||||
$(this).find(".modal-body input[name='icon']").val(button.data('icon'));
|
||||
$(this).find(".modal-body input[name='model']").val(button.data('model'));
|
||||
$(this).find(".modal-body textarea[name='emails']").val(button.data('emails'));
|
||||
});
|
||||
|
||||
$('#modals-customer-fewo-mail-dirs').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='pos']").val(button.data('pos'));
|
||||
$(this).find(".modal-body input[name='icon']").val(button.data('icon'));
|
||||
$(this).find(".modal-body input[name='model']").val(button.data('model'));
|
||||
$(this).find(".modal-body textarea[name='emails']").val(button.data('emails'));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -1,14 +1,36 @@
|
|||
{!! Form::open([ 'url' => route('admin_settings_email_template_update'), 'method' => 'post', 'class' => 'modal-content' ]) !!}
|
||||
{!! Form::open([ 'url' => route('admin_settings_emails_update'), 'method' => 'post', 'class' => 'modal-content' ]) !!}
|
||||
{{ Form::hidden('action', 'email_template') }}
|
||||
{{ Form::hidden('step', false) }}
|
||||
{{ Form::hidden('id', $value->id) }}
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">E-Mail Vorlagen <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">
|
||||
<label class="form-label" for="filter_service_provider_id">Verzeichniss</label>
|
||||
<select class="custom-select" name="email_template_dir_id" id="email_template_dir_id">
|
||||
<option value="">Kein Verzeichniss</option>
|
||||
@foreach($directories as $directory)
|
||||
<option value="{{$directory->id}}" @if($value->email_template_dir_id === $directory->id) selected @endif>{{$directory->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
</div>
|
||||
<hr>
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="subject" class="form-label">Betreff*</label>
|
||||
{{ Form::text('subject', $value->subject, array('class'=>'form-control', 'required'=>true)) }}
|
||||
<label for="name" class="form-label">Vorlage Bezeichnung*</label>
|
||||
{{ Form::text('name', $value->name, array('class'=>'form-control', 'required'=>true)) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="subject" class="form-label">Betreff</label>
|
||||
{{ Form::text('subject', $value->subject, array('class'=>'form-control')) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
|
|
@ -45,7 +45,6 @@
|
|||
data-name=""
|
||||
data-active="1"
|
||||
data-travelcountry_id="0"
|
||||
|
||||
>Neues Reiseprogramm anlegen</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -16,14 +16,22 @@
|
|||
<a class="nav-link @if($step == false) active show @endif" data-toggle="tab" href="#navs-site">Seite</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link @if($step == 'form') active show @endif" data-toggle="tab" href="#navs-form">Formular</a>
|
||||
<a class="nav-link @if($step === 'form') active show @endif" data-toggle="tab" href="#navs-form">Formular</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link @if($step == 'contact') active show @endif" data-toggle="tab" href="#navs-contact">Kontaktdaten</a>
|
||||
<a class="nav-link @if($step === 'contact') active show @endif" data-toggle="tab" href="#navs-contact">Kontaktdaten</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link @if($step == 'travel') active show @endif" data-toggle="tab" href="#navs-travel">Einreisebestimmungen</a>
|
||||
<a class="nav-link @if($step === 'emails') active show @endif" data-toggle="tab" href="#navs-emails">E-Mails</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link @if($step === 'data') active show @endif" data-toggle="tab" href="#navs-data">PDF-Dateien</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link @if($step === 'services') active show @endif" data-toggle="tab" href="#navs-services">Leistungen</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link @if($step === 'travel') active show @endif" data-toggle="tab" href="#navs-travel">Einreisebestimmungen</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
|
@ -31,6 +39,12 @@
|
|||
<div class="tab-content">
|
||||
<div class="tab-pane fade @if($step == false) active show @endif" id="navs-site">
|
||||
<div class="card-body">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="name">{{ __('Name') }} *</label>
|
||||
{{ Form::text('name', $model->name, array('placeholder'=>__('Name'), 'class'=>'form-control', 'id'=>'name', 'required'=>true)) }}
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<h4>Inhalte für Seite</h4>
|
||||
<div class="form-row">
|
||||
|
|
@ -83,7 +97,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade @if($step == 'form') active show @endif" id="navs-form">
|
||||
<div class="tab-pane fade @if($step === 'form') active show @endif" id="navs-form">
|
||||
<div class="card-body">
|
||||
<br>
|
||||
<h4>Inhalte für Formular</h4>
|
||||
|
|
@ -102,27 +116,20 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade @if($step == 'contact') active show @endif" id="navs-contact">
|
||||
<div class="tab-pane fade @if($step === 'contact') active show @endif" id="navs-contact">
|
||||
<div class="card-body">
|
||||
<h4>Land/Länder für Kontaktdaten definieren</h4>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="contact_lands">Kontaktdaten aus folgenden Ländern nehmen</label>
|
||||
<select class="selectpicker" data-style="btn-default" name="contact_lands[]" multiple>
|
||||
{!! HTMLHelper::getTravelCountriesOptions($model->contact_lands) !!}
|
||||
</select>
|
||||
<em>Land/Länder müssen angeben sein, die Kontaktdaten des Landes (Reiselandes) werden nacheinander im PDF (RA, RB, Voucher) eingefügt.</em>
|
||||
<em>Das Land selbst muss auch hier selbst aufgeführt werden, wenn es angezeicht werden soll. Die Kontaktdaten der definierten Länder (Reiselandes) werden nacheinander am Ende des PDF's (RA, RB, Voucher) eingefügt.</em>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<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', \App\Services\Util::_implodeLines($model->contact_emails), ['class' => 'form-control', 'rows'=>4]) }}
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<h4>Kontaktdaten PDF</h4>
|
||||
<h4>Kontaktdaten im PDF</h4>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="contact_headline">Überschrift</label>
|
||||
|
|
@ -147,7 +154,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<h4>Rückfragen PDF</h4>
|
||||
<h4>Rückfragen im 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>
|
||||
|
|
@ -164,7 +171,161 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade @if($step == 'travel') active show @endif" id="navs-travel">
|
||||
<div class="tab-pane fade @if($step === 'emails') active show @endif" id="navs-emails">
|
||||
<div class="card-body">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="mail_dir_name">Angezeigter Ordnername für dieses Land*</label>
|
||||
{{ Form::text('mail_dir_name', $model->mail_dir_name, array('placeholder'=>__('Name'), 'class'=>'form-control', 'id'=>'name')) }}
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<h4>Vordefinierte E-Mail-Adressen <span class="text-muted">für dieses Reiseland</span></h4>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<div class="form-group col-sm-">
|
||||
<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', \App\Services\Util::_implodeLines($model->contact_emails), ['class' => 'form-control', 'rows'=>4]) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<h4>Unterordner für die E-Mail Ablage für dieses Land</h4>
|
||||
<p>Unterordner können unter <a href="{{route('admin_settings_emails', ['settings'])}}">Einstellungen -> E-Mails / Einstellungen</a> bearbeitet werden</p>
|
||||
<hr>
|
||||
@foreach(App\Services\Booking::getCustomerMailDirs() as $customer_mail_dir)
|
||||
@if($customer_mail_dir->getArrayContent('model'))
|
||||
<h5><i class="ion {{$customer_mail_dir->getArrayContent('icon')}}"></i> {{$customer_mail_dir->name}} <span class="text-muted">angezeigte E-Mail-Ordner</span></h5>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="mail_dirs">Unterordner hinzufügen</label>
|
||||
<select class="selectpicker" data-style="btn-default" name="mail_dirs[{{$customer_mail_dir->pos}}][]" multiple data-live-search="true">
|
||||
{!! HTMLHelper::getCustomerMailDirsOptions($customer_mail_dir, $model->getMailDirs($customer_mail_dir->pos)) !!}
|
||||
</select>
|
||||
<em>Zum jeweiligen Reiseland können hier weitere Unterordner für die E-Mail-Ablage ausgewählt werden.
|
||||
Die vordefinierten E-Mail-Adressen des Reiselandes werden bei einer neuen E-Mail entsprechend einsetzt.</em>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
@endif
|
||||
@endforeach
|
||||
<button type="submit" name="action" value="emails" class="btn btn-submit">{{ __('save changes') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade @if($step === 'data') active show @endif" id="navs-data">
|
||||
<div class="card-body">
|
||||
<br>
|
||||
<h4>PDF-Dateien <span class="text-muted">für dieses Reiseland</span></h4>
|
||||
<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> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if($model->general_files)
|
||||
@php($general_files_count = 1)
|
||||
@foreach($model->general_files as $general_file)
|
||||
<tr>
|
||||
<th scope="row">{{$general_files_count++}}</th>
|
||||
<td>
|
||||
<a target="_blank" href="{{ $general_file->getURL() }}" class="badge badge-md badge-secondary">
|
||||
<i class="{{$general_file->getIconExt()}} mr-1"></i> {{$general_file->original_name}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ $general_file->mine }} | {{ $general_file->formatBytes() }}
|
||||
</td>
|
||||
<td>{{\App\Services\Util::_format_date($general_file->created_at, 'date')}}</td>
|
||||
<td>
|
||||
<a href="{{ $general_file->getURL('download') }}" class="btn btn-xs btn-default"
|
||||
title="Download" data-placement="left" rel="tooltip">
|
||||
<i class="fa fa-download"></i>
|
||||
</a>
|
||||
<a class="ml-2 btn btn-xs btn-danger" href="{{ route('admin_settings_travel_country_delete', [$general_file->id, 'general_file']) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="text-right d-block w-100">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="{{$model->id}}"
|
||||
data-model="GeneralFile"
|
||||
data-action="modal-upload-travel_country-file"
|
||||
data-back="{{route('admin_settings_travel_country_detail', [$model->id, 'data'])}}"
|
||||
data-url="{{ route('modal_load') }}"
|
||||
data-route="{{ route('modal_load') }}"><i class="ion ion-md-cloud-upload"></i> Datei hinzufügen</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade @if($step === 'services') active show @endif" id="navs-services">
|
||||
<div class="card-body">
|
||||
<br>
|
||||
<h4>Länderleistungen/Agenturleistungen <span class="text-muted">für dieses Reiseland</span></h4>
|
||||
<div class="table-responsive" id="booking_files_table">
|
||||
<table class="table table-striped table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 2%;"> </th>
|
||||
<th style="width: 6%;">{{__('POS')}}</th>
|
||||
<th>Leistung</th>
|
||||
<th>Beschreibung</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if($model->travel_country_services)
|
||||
@foreach($model->travel_country_services as $travel_country_service)
|
||||
<tr>
|
||||
<td class="not">
|
||||
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="{{$travel_country_service->id}}"
|
||||
data-model="TravelCountryService"
|
||||
data-action="modal-travel_country-services"
|
||||
data-back="{{route('admin_settings_travel_country_detail', [$model->id, 'services'])}}"
|
||||
data-url="{{ route('admin_settings_travel_country_update', [$model->id]) }}"
|
||||
data-route="{{ route('modal_load') }}"><span class="fa fa-edit"></span></button>
|
||||
</td>
|
||||
<td>{{$travel_country_service->pos }}</td>
|
||||
<td>{{$travel_country_service->name}}</td>
|
||||
<td>{{$travel_country_service->description}}</td>
|
||||
<td>
|
||||
<a class="ml-2 btn btn-xs btn-danger" href="{{ route('admin_settings_travel_country_delete', [$travel_country_service->id, 'country_service']) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="text-right d-block w-100">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="new"
|
||||
data-model="TravelCountryService"
|
||||
data-action="modal-travel_country-services"
|
||||
data-back="{{route('admin_settings_travel_country_detail', [$model->id, 'services'])}}"
|
||||
data-url="{{ route('admin_settings_travel_country_update', [$model->id]) }}"
|
||||
data-route="{{ route('modal_load') }}"><i class="ion ion-md-add-circle"></i> Leistung hinzufügen</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade @if($step === 'travel') active show @endif" id="navs-travel">
|
||||
<div class="card-body">
|
||||
<br>
|
||||
<h4>Einreisebestimmungen</h4>
|
||||
|
|
@ -175,22 +336,16 @@
|
|||
{{ Form::textarea('travel_nationality_requirement['.$travel_nationality->id.']', $model->getNationalityRequirement($travel_nationality->id), ['class' => 'form-control summernote-small', 'id'=>'travel_nationality_requirement_'.$travel_nationality->id]) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endforeach
|
||||
<button type="submit" name="action" value="travel" class="btn btn-submit">{{ __('save changes') }}</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-left mt-3">
|
||||
<a href="{{route('admin_settings_travel_country')}}" class="btn btn-default">{{ __('back') }}</a>
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
<script>
|
||||
|
|
|
|||
|
|
@ -75,7 +75,9 @@
|
|||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="ml-3 mb-2">
|
||||
<a href="{{ route('admin_settings_travel_country_detail', ['new']) }}" class="btn btn-sm btn-primary">Neues Reiseland anlegen</a>
|
||||
</div>
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
|
|
|||
|
|
@ -4,195 +4,69 @@
|
|||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
Programme
|
||||
</h4>
|
||||
<div class="nav-tabs-top mb-4">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link @if($step == false) active show @endif" data-toggle="tab" href="#navs-top-drafts">Übersicht</a>
|
||||
</li>
|
||||
{{--
|
||||
<li class="nav-item">
|
||||
<a class="nav-link @if($step == 'type') active show @endif" data-toggle="tab" href="#navs-top-draft_types">Typen</a>
|
||||
</li>
|
||||
--}}
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade @if($step == false) active show @endif" id="navs-top-drafts">
|
||||
<div class="card">
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="datatables-programms table table-striped table-bordered">
|
||||
<thead>
|
||||
<div class="card">
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="datatables-programms table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="max-width: 60px;"> </th>
|
||||
<th>{{__('Programm')}}</th>
|
||||
<th>{{__('Code')}}</th>
|
||||
{{-- <th>{{__('Keywords')}}</th> --}}
|
||||
<th>{{__('Vorlage')}}</th>
|
||||
<th>{{__('Status')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($travel_programs as $value)
|
||||
<tr>
|
||||
<th style="max-width: 60px;"> </th>
|
||||
<th>{{__('Programm')}}</th>
|
||||
<th>{{__('Code')}}</th>
|
||||
{{-- <th>{{__('Keywords')}}</th> --}}
|
||||
<th>{{__('Vorlage')}}</th>
|
||||
<th>{{__('Status')}}</th>
|
||||
<td>
|
||||
<a href="{{ route('travel_program_detail', [$value->id]) }}" class="btn icon-btn btn-sm btn-primary">
|
||||
<span class="fa fa-edit"></span>
|
||||
</a>
|
||||
</td>
|
||||
<td> <a href="{{ route('travel_program_detail', [$value->id]) }}">{{ $value->title }}</a></td>
|
||||
<td>
|
||||
{{ $value->program_code }}
|
||||
</td>
|
||||
{{--
|
||||
<td>
|
||||
{{ $value->program_code }}
|
||||
</td>
|
||||
--}}
|
||||
<td data-size="{{ $value->hasTravelProgramDrafts() }}">
|
||||
@if($value->hasTravelProgramDrafts())
|
||||
<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 data-sort="{{ $value->status }}">
|
||||
@if($value->status)
|
||||
<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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($travel_programs as $value)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('travel_program_detail', [$value->id]) }}" class="btn icon-btn btn-sm btn-primary">
|
||||
<span class="fa fa-edit"></span>
|
||||
</a>
|
||||
</td>
|
||||
<td> <a href="{{ route('travel_program_detail', [$value->id]) }}">{{ $value->title }}</a></td>
|
||||
<td>
|
||||
{{ $value->program_code }}
|
||||
</td>
|
||||
{{--
|
||||
<td>
|
||||
{{ $value->program_code }}
|
||||
</td>
|
||||
--}}
|
||||
<td data-size="{{ $value->hasTravelProgramDrafts() }}">
|
||||
@if($value->hasTravelProgramDrafts())
|
||||
<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 data-sort="{{ $value->status }}">
|
||||
@if($value->status)
|
||||
<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>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="mt-4 col">
|
||||
</div>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="mt-4 col">
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
$('.datatables-programms').dataTable({
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
$('.datatables-programms').dataTable({
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
{{--
|
||||
<div class="tab-pane fade @if($step == 'type') active show @endif" id="navs-top-draft_types">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="datatables-types table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="max-width: 60px;"> </th>
|
||||
<th>{{__('Name')}}</th>
|
||||
<th>{{__('sichtbar')}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($draft_types as $value)
|
||||
<tr>
|
||||
<td>
|
||||
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-type"
|
||||
data-id="{{ $value->id }}"
|
||||
data-name="{{ $value->name }}"
|
||||
data-active="{{ $value->active }}">
|
||||
<span class="fa fa-edit"></span>
|
||||
</button>
|
||||
</td>
|
||||
<td>{{ $value->name }}</td>
|
||||
<td data-sort="{{ $value->active }}">
|
||||
@if($value->active)
|
||||
<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><a class="text-danger" href="{{ route('draft_type_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">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-type"
|
||||
data-id="new"
|
||||
data-name=""
|
||||
data-active="1"
|
||||
|
||||
>Typ anlegen</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal template -->
|
||||
<div class="modal fade" id="modals-type">
|
||||
<div class="modal-dialog">
|
||||
<form class="modal-content" action="{{ route('draft_type_update') }}" method="post">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="id">
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Vorlagen-Typ <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">Name*</label>
|
||||
<input type="text" class="form-control" name="name" placeholder="{{__('Description')}}" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox m-0">
|
||||
<input type="checkbox" class="custom-control-input" name="active" checked>
|
||||
<span class="custom-control-label">{{__('sichtbar')}}</span>
|
||||
</label>
|
||||
</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-type').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'));
|
||||
$('.selectpicker').selectpicker('refresh');
|
||||
$(this).find(".modal-body input[name='active']").prop( "checked", button.data('active'));
|
||||
});
|
||||
|
||||
$('.datatables-types').dataTable({
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
--}}
|
||||
</div>
|
||||
|
||||
|
||||
@endsection
|
||||
91
resources/views/travel/user/booking/_detail_files.blade.php
Executable file
91
resources/views/travel/user/booking/_detail_files.blade.php
Executable file
|
|
@ -0,0 +1,91 @@
|
|||
<!-- Files -->
|
||||
<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> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach(\App\Services\BookingFewo::contentFiles() as $content_file)
|
||||
@if($file = \App\Models\CMSContent::getModelBySlug($content_file))
|
||||
<tr>
|
||||
<th scope="row">{{$booking_files_count++}}</th>
|
||||
<td>
|
||||
<a target="_blank" href="{{ $file->getURL() }}" class="badge badge-md badge-next">
|
||||
<i class="fa fa-file-pdf mr-1"></i> {{$file->name}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ $file->formatBytes() }}
|
||||
</td>
|
||||
<td>{{\App\Services\Util::_format_date($file->created_at, 'date')}}</td>
|
||||
<td>
|
||||
<a href="{{ $file->getURL('download') }}" class="btn btn-xs btn-default"
|
||||
title="Download" data-placement="left" rel="tooltip">
|
||||
<i class="fa fa-download"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
@if($travel_user_booking_fewo->booking_files)
|
||||
@foreach($travel_user_booking_fewo->booking_files as $booking_file)
|
||||
<tr>
|
||||
<th scope="row">{{$booking_files_count++}}</th>
|
||||
<td>
|
||||
<a target="_blank" href="{{ $booking_file->getURL() }}" class="badge badge-md badge-secondary">
|
||||
<i class="{{$booking_file->getIconExt()}} mr-1"></i> {{$booking_file->original_name}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ $booking_file->mine }} | {{ $booking_file->formatBytes() }}
|
||||
</td>
|
||||
<td>{{\App\Services\Util::_format_date($booking_file->created_at, 'date')}}</td>
|
||||
<td>
|
||||
<a href="{{ $booking_file->getURL('download') }}" class="btn btn-xs btn-default"
|
||||
title="Download" data-placement="left" rel="tooltip">
|
||||
<i class="fa fa-download"></i>
|
||||
</a>
|
||||
<a class="ml-2 btn btn-xs btn-danger" href="{{ route('travel_user_booking_fewo_delete', [$booking_file->id, 'booking_fewo_files']) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="text-right d-block w-100">
|
||||
@if(Auth::user()->isPermission('sua-st-em'))
|
||||
<div class="float-left small">Allgemeine Dateien unter: <a href="{{route('admin_settings_emails', ['settings'])}}">Einstellungen -> E-Mails / Einstellungen</a></div>
|
||||
@endif
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal"
|
||||
data-target="#modals-load-content"
|
||||
data-id="new-file"
|
||||
data-model="TravelUserBookingFile"
|
||||
data-action="modal-upload-booking-file"
|
||||
data-url=""
|
||||
data-redirect="back"
|
||||
data-travel_user_booking_fewo_id="{{$travel_user_booking_fewo->id}}"
|
||||
data-route="{{ route('customer_fewo_modal_load') }}"><i class="ion ion-md-cloud-upload"></i> Datei hinzufügen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -1,6 +1,10 @@
|
|||
|
||||
<div class="card mb-2">
|
||||
<div class="card-body">
|
||||
<div class="card mb-2 border-primary">
|
||||
<h6 class="card-header bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseBookingInfo" aria-expanded="false" aria-controls="collapseBookingInfo">
|
||||
<strong style="line-height: 1.6em"> Kunde / Buchung</strong>
|
||||
</h6>
|
||||
<div class="collapse" id="collapseBookingInfo">
|
||||
<div class="card-body">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label">{{ __('Kunde') }}*
|
||||
|
|
@ -8,7 +12,7 @@
|
|||
{!! '<a href="'.route('travel_user_detail', [$travel_user_booking_fewo->travel_user_id]) .'">'.$travel_user_booking_fewo->travel_user->first_name.' '.$travel_user_booking_fewo->travel_user->last_name.'</a>' !!}
|
||||
@endif</label>
|
||||
<select class="selectpicker" data-style="btn-light" name="travel_user_id" data-live-search="true" required>
|
||||
{!! HTMLHelper::getTravelUserOptions($travel_user_booking_fewo->travel_user_id, "DESC") !!}
|
||||
{!! HTMLHelper::getTravelUserOptions($travel_user_booking_fewo->travel_user_id, "DESC", ($id === "new")) !!}
|
||||
</select>
|
||||
|
||||
|
||||
|
|
@ -77,7 +81,6 @@
|
|||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<div class="form-row">
|
||||
@if(isset($travel_user_booking_fewo->daily_prices))
|
||||
|
|
@ -159,12 +162,14 @@
|
|||
</div>
|
||||
<div class="form-row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<input type="hidden" name="status" value="0">
|
||||
{{-- <div class="form-group">
|
||||
<label class="form-label">{{ __('Status') }}*</label>
|
||||
<select class="selectpicker" data-style="btn-light" name="status" required>
|
||||
{!! \App\Models\TravelUserBookingFewo::getStatuesOptions($travel_user_booking_fewo->status) !!}
|
||||
</select>
|
||||
</div>
|
||||
--}}
|
||||
<div class="form-group">
|
||||
<label class="form-label">{{ __('Kanal') }}*</label>
|
||||
<select class="selectpicker" data-style="btn-light" name="travel_booking_fewo_channel_id" required>
|
||||
|
|
@ -186,190 +191,13 @@
|
|||
</div>
|
||||
<div class="float-right">
|
||||
Letze Änderung: {{ $travel_user_booking_fewo->getLastChangeAt() }}
|
||||
|
||||
</div>
|
||||
<button type="submit" name="action" value="saveAll" class="btn btn-submit btn-sm btn-secondary">{{ __('save changes') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card mb-2">
|
||||
<div class="card-body">
|
||||
@if($travel_user_booking_fewo->isInvoice())
|
||||
<h4>Mietbestätigung / Rechnung <em style="font-size:60%">bei Preis-/Änderungen überschreiben</em>
|
||||
<div class="text-right float-right">
|
||||
<button type="submit" name="action" value="createInvoice" class="btn btn-primary btn-sm" onclick="return confirm('{{__('Rechnung überschreiben?')}}');">{{ __('Mietbestätigung / Rechnung PDF überschreiben') }}</button>
|
||||
</div>
|
||||
</h4>
|
||||
<p><a class="btn btn-secondary btn-sm" target="_blank" href="{{$travel_user_booking_fewo->getInvoiceUrlFile()}}/file?t={{time()}}"><i class="fa fa-file-pdf"></i> Mietbestätigung / Rechnung: {{$travel_user_booking_fewo->getInvoiceFileName()}}</a>
|
||||
<span class="p-1 bage @if($travel_user_booking_fewo->isChangeLowerInvoiceCreate()) badge-success @else badge-danger @endif">
|
||||
Erstellt: <strong>{{$travel_user_booking_fewo->getInvoiceLastModified()}}</strong>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
@else
|
||||
<h4>Mietbestätigung / Rechnung
|
||||
<div class="text-right float-right">
|
||||
<button type="submit" name="action" value="createInvoice" class="btn btn-primary btn-sm">{{ __('Mietbestätigung / Rechnung PDF erstellen') }}</button>
|
||||
</div>
|
||||
</h4>
|
||||
@endif
|
||||
@if($travel_user_booking_fewo->send_user_mail)
|
||||
<table class="table table-striped border-bottom mt-4">
|
||||
<tbody>
|
||||
@foreach($travel_user_booking_fewo->send_user_mail as $send_user_mail)
|
||||
<tr>
|
||||
<td style="width: 25%"><strong>{!! key($send_user_mail) !!}</strong><br>E-Mail versendet.</td>
|
||||
<td><span class="small">{!! nl2br(current($send_user_mail)) !!}</span></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-12 mt-2">
|
||||
{{ Form::textarea('send_mail_user_notice', '', ['placeholder'=>'Wichtige Hinweise in E-Mail, werden nur in die aktuelle E-Mail übernommen', 'class' => 'form-control autoExpand', 'rows'=>1]) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right mt-0">
|
||||
<button type="submit" name="action" value="sendMailtoUser" class="btn btn-primary btn-sm" onclick="return confirm('{{__('E-Mail Mietbestätigung an Mieter versenden?')}}');">{{ __('E-Mail mit Mietbestätigung / Rechnung und Mietbedingungen an Kunden versenden') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if($travel_user_booking_fewo->isInvoice())
|
||||
<div class="card mb-2">
|
||||
<div class="card-body">
|
||||
@if($travel_user_booking_fewo->isTravelInfo())
|
||||
<h4>Anreiseinfo <em style="font-size:60%">bei Änderungen überschreiben</em>
|
||||
<div class="text-right float-right">
|
||||
<button type="submit" name="action" value="createTravelInfo" class="btn btn-primary btn-sm" onclick="return confirm('{{__('Anreiseinfo überschreiben?')}}');">{{ __('Anreiseinfo speichern und PDF überschreiben') }}</button>
|
||||
</div>
|
||||
</h4>
|
||||
<p><a class="btn btn-secondary btn-sm" target="_blank" href="{{$travel_user_booking_fewo->getTravelInfoUrlFile()}}/file?t={{time()}}"><i class="fa fa-file-pdf"></i> {{$travel_user_booking_fewo->getTravelInfoFileName()}}</a>
|
||||
<span class="p-1 bage @if($travel_user_booking_fewo->isChangeLowerTravelInfoCreate()) badge-success @else badge-danger @endif">
|
||||
Erstellt: <strong>{{$travel_user_booking_fewo->getTravelInfoLastModified()}}</strong>
|
||||
</span></p>
|
||||
@else
|
||||
<h4>Anreiseinfo
|
||||
<div class="text-right float-right">
|
||||
<button type="submit" name="action" value="createTravelInfo" class="btn btn-primary btn-sm">{{ __('Anreiseinfo speichern und PDF erstellen') }}</button>
|
||||
</div>
|
||||
</h4>
|
||||
@endif
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<button class="btn btn-default btn-sm " type="button" data-toggle="collapse" data-target="#collapseTravelInfo" aria-expanded="false" aria-controls="collapseTravelInfo">
|
||||
{{ __('Inhalt für das PDF / Mail') }} <i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<div class="collapse mt-2" id="collapseTravelInfo">
|
||||
{{ Form::textarea('info_mail_text', $travel_user_booking_fewo->info_mail_text, ['class' => 'form-control autoExpand', 'rows'=>1, 'id'=>'travel_info_user_text']) }}
|
||||
<em>Grundtext in ADMIN CMS > <a href="{{route('cms_content_all')}}">Inhalte</a> > PDF Vorlage Anreiseinfo FeWo</em>
|
||||
<em class="small">(Änderungen werden hier gespeichert.)</em>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if($travel_user_booking_fewo->send_info_mail)
|
||||
<table class="table table-striped border-bottom">
|
||||
<tbody>
|
||||
@foreach($travel_user_booking_fewo->send_info_mail as $send_info_mail)
|
||||
<tr>
|
||||
<td style="width: 25%"><strong>{!! key($send_info_mail) !!}</strong><br>E-Mail versendet.</td>
|
||||
<td><span class="small">{!! nl2br(current($send_info_mail)) !!}</span></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
<div class="text-right mt-0">
|
||||
<button type="submit" name="action" value="sendInfosMailtoUser" class="btn btn-primary btn-sm" onclick="return confirm('{{__('Mail an Mieter versenden?')}}');">{{ __('E-Mail mit Anreiseinfo an Kunden versenden') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if($travel_user_booking_fewo->isInvoice())
|
||||
<div class="card mb-2">
|
||||
<div class="card-body">
|
||||
<h4>Dienstleister Mail</h4>
|
||||
@if($travel_user_booking_fewo->send_service_mail)
|
||||
<table class="table table-striped border-bottom">
|
||||
<tbody>
|
||||
@foreach($travel_user_booking_fewo->send_service_mail as $send_service_mail)
|
||||
<tr>
|
||||
<td style="width: 25%"><strong>{!! $send_service_mail['d'] !!}</strong><br>{{$send_service_mail['m']}}</td>
|
||||
<td>{{$send_service_mail['s']}}<br>
|
||||
<span class="small">{!! nl2br($send_service_mail['c']) !!}</span></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for="send_mail_service_mail">{{ __('E-Mail Adresse Dienstleister') }}</label>
|
||||
{{ Form::text('send_mail_service_mail', 'langosch.birgit@web.de', array('class'=>'form-control')) }}
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for="send_mail_service_subject">{{ __('Betreff E-Mail ') }}</label>
|
||||
{{ Form::text('send_mail_service_subject', $travel_user_booking_fewo->getServiceMailSubject(), ['class' => 'form-control']) }}
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label class="form-label" for="send_mail_service_content">{{ __('Inhalt E-Mail ') }}</label>
|
||||
{{ Form::textarea('send_mail_service_content', $travel_user_booking_fewo->getServiceMailContent(), ['class' => 'form-control autoExpand', 'rows'=>1]) }}
|
||||
<em class="small">(Änderungen gelten nur für das senden der aktuellen E-Mail, werden nicht gespeichert.)</em>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right mt-2">
|
||||
<button type="submit" name="action" value="sendMailtoService" class="btn btn-primary btn-sm" onclick="return confirm('{{__('Mail an Dienstleister vor Ort versenden?')}}');">{{ __('E-Mail an Dienstleister vor Ort versenden') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if($travel_user_booking_fewo->id > 0)
|
||||
<div class="card mb-2">
|
||||
<div class="card-body">
|
||||
<h4>Mitarbeiter Mail</h4>
|
||||
@if($travel_user_booking_fewo->send_employee_mail)
|
||||
<table class="table table-striped border-bottom">
|
||||
<tbody>
|
||||
@foreach($travel_user_booking_fewo->send_employee_mail as $send_employee_mail)
|
||||
<tr>
|
||||
<td style="width: 25%"><strong>{!! $send_employee_mail['d'] !!}</strong><br>
|
||||
@if(is_array($send_employee_mail['m']))
|
||||
{!! implode(",", $send_employee_mail['m']) !!}
|
||||
@else
|
||||
{{$send_employee_mail['m']}}
|
||||
@endif</td>
|
||||
<td>{{$send_employee_mail['s']}}<br>
|
||||
<span class="small">{!! nl2br($send_employee_mail['c']) !!}</span></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for="send_mail_employee_mail">{{ __('E-Mail Adresse Mitarbeiter') }}</label>
|
||||
{{ Form::text('send_mail_employee_mail', $send_mail_employee_mail, array('class'=>'form-control')) }}
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for="send_mail_employee_subject">{{ __('Betreff E-Mail ') }}</label>
|
||||
{{ Form::text('send_mail_employee_subject', $travel_user_booking_fewo->getEmployeeMailSubject(), ['class' => 'form-control']) }}
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label class="form-label" for="send_mail_employee_content">{{ __('Inhalt E-Mail ') }}</label>
|
||||
{{ Form::textarea('send_mail_employee_content', $travel_user_booking_fewo->getEmployeeMailContent(), ['class' => 'form-control autoExpand', 'rows'=>1]) }}
|
||||
<em class="small">(Änderungen gelten nur für das senden der aktuellen E-Mail, werden nicht gespeichert.)</em>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right mt-2">
|
||||
<button type="submit" name="action" value="sendMailtoEmployee" class="btn btn-primary btn-sm" onclick="return confirm('{{__('Mail an Mitarbeiter versenden?')}}');">{{ __('E-Mail an Mitarbeiter versenden') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<script>
|
||||
function floatNumber(n) {
|
||||
|
|
@ -378,19 +206,16 @@
|
|||
return parseFloat(n);
|
||||
}
|
||||
|
||||
|
||||
function formatNumber(obj) {
|
||||
n = obj.val();
|
||||
n = n.replace(/\./g, '').replace(',', '.');
|
||||
n = parseFloat(n).toFixed(2);
|
||||
console.log(n);
|
||||
if(isNaN(n)){
|
||||
return obj.val(0);
|
||||
}
|
||||
return obj.val(n.replace(".", ","));
|
||||
}
|
||||
|
||||
|
||||
function check_price_total(){
|
||||
//
|
||||
price_total_float = calculate_price_total();
|
||||
|
|
@ -449,9 +274,6 @@
|
|||
});
|
||||
@endif
|
||||
|
||||
$('#collapseTravelInfo').on('shown.bs.collapse', function () {
|
||||
$('#travel_info_user_text').keyup();
|
||||
});
|
||||
$('input.input-auto-calc').on('change', function () {
|
||||
calculate_price_total(true);
|
||||
check_price_total();
|
||||
115
resources/views/travel/user/booking/_detail_invoice.blade.php
Executable file
115
resources/views/travel/user/booking/_detail_invoice.blade.php
Executable file
|
|
@ -0,0 +1,115 @@
|
|||
<div class="card mb-2 border-primary">
|
||||
<h6 class="card-header bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseBookingInvoice" aria-expanded="false" aria-controls="collapseBookingInvoice">
|
||||
@if($travel_user_booking_fewo->isInvoice())
|
||||
<span class="badge badge-outline-secondary"><i class="fa fa-check-circle"></i></span>
|
||||
@endif
|
||||
<strong style="line-height: 1.6em">Mietbestätigung / Rechnung</strong>
|
||||
<span class="badge badge-secondary">{{my_count($travel_user_booking_fewo->send_user_mail)}}</span>
|
||||
</h6>
|
||||
<div class="collapse" id="collapseBookingInvoice">
|
||||
<div class="card-body">
|
||||
@if($travel_user_booking_fewo->isInvoice())
|
||||
<h4><em style="font-size:60%">bei Preis-/Änderungen überschreiben</em>
|
||||
<div class="text-right float-right mb-2">
|
||||
<button type="submit" name="action" value="createInvoice" class="btn btn-primary btn-sm" onclick="return confirm('{{__('Rechnung überschreiben?')}}');">{{ __('Mietbestätigung / Rechnung PDF überschreiben') }}</button>
|
||||
</div>
|
||||
</h4>
|
||||
<p><a class="btn btn-secondary btn-sm" target="_blank" href="{{$travel_user_booking_fewo->getInvoiceUrlFile()}}/file?t={{time()}}"><i class="fa fa-file-pdf"></i> Mietbestätigung / Rechnung: {{$travel_user_booking_fewo->getInvoiceFileName()}}</a>
|
||||
<span class="p-1 bage @if($travel_user_booking_fewo->isChangeLowerInvoiceCreate()) badge-success @else badge-danger @endif">
|
||||
Erstellt: <strong>{{$travel_user_booking_fewo->getInvoiceLastModified()}}</strong>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
@else
|
||||
<h4>
|
||||
<div class="text-right float-right mb-2">
|
||||
<button type="submit" name="action" value="createInvoice" class="btn btn-primary btn-sm">{{ __('Mietbestätigung / Rechnung PDF erstellen') }}</button>
|
||||
</div>
|
||||
</h4>
|
||||
@endif
|
||||
@if($travel_user_booking_fewo->send_user_mail)
|
||||
<table class="table table-striped border-bottom mt-4">
|
||||
<tbody>
|
||||
@foreach($travel_user_booking_fewo->send_user_mail as $send_user_mail)
|
||||
<tr>
|
||||
<td style="width: 25%"><strong>{!! key($send_user_mail) !!}</strong><br>E-Mail versendet.</td>
|
||||
<td><span class="small">{!! nl2br(current($send_user_mail)) !!}</span></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-12 mt-2">
|
||||
{{ Form::textarea('send_mail_user_notice', '', ['placeholder'=>'Wichtige Hinweise in E-Mail, werden nur in die aktuelle E-Mail übernommen', 'class' => 'form-control autoExpand', 'rows'=>1]) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right mt-0">
|
||||
<button type="submit" name="action" value="sendMailtoUser" class="btn btn-primary btn-sm" onclick="return confirm('{{__('E-Mail Mietbestätigung an Mieter versenden?')}}');">{{ __('E-Mail mit Mietbestätigung / Rechnung und Mietbedingungen an Kunden versenden') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if($travel_user_booking_fewo->isInvoice())
|
||||
<div class="card mb-2 border-primary">
|
||||
<h6 class="card-header bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseBookingTravelInfo" aria-expanded="false" aria-controls="collapseBookingTravelInfo">
|
||||
@if($travel_user_booking_fewo->isTravelInfo())
|
||||
<span class="badge badge-outline-secondary"><i class="fa fa-check-circle"></i></span>
|
||||
@endif
|
||||
<strong style="line-height: 1.6em">Anreiseinfo</strong>
|
||||
<span class="badge badge-secondary">{{my_count($travel_user_booking_fewo->send_info_mail)}}</span>
|
||||
</h6>
|
||||
<div class="collapse" id="collapseBookingTravelInfo">
|
||||
<div class="card-body">
|
||||
@if($travel_user_booking_fewo->isTravelInfo())
|
||||
<h4> <em style="font-size:60%">bei Änderungen überschreiben</em>
|
||||
<div class="text-right float-right">
|
||||
<button type="submit" name="action" value="createTravelInfo" class="btn btn-primary btn-sm" onclick="return confirm('{{__('Anreiseinfo überschreiben?')}}');">{{ __('Anreiseinfo speichern und PDF überschreiben') }}</button>
|
||||
</div>
|
||||
</h4>
|
||||
<p><a class="btn btn-secondary btn-sm" target="_blank" href="{{$travel_user_booking_fewo->getTravelInfoUrlFile()}}/file?t={{time()}}"><i class="fa fa-file-pdf"></i> {{$travel_user_booking_fewo->getTravelInfoFileName()}}</a>
|
||||
<span class="p-1 bage @if($travel_user_booking_fewo->isChangeLowerTravelInfoCreate()) badge-success @else badge-danger @endif">
|
||||
Erstellt: <strong>{{$travel_user_booking_fewo->getTravelInfoLastModified()}}</strong>
|
||||
</span></p>
|
||||
@else
|
||||
<h4>Anreiseinfo
|
||||
<div class="text-right float-right">
|
||||
<button type="submit" name="action" value="createTravelInfo" class="btn btn-primary btn-sm">{{ __('Anreiseinfo speichern und PDF erstellen') }}</button>
|
||||
</div>
|
||||
</h4>
|
||||
@endif
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<button class="btn btn-default btn-sm " type="button" data-toggle="collapse" data-target="#collapseTravelInfo" aria-expanded="false" aria-controls="collapseTravelInfo">
|
||||
{{ __('Inhalt für das PDF / Mail') }} <i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<div class="collapse mt-2" id="collapseTravelInfo">
|
||||
{{ Form::textarea('info_mail_text', $travel_user_booking_fewo->info_mail_text, ['class' => 'form-control autoExpand', 'rows'=>1, 'id'=>'travel_info_user_text']) }}
|
||||
<em>Grundtext in ADMIN CMS > <a href="{{route('cms_content_all')}}">Inhalte</a> > PDF Vorlage Anreiseinfo FeWo</em>
|
||||
<em class="small">(Änderungen werden hier gespeichert.)</em>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if($travel_user_booking_fewo->send_info_mail)
|
||||
<table class="table table-striped border-bottom">
|
||||
<tbody>
|
||||
@foreach($travel_user_booking_fewo->send_info_mail as $send_info_mail)
|
||||
<tr>
|
||||
<td style="width: 25%"><strong>{!! key($send_info_mail) !!}</strong><br>E-Mail versendet.</td>
|
||||
<td><span class="small">{!! nl2br(current($send_info_mail)) !!}</span></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
<div class="text-right mt-0">
|
||||
<button type="submit" name="action" value="sendInfosMailtoUser" class="btn btn-primary btn-sm" onclick="return confirm('{{__('Mail an Mieter versenden?')}}');">{{ __('E-Mail mit Anreiseinfo an Kunden versenden') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
137
resources/views/travel/user/booking/_detail_mails.blade.php
Executable file
137
resources/views/travel/user/booking/_detail_mails.blade.php
Executable file
|
|
@ -0,0 +1,137 @@
|
|||
<div class="card mb-2">
|
||||
<h6 class="card-header bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseBookingMails" aria-expanded="false" aria-controls="collapseBookingMails">
|
||||
<strong style="line-height: 1.6em">E-Mails</strong>
|
||||
<span class="badge badge-secondary">{{$travel_user_booking_fewo->customer_fewo_mails->count()}}</span>
|
||||
|
||||
</h6>
|
||||
<div class="collapse" id="collapseBookingMails">
|
||||
<div class="container-fluid d-flex align-items-stretch flex-grow-1 p-0">
|
||||
|
||||
<!-- `.messages-wrapper` fills all available space of container -->
|
||||
<div class="messages-wrapper">
|
||||
<!-- Messages sidebox -->
|
||||
<div class="messages-sidebox messages-scroll bg-body border-right">
|
||||
|
||||
<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="CustomerFewoMail"
|
||||
data-action="new-customer-mail"
|
||||
data-url="{{route('customer_fewo_mail_send_mail')}}"
|
||||
data-redirect="back"
|
||||
data-travel_user_booking_fewo_id="{{$travel_user_booking_fewo->id}}"
|
||||
data-customer_mail_dir="0"
|
||||
data-customer_mail_subdir="0"
|
||||
data-route="{{ route('customer_fewo_modal_load') }}"><i class="ion ion-md-mail-open"></i> E-Mail schreiben</button>
|
||||
|
||||
<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="CustomerFewoMail"
|
||||
data-action="reply-customer-mail"
|
||||
data-url="{{route('customer_fewo_mail_reply_mail')}}"
|
||||
data-redirect="back"
|
||||
data-travel_user_booking_fewo_id="{{$travel_user_booking_fewo->id}}"
|
||||
data-customer_mail_dir="0"
|
||||
data-customer_mail_subdir="0"
|
||||
data-route="{{ route('customer_fewo_modal_load') }}"><i class="ion ion-md-mail-unread"></i> 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">×</a>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="border-light mx-4 mt-0 mb-4">
|
||||
|
||||
<style>
|
||||
.sidebox-nav-item {
|
||||
color: #838387 !important;
|
||||
}
|
||||
.sidebox-nav-item_sub {
|
||||
color: #a3a4a6 !important;
|
||||
}
|
||||
.sidebox-nav-item[href]:hover,
|
||||
.sidebox-nav-item[href]:focus {
|
||||
color: #606265 !important;
|
||||
}
|
||||
.sidebox-nav-item.active .item {
|
||||
color: #3e4244 !important;
|
||||
font-weight: 700 !important;
|
||||
}
|
||||
</style>
|
||||
<!-- Mail boxes -->
|
||||
|
||||
@foreach(\App\Services\BookingFewo::getCustomerMailDirs() as $customer_mail_dir)
|
||||
@php($badge = $customer_mail_dir->pos === 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($customer_mail_dir->pos === 0) active @endif"
|
||||
data-dir="{{$customer_mail_dir->pos}}" data-subdir="0" data-icon="{{$customer_mail_dir->getArrayContent('icon')}}" data-name="{{$customer_mail_dir->name}}">
|
||||
<div class="item">
|
||||
<i class="ion {{$customer_mail_dir->getArrayContent('icon')}}"></i> {{$customer_mail_dir->name}}
|
||||
</div>
|
||||
<div class="badge {{$badge}}">{{$travel_user_booking_fewo->countCustomerMailsBy($customer_mail_dir->pos)}}</div>
|
||||
</a>
|
||||
@endforeach
|
||||
@foreach($travel_user_booking_fewo::$customer_mail_dirs as $dir_id => $customer_mail_dir)
|
||||
<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-subdir="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}}">{{$travel_user_booking_fewo->countCustomerMailsBy($dir_id)}}</div>
|
||||
</a>
|
||||
@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">
|
||||
<i id="message-sidebox-title-icon" class="ion ion-ios-filing"></i> <span id="message-sidebox-title-name">Kunde</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="travel_user_booking_fewo_id" value="{{$travel_user_booking_fewo->id}}">
|
||||
<input type="hidden" name="customer_mail_dir" value="0">
|
||||
<input type="hidden" name="customer_mail_subdir" value="">
|
||||
<table id="datatables-customer-mails" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </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>
|
||||
95
resources/views/travel/user/booking/_detail_sm_mails.blade.php
Executable file
95
resources/views/travel/user/booking/_detail_sm_mails.blade.php
Executable file
|
|
@ -0,0 +1,95 @@
|
|||
|
||||
|
||||
@if($travel_user_booking_fewo->isInvoice())
|
||||
<div class="card mb-2 border-primary">
|
||||
<h6 class="card-header bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseBookingSMail" aria-expanded="false" aria-controls="collapseBookingSMail">
|
||||
<strong style="line-height: 1.6em">Dienstleister Mail</strong>
|
||||
<span class="badge badge-secondary">{{my_count($travel_user_booking_fewo->send_service_mail)}}</span>
|
||||
</h6>
|
||||
<div class="collapse" id="collapseBookingSMail">
|
||||
<div class="card-body">
|
||||
@if($travel_user_booking_fewo->send_service_mail)
|
||||
<table class="table table-striped border-bottom">
|
||||
<tbody>
|
||||
@foreach($travel_user_booking_fewo->send_service_mail as $send_service_mail)
|
||||
<tr>
|
||||
<td style="width: 25%"><strong>{!! $send_service_mail['d'] !!}</strong><br>{{$send_service_mail['m']}}</td>
|
||||
<td>{{$send_service_mail['s']}}<br>
|
||||
<span class="small">{!! nl2br($send_service_mail['c']) !!}</span></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for="send_mail_service_mail">{{ __('E-Mail Adresse Dienstleister') }}</label>
|
||||
{{ Form::text('send_mail_service_mail', 'langosch.birgit@web.de', array('class'=>'form-control')) }}
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for="send_mail_service_subject">{{ __('Betreff E-Mail ') }}</label>
|
||||
{{ Form::text('send_mail_service_subject', $travel_user_booking_fewo->getServiceMailSubject(), ['class' => 'form-control']) }}
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label class="form-label" for="send_mail_service_content">{{ __('Inhalt E-Mail ') }}</label>
|
||||
{{ Form::textarea('send_mail_service_content', $travel_user_booking_fewo->getServiceMailContent(), ['class' => 'form-control autoExpand', 'rows'=>1]) }}
|
||||
<em class="small">(Änderungen gelten nur für das senden der aktuellen E-Mail, werden nicht gespeichert.)</em>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right mt-2">
|
||||
<button type="submit" name="action" value="sendMailtoService" class="btn btn-primary btn-sm" onclick="return confirm('{{__('Mail an Dienstleister vor Ort versenden?')}}');">{{ __('E-Mail an Dienstleister vor Ort versenden') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if($travel_user_booking_fewo->id > 0)
|
||||
<div class="card mb-2 border-primary">
|
||||
<h6 class="card-header bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseBookingMMail" aria-expanded="false" aria-controls="collapseBookingMMail">
|
||||
<strong style="line-height: 1.6em">Mitarbeiter Mail</strong>
|
||||
<span class="badge badge-secondary">{{my_count($travel_user_booking_fewo->send_employee_mail)}}</span>
|
||||
</h6>
|
||||
<div class="collapse" id="collapseBookingMMail">
|
||||
<div class="card-body">
|
||||
@if($travel_user_booking_fewo->send_employee_mail)
|
||||
<table class="table table-striped border-bottom">
|
||||
<tbody>
|
||||
@foreach($travel_user_booking_fewo->send_employee_mail as $send_employee_mail)
|
||||
<tr>
|
||||
<td style="width: 25%"><strong>{!! $send_employee_mail['d'] !!}</strong><br>
|
||||
@if(is_array($send_employee_mail['m']))
|
||||
{!! implode(",", $send_employee_mail['m']) !!}
|
||||
@else
|
||||
{{$send_employee_mail['m']}}
|
||||
@endif</td>
|
||||
<td>{{$send_employee_mail['s']}}<br>
|
||||
<span class="small">{!! nl2br($send_employee_mail['c']) !!}</span></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for="send_mail_employee_mail">{{ __('E-Mail Adresse Mitarbeiter') }}</label>
|
||||
{{ Form::text('send_mail_employee_mail', $send_mail_employee_mail, array('class'=>'form-control')) }}
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label" for="send_mail_employee_subject">{{ __('Betreff E-Mail ') }}</label>
|
||||
{{ Form::text('send_mail_employee_subject', $travel_user_booking_fewo->getEmployeeMailSubject(), ['class' => 'form-control']) }}
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label class="form-label" for="send_mail_employee_content">{{ __('Inhalt E-Mail ') }}</label>
|
||||
{{ Form::textarea('send_mail_employee_content', $travel_user_booking_fewo->getEmployeeMailContent(), ['class' => 'form-control autoExpand', 'rows'=>1]) }}
|
||||
<em class="small">(Änderungen gelten nur für das senden der aktuellen E-Mail, werden nicht gespeichert.)</em>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right mt-2">
|
||||
<button type="submit" name="action" value="sendMailtoEmployee" class="btn btn-primary btn-sm" onclick="return confirm('{{__('Mail an Mitarbeiter versenden?')}}');">{{ __('E-Mail an Mitarbeiter versenden') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
|
@ -1,7 +1,33 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
<style>
|
||||
.btn-xs {
|
||||
line-height: 1.3em;
|
||||
}
|
||||
.table tbody + tbody {
|
||||
border-top: 1px solid #9c9c9c;
|
||||
}
|
||||
.table th, .table td {
|
||||
border-top: none;
|
||||
}
|
||||
.table tr.border-none td, .table tr.border-none th {
|
||||
border-top: none;
|
||||
}
|
||||
.table .thead-dark th {
|
||||
color: #4E5155;
|
||||
background-color: rgba(24, 28, 33, 0.1);
|
||||
border-color: rgba(63, 69, 74, 0.1);
|
||||
}
|
||||
|
||||
.input-group-text {
|
||||
padding: 0.438rem 0.475rem;
|
||||
}
|
||||
.badge.indicator:not(.badge-dot) {
|
||||
-webkit-transform: translate(20%, -30%);
|
||||
transform: translate(20%, -30%);
|
||||
}
|
||||
</style>
|
||||
@if ($errors->any())
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
|
|
@ -16,26 +42,225 @@
|
|||
</div>
|
||||
@endif
|
||||
|
||||
{!! Form::open(['url' => route('travel_user_booking_fewo_detail', [$id]), 'class' => 'form-horizontal']) !!}
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
Buchung FeWo @if($id == "new") <span class="text-primary">anlegen</span> @else {{"(ID: ".$id.")"}} verwalten @endif
|
||||
<div class="float-right">
|
||||
<button type="submit" name="action" value="saveAll" class="btn btn-submit btn-sm">{{ __('save changes') }}</button>
|
||||
<a href="{{route('travel_user_booking_fewos')}}" class="btn btn-default btn-sm">{{ __('back') }}</a>
|
||||
</div>
|
||||
</h4>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<input type="hidden" name="id" id="id" value="{{$id}}">
|
||||
@include('travel.user.booking.form')
|
||||
|
||||
<div class="text-left mt-3">
|
||||
<button type="submit" name="action" value="saveAll" class="btn btn-submit">{{ __('save changes') }}</button>
|
||||
<a href="{{route('travel_user_booking_fewos')}}" class="btn btn-default">{{ __('back') }}</a>
|
||||
<div class="float-right mt-3">
|
||||
<a href="{{route('travel_user_booking_fewos')}}" class="btn btn-default btn-sm">{{ __('zur Übersicht') }}</a>
|
||||
</div>
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
Buchung FeWo @if($id === "new") <span class="text-primary">anlegen</span> @else {{"(ID: ".$id.")"}} verwalten @endif
|
||||
</h4>
|
||||
|
||||
|
||||
<ul class="nav nav-sm nav-tabs nav-justified tabs-alt mb-3" id="top-nav-quick-jump">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="javascript:void(0)" data-collapse="#collapseBookingInfo">
|
||||
Kunde / Buchung
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="javascript:void(0)" data-collapse="#collapseBookingInvoice">
|
||||
@if($travel_user_booking_fewo->isInvoice())
|
||||
<span class="badge badge-outline-secondary"><i class="fa fa-check-circle"></i></span>
|
||||
@endif
|
||||
Mietbestätigung
|
||||
<span class="badge badge-outline-primary">{{my_count($travel_user_booking_fewo->send_user_mail)}}</span>
|
||||
</a>
|
||||
</li>
|
||||
@if($travel_user_booking_fewo->isInvoice())
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="javascript:void(0)" data-collapse="#collapseBookingTravelInfo">
|
||||
@if($travel_user_booking_fewo->isTravelInfo())
|
||||
<span class="badge badge-outline-secondary"><i class="fa fa-check-circle"></i></span>
|
||||
@endif
|
||||
Anreiseinfo
|
||||
<span class="badge badge-outline-primary">{{my_count($travel_user_booking_fewo->send_info_mail)}}</span>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@if($travel_user_booking_fewo->isInvoice())
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="javascript:void(0)" data-collapse="#collapseBookingSMail">
|
||||
Dienstleister Mail
|
||||
<span class="badge badge-outline-primary">{{my_count($travel_user_booking_fewo->send_service_mail)}}</span>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@if($travel_user_booking_fewo->id > 0)
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="javascript:void(0)" data-collapse="#collapseBookingMMail">
|
||||
Mitarbeiter Mail
|
||||
<span class="badge badge-outline-primary">{{my_count($travel_user_booking_fewo->send_employee_mail)}}</span>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="javascript:void(0)" data-collapse="#collapseBookingMails">
|
||||
E-Mails
|
||||
<span class="badge badge-outline-primary">{{ $travel_user_booking_fewo->customer_fewo_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>
|
||||
|
||||
{!! Form::open(['url' => route('travel_user_booking_fewo_detail', [$id]), 'class' => 'form-horizontal']) !!}
|
||||
<input type="hidden" name="id" id="id" value="{{$id}}">
|
||||
|
||||
@include('travel.user.booking._detail_info')
|
||||
@if($id !== "new")
|
||||
@include('travel.user.booking._detail_invoice')
|
||||
@include('travel.user.booking._detail_sm_mails')
|
||||
@endif
|
||||
|
||||
{!! Form::close() !!}
|
||||
@if($id !== "new")
|
||||
@include('travel.user.booking._detail_mails')
|
||||
@include('travel.user.booking._detail_files')
|
||||
@endif
|
||||
<div class="float-right mt-2">
|
||||
<a href="{{route('travel_user_booking_fewos')}}" class="btn btn-default btn-sm">{{ __('zur Übersicht') }}</a>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="modals-load-next">
|
||||
<div class="modal-dialog modal-lg">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#collapseTravelInfo').on('shown.bs.collapse', function () {
|
||||
$('#travel_info_user_text').keyup();
|
||||
});
|
||||
|
||||
var collapseHashValue = null;
|
||||
$('[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');
|
||||
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;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$(".collapse").on('shown.bs.collapse', function (){
|
||||
if(collapseHashValue){
|
||||
$('a[data-collapse="#'+collapseHashValue+'"]').click();
|
||||
collapseHashValue = null;
|
||||
}
|
||||
CookiesAddJSONValue('booking_fewo_collapse', $(this).attr('id'));
|
||||
window.location.hash = "#"+$(this).attr('id');
|
||||
|
||||
});
|
||||
|
||||
$(".collapse").on('hidden.bs.collapse', function (){
|
||||
CookiesRemoveJSONValue('booking_fewo_collapse', $(this).attr('id'));
|
||||
});
|
||||
|
||||
function init_site(){
|
||||
if(window.location.hash){
|
||||
value = $(window.location.hash).attr('id');
|
||||
if(value){
|
||||
collapseHashValue = value;
|
||||
CookiesAddJSONValue('booking_fewo_collapse', value);
|
||||
}
|
||||
}
|
||||
var booking_collapses = Cookies.get('booking_fewo_collapse');
|
||||
if (booking_collapses != null)
|
||||
{
|
||||
booking_collapses = JSON.parse(booking_collapses);
|
||||
for (var booking_collapse in booking_collapses){
|
||||
$("#"+booking_collapses[booking_collapse]).collapse("show");
|
||||
}
|
||||
}
|
||||
}
|
||||
init_site();
|
||||
|
||||
var oTable = $('#datatables-customer-mails').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
"searching": false,
|
||||
ajax: {
|
||||
url: '{!! route( 'customer_fewo_mail_data_table' ) !!}',
|
||||
data: function(d) {
|
||||
d.model = 'CustomerFewoMail';
|
||||
d.travel_user_booking_fewo_id = $('#customer_mails_table input[name=travel_user_booking_fewo_id]').val();
|
||||
d.customer_mail_dir = $('#customer_mails_table input[name=customer_mail_dir]').val();
|
||||
d.customer_mail_subdir = $('#customer_mails_table input[name=customer_mail_subdir]').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_customer_mails_data_table);
|
||||
});
|
||||
}
|
||||
});
|
||||
function callback_customer_mails_data_table(data) {
|
||||
if(data.status === 'success'){
|
||||
oTable.draw();
|
||||
}
|
||||
}
|
||||
|
||||
$('.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_subdir]').val($(this).data('subdir'));
|
||||
if($(this).data('dir') <= 10){
|
||||
$('.btn-compare-customer-mails').data('customer_mail_dir', $(this).data('dir'));
|
||||
$('.btn-compare-customer-mails').data('customer_mail_subdir', $(this).data('subdir'));
|
||||
$('.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');
|
||||
});
|
||||
|
||||
$('#dataTableInputSearchField').keyup(function(){
|
||||
oTable.search($(this).val()).draw();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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"]'});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -0,0 +1,78 @@
|
|||
<div class="table-responsive border-bottom mb-2">
|
||||
<table class="table table-striped table-sm" id="table-modal-booking-files">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Datei</th>
|
||||
<th>Inhalt</th>
|
||||
<th>Datum</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php($booking_files_count = 1)
|
||||
|
||||
@foreach(\App\Services\BookingFewo::contentFiles() as $content_file)
|
||||
@if($file = \App\Models\CMSContent::getModelBySlug($content_file))
|
||||
<tr>
|
||||
<th scope="row">{{$booking_files_count++}}</th>
|
||||
<td>
|
||||
<a target="_blank" href="{{ $file->getURL() }}" class="badge badge-md badge-next">
|
||||
<i class="fa fa-file-pdf mr-1"></i> {{$file->name}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ $file->formatBytes() }}
|
||||
</td>
|
||||
<td>{{\App\Services\Util::_format_date($file->created_at, 'date')}}</td>
|
||||
<td>
|
||||
<button data-target="{{ $file->getURL() }}" data-name="{{ $file->name }}" class="btn btn-xs btn-primary add-file-to-attachment"
|
||||
title="als Anhang hinzufügen" data-placement="left" rel="tooltip">
|
||||
<i class="fa fa-cloud-download-alt"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
@if($booking->booking_files)
|
||||
@foreach($booking->booking_files as $booking_file)
|
||||
<tr>
|
||||
<th scope="row">{{$booking_files_count++}}</th>
|
||||
<td>
|
||||
<a target="_blank" href="{{ $booking_file->getURL() }}" class="badge badge-md badge-secondary">
|
||||
<i class="{{$booking_file->getIconExt()}} mr-1"></i> {{ $booking_file->original_name }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ $booking_file->mine }} | {{ $booking_file->formatBytes() }}
|
||||
</td>
|
||||
<td>{{\App\Services\Util::_format_date($booking_file->created_at, 'date')}}</td>
|
||||
<td>
|
||||
<button data-target="{{ $booking_file->getURL() }}" data-name="{{ $booking_file->original_name }}" class="btn btn-xs btn-primary add-file-to-attachment"
|
||||
title="als Anhang hinzufügen" data-placement="left" rel="tooltip">
|
||||
<i class="fa fa-cloud-download-alt"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#table-modal-booking-files [rel="tooltip"]').tooltip({trigger: "hover"});
|
||||
$('#table-modal-booking-files .add-file-to-attachment').on('click', function (event) {
|
||||
var $elem = $('<div/>');
|
||||
$elem.data('action', 'add_attachment');
|
||||
$elem.data('id', 'new');
|
||||
$elem.data('url', '{{route('customer_fewo_mail_ajax')}}');
|
||||
$elem.data('target', $(this).data('target'));
|
||||
$elem.data('name', $(this).data('name'));
|
||||
ajax_object_action(event, $elem, callback_ajax_add_attachment);
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
@ -0,0 +1,512 @@
|
|||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">
|
||||
{{ $value->title }}
|
||||
@if($value->subtitle)
|
||||
<br><small class="text-muted">{{$value->subtitle}}</small>
|
||||
@endif
|
||||
|
||||
</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{!! Form::open(['url' => $value->url, 'class' => '', 'id'=>'customer-mail-form']) !!}
|
||||
{{ Form::hidden('travel_user_booking_fewo_id', $value->id) }}
|
||||
{{ Form::hidden('action', '') }}
|
||||
@if(isset($value->save_customer_mail_id))
|
||||
{{ Form::hidden('save_customer_mail_id', $value->save_customer_mail_id) }}
|
||||
@endif
|
||||
|
||||
@if($value->show === 'single' || $value->show === 'reply')
|
||||
<div class="row">
|
||||
@if(isset($value->booking))
|
||||
<div class="col-sm-4">
|
||||
<strong>Buchung: </strong><br>
|
||||
@if($value->booking->fewo_lodging_id)
|
||||
{{ $value->booking->fewo_lodging->name." | " }}
|
||||
@endif
|
||||
|
||||
({{ $value->booking->id }})
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
@if($value->booking->customer)
|
||||
<strong>Kunde: </strong><br>{{ $value->booking->customer->getSalutation() }} {{ $value->booking->customer->title }} {{ $value->booking->customer->first_name }} {{ $value->booking->customer->last_name }}
|
||||
({{$value->booking->id}})
|
||||
@endif
|
||||
@if($value->booking)
|
||||
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
<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>
|
||||
{{ Form::text('mail_from', $value->booking->travel_user ? $value->booking->travel_user->email : '', array('placeholder'=>'E-Mail Adresse von', 'id'=>'mail_from', 'class'=>'form-control', 'required')) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="sent_at" class="form-label">Gesendet am:</label>
|
||||
{{ Form::text('sent_at', \Carbon::now()->format('d.m.Y H:i'), array('placeholder'=>__(\Carbon::now()->format('d.m.Y - H:i')), 'class'=>'form-control b-material-datetime-picker', 'id'=>'sent_at')) }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
<div class="form-row">
|
||||
{{ Form::hidden('lead_title_id', $value->lead_title_id, array('id'=>'lead_title_id')) }}
|
||||
<div class="form-group col">
|
||||
<label for="subject" class="form-label">Betreff</label>
|
||||
{{ Form::text('subject', $value->subject, array('placeholder'=>$value->s_placeholder, 'id'=>'subject', 'class'=>'form-control', 'required')) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-1">
|
||||
<label class="form-label" for="message">Nachricht</label>
|
||||
@if($value->show === 'single' || $value->show === 'multi')
|
||||
@if(Auth::user()->isPermission('sua-st-em'))
|
||||
<div class="float-right small">Vorlage unter: <a href="{{route('admin_settings_emails')}}">Einstellungen -> E-Mails / Vorlagen</a></div>
|
||||
@endif
|
||||
@endif
|
||||
<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>
|
||||
<span class="ql-formats">
|
||||
<select class="ql-placeholder">
|
||||
{!! \App\Services\Placeholder::getBookingOptions() !!}
|
||||
</select>
|
||||
</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($value->show === 'single' || $value->show === 'multi')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<button type="button" class="btn btn-sm btn-outline-next mt-1 mb-3 float-left" data-toggle="collapse" data-target="#collapseModalEmailTemplate" aria-expanded="false" aria-controls="collapseModalEmailTemplate"><i class="ion ion-ios-mail"></i> E-Mail Vorlage laden</button>
|
||||
</div>
|
||||
<div class="collapse col-12" id="collapseModalEmailTemplate">
|
||||
<hr class="mt-0">
|
||||
|
||||
<select class="custom-select" name="filter_email_templates_directory" id="filter_email_templates_directory" style="">
|
||||
<option value="">Alle Verzeichniss</option>
|
||||
@foreach($value->filter_email_templates_directories as $id=>$name)
|
||||
<option value="{{$id}}" >{{$name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<div class="table-responsive" id="email_templates_table">
|
||||
<table id="datatables-email-templates" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{__('Vorlage Bezeichnung')}}</th>
|
||||
<th>{{__('Verzeichniss')}}</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<hr class="mt-1">
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@if($value->show === 'single' || $value->show === 'reply')
|
||||
<div class="form-row">
|
||||
<div class="col-sm-6">
|
||||
<label for="send_mail_dir" class="form-label">Ablegen unter:</label>
|
||||
<select class="custom-select" name="dir" id="send_mail_dir">
|
||||
@foreach(\App\Services\BookingFewo::getCustomerMailDirs() as $customer_mail_dir)
|
||||
<option value="{{$customer_mail_dir->pos}}" @if($value->customer_mail_dir == $customer_mail_dir->pos) selected @endif>{{$customer_mail_dir->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label for="subdir" class="form-label"> </label>
|
||||
{{-- TODO load subdirs by pos id --}}
|
||||
{{-- @if(isset($value->booking))
|
||||
@foreach(\App\Services\Booking::getCustomerMailDirs() as $customer_mail_dir)
|
||||
@if($customer_mail_dir->pos > 0)
|
||||
<select class="custom-select send_mail_subdir" name="subdir" id="send_mail_subdir_{{$customer_mail_dir->pos}}">
|
||||
<option value="0">keinen Unterordner</option>
|
||||
@foreach($value->booking->travel_country->getMailDirs($customer_mail_dir->pos) as $mail_dir_id)
|
||||
@php ($mail_dir_name = \App\Services\Booking::getCustomerMailName($customer_mail_dir, $mail_dir_id))
|
||||
<option value="{{$mail_dir_id}}" @if($value->customer_mail_subdir == $mail_dir_id) selected @endif>{{$mail_dir_name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
--}}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@if(isset($value->customer_mail))
|
||||
{{ Form::hidden('customer_mail_id', $value->customer_mail->id) }}
|
||||
@endif
|
||||
<hr>
|
||||
{!! Form::close() !!}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@if($value->show === 'single' && isset($value->booking))
|
||||
<button type="button" class="btn btn-sm btn-outline-primary mt-1 mb-2 float-right" data-toggle="collapse" data-target="#collapseModalBookingFiles" aria-expanded="false" aria-controls="collapseModalBookingFiles"><i class="fa fa-plus-circle"></i> Dateien aus Buchung</button>
|
||||
@endif
|
||||
<h5>Datei Anhänge</h5>
|
||||
</div>
|
||||
@if($value->show === 'single' && isset($value->booking))
|
||||
<div class="collapse col-12" id="collapseModalBookingFiles">
|
||||
@include('travel.user.booking.mail.modal-new-booking-files', ['booking'=>$value->booking])
|
||||
</div>
|
||||
@endif
|
||||
<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->original_name}}</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>
|
||||
<a href="javascript:void(0)" data-url="{{route('customer_fewo_mail_ajax')}}" data-id="{{$customer_file->id}}" data-action="delete_mail_attachment" class="mail-att-delete">löschen</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-6">
|
||||
{!! Form::open([ 'url' => route('customer_fewo_mail_upload_attachment', ['tmp']), 'method' => 'post', 'files' => true, 'enctype' => 'multipart/form-data', 'class' => 'dropzone', 'id' => 'uploadAttachmentFile' ]) !!}
|
||||
<div class="fallback">
|
||||
<input name="file" type="file" multiple>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
@if(isset($value->customer_mail))
|
||||
<hr>
|
||||
@include('travel.user.booking.mail.modal-show-mail-inner', ['customer_mail' => $value->customer_mail])
|
||||
@endif
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<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($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">
|
||||
<div class="message-attachment-file display-4"><i class="mail-att-icon"></i></div>
|
||||
<div class="media-body ml-3">
|
||||
<strong class="message-attachment-filename"> </strong>
|
||||
<div class="text-muted small mail-att-size"> </div>
|
||||
<div>
|
||||
<a href="javascript:void(0)" target="_blank" class="mail-att-show">Vorschau</a>
|
||||
<a href="javascript:void(0)" class="mail-att-remove">entfernen</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function callback_ajax_add_attachment(response) {
|
||||
if(response.error === false){
|
||||
add_mail_attachment_preview(response);
|
||||
}
|
||||
}
|
||||
|
||||
function add_mail_attachment_preview(response){
|
||||
console.log(response);
|
||||
var template = $('#mail-attachment-template').clone()
|
||||
.removeAttr('id').removeClass('d-none')
|
||||
.attr('data-id', response.file_id);
|
||||
template.find('.mail-att-icon').addClass(response.file_icon);
|
||||
template.find('.message-attachment-filename').text(response.original_name);
|
||||
template.find('.mail-att-size').text(response.file_format_bytes);
|
||||
|
||||
///'storage/file/{id}/{disk}
|
||||
template.find('.mail-att-show').attr('href', response.file_url);
|
||||
template.find('.mail-att-remove').on('click', function () {
|
||||
$(this).parents('.message-attachment').remove();
|
||||
});
|
||||
$('#preview-mail-attachment').append(template);
|
||||
}
|
||||
|
||||
function change_mail_subdir_select(){
|
||||
var $dir_id = $('#send_mail_dir').val();
|
||||
$('.send_mail_subdir').each(function () {
|
||||
var send_mail_subdir = 'send_mail_subdir_' + $dir_id;
|
||||
if($(this).attr('id') === send_mail_subdir){
|
||||
$(this).prop('disabled', false);
|
||||
$(this).show();
|
||||
}else{
|
||||
$(this).prop('disabled', true);
|
||||
$(this).val(0);
|
||||
$(this).hide();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
change_mail_subdir_select();
|
||||
$('#send_mail_dir').on('change', function () {
|
||||
change_mail_subdir_select();
|
||||
});
|
||||
if (!window.Quill) {
|
||||
$('#message-editor,#message-editor-toolbar').remove();
|
||||
$('#message-editor-fallback').removeClass('d-none');
|
||||
} else {
|
||||
Quill.register('modules/placeholder', PlaceholderModule.default(Quill))
|
||||
//$('#message-editor-fallback').remove();
|
||||
var quill = new Quill('#message-editor', {
|
||||
debug: 'error',
|
||||
modules: {
|
||||
toolbar: '#message-editor-toolbar',
|
||||
placeholder: {
|
||||
placeholders: [
|
||||
{!! \App\Services\Placeholder::getBookingQuill() !!}
|
||||
]
|
||||
}
|
||||
},
|
||||
placeholder: '{{$value->m_placeholder}}',
|
||||
theme: 'snow'
|
||||
});
|
||||
}
|
||||
|
||||
$('.b-material-datetime-picker').bootstrapMaterialDatePicker({
|
||||
weekStart: 1,
|
||||
format : 'DD.MM.YYYY HH:mm',
|
||||
shortTime: false,
|
||||
nowButton : true,
|
||||
clearButton: true,
|
||||
lang: 'de',
|
||||
//currentDate: ''
|
||||
});
|
||||
|
||||
$(".submit-button-form").click(function(event) {
|
||||
@if(isset($value->customers))
|
||||
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();
|
||||
});
|
||||
|
||||
$("#preview-mail-attachment .mail-att-delete").click(function(event) {
|
||||
_self = $(this);
|
||||
if(!confirm('Angang wirklick löschen?')){
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
ajax_object_action(event, $(this), function (data) {
|
||||
console.log(data);
|
||||
if(data.status === 'success'){
|
||||
_self.parents('.message-attachment').remove();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
var emailTempplateTable = $('#datatables-email-templates').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
"searching": true,
|
||||
"autoWidth": false,
|
||||
ajax: {
|
||||
url: '{!! route( 'email_template_data_table' ) !!}',
|
||||
data: function(d) {
|
||||
d.filter_email_templates_directory = $('select[name=filter_email_templates_directory]').val();
|
||||
}
|
||||
},
|
||||
"columns": [
|
||||
{ data: 'id', width: '8%', searchable: true },
|
||||
{ data: 'name', name: 'name', width: '', searchable: true },
|
||||
{ data: 'email_template_dir.name', name: 'email_template_dir.name', width: '25%', orderable: false, searchable: false },
|
||||
{ data: 'action', width: '8%', orderable: false, searchable: false},
|
||||
],
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 10,
|
||||
"orderSequence": ["desc", "asc"],
|
||||
"order": [[ 0, "desc" ]],
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
},
|
||||
"drawCallback": function( settings ) {
|
||||
$('#datatables-email-templates [rel="tooltip"]').tooltip({trigger: "hover"});
|
||||
$('#datatables-email-templates .email-template-action').on('click', function (event) {
|
||||
ajax_object_action(event, $(this), callback_email_template_data_table);
|
||||
});
|
||||
}
|
||||
});
|
||||
$('#filter_email_templates_directory').on('change', function(){
|
||||
emailTempplateTable.draw();
|
||||
});
|
||||
|
||||
function callback_email_template_data_table(data) {
|
||||
if(data.status === 'success'){
|
||||
$('input#subject').val(data.response.subject + $('input#lead_title_id').val());
|
||||
$("input#message-editor-fallback").val(data.html);
|
||||
$('#message-editor .ql-editor').html(data.html)
|
||||
$('#collapseModalEmailTemplate').collapse('hide');
|
||||
}
|
||||
}
|
||||
|
||||
Dropzone.autoDiscover = false;
|
||||
$("#uploadAttachmentFile").dropzone({
|
||||
uploadMultiple: false,
|
||||
parallelUploads: 1,
|
||||
maxFilesize: 32,
|
||||
addRemoveLinks: true,
|
||||
dictDefaultMessage: '<i class="ion ion-ios-cloud-upload "></i>Hier klicken, oder Datei hier reinziehen (Drag&Drop)',
|
||||
dictFallbackMessage: 'Ihr Browser unterstützt Drag&Drop Dateiuploads nicht',
|
||||
dictFallbackText: 'Benutzen Sie das Formular um Ihre Dateien hochzuladen',
|
||||
dictFileTooBig: "Die Datei ist zu groß. Die maximale Dateigröße beträgt 32 MB",
|
||||
dictInvalidFileType: 'Eine Datei dieses Typs kann nicht hochgeladen werden',
|
||||
dictResponseError: "Der Server hat ihre Anfrage mit Status error abgelehnt",
|
||||
dictCancelUpload: 'Hochladen abbrechen',
|
||||
dictCancelUploadConfirmation: null,
|
||||
dictRemoveFile: 'Datei entfernen',
|
||||
dictMaxFilesExceeded: 'Sie können keine weiteren Dateien mehr hochladen',
|
||||
acceptedFiles: "image/jpeg,image/pjpeg,image/png,image/gif,application/pdf,text/plain",
|
||||
// The setting up of the dropzone
|
||||
init:function() {
|
||||
this.on("removedfile", function(file) {
|
||||
var _ele = $('.alert-danger');
|
||||
_ele.fadeOut();
|
||||
|
||||
});
|
||||
this.on("addedfile", function (file) {
|
||||
var _ele = $('.alert-danger');
|
||||
_ele.fadeOut();
|
||||
});
|
||||
},
|
||||
error: function(file, response) {
|
||||
var message
|
||||
if($.type(response) === "string")
|
||||
message = response; //dropzone sends it's own error messages in string
|
||||
else
|
||||
message = response.message;
|
||||
var _ele = $('.alert-danger');
|
||||
_ele.fadeIn();
|
||||
console.log(message);
|
||||
_ele.text(message);
|
||||
},
|
||||
success: function(file,response) {
|
||||
// console.log(file);
|
||||
// console.log(response);
|
||||
if(response.error === false){
|
||||
add_mail_attachment_preview(response);
|
||||
this.removeFile(file);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
@ -0,0 +1,145 @@
|
|||
|
||||
<div class="card mb-2">
|
||||
<!-- Header -->
|
||||
<div class="media px-4 pt-4 pb-2">
|
||||
<a href="javascript:void(0)" class="messages-sidebox-toggler d-lg-none d-block align-self-center text-muted text-large pr-3 mr-3"><i class="ion ion-md-more"></i></a>
|
||||
|
||||
<!-- Sender photo -->
|
||||
<div class="media-body">
|
||||
<!-- Sender & date -->
|
||||
<div class="mb-1">
|
||||
@if($customer_mail->is_answer)
|
||||
Antwort von:<br>
|
||||
@else
|
||||
Gesendet an:<br>
|
||||
@endif
|
||||
<<a href="mailto:{{$customer_mail->email}}">{{$customer_mail->email}}</a>> {{$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 -->
|
||||
<h5 class="line-height-inherit m-0">{{$customer_mail->subject}}</h5>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="border-light m-0">
|
||||
<!-- / Header -->
|
||||
{{-- <!-- Controls -->
|
||||
<div class="media flex-wrap align-items-center p-2">
|
||||
<div class="media-body d-flex flex-wrap flex-basis-100 flex-basis-sm-auto">
|
||||
<button type="button" class="btn btn-default borderless md-btn-flat icon-btn messages-tooltip text-muted mr-3" title="Back"><i class="ion ion-md-arrow-back"></i></button>
|
||||
<button type="button" class="btn btn-default borderless md-btn-flat icon-btn messages-tooltip text-muted" title="Mark as unread"><i class="ion ion-md-mail-unread"></i></button>
|
||||
<button type="button" class="btn btn-default borderless md-btn-flat icon-btn messages-tooltip text-muted" title="Mark as important"><i class="ion ion-md-alert"></i></button>
|
||||
<button type="button" class="btn btn-default borderless md-btn-flat icon-btn messages-tooltip text-muted" title="Move to spam"><i class="ion ion-md-folder-open"></i></button>
|
||||
<button type="button" class="btn btn-default borderless md-btn-flat icon-btn messages-tooltip text-muted" title="Move to trash"><i class="ion ion-md-trash"></i></button>
|
||||
</div>
|
||||
|
||||
<div class="d-flex flex-wrap align-items-center ml-auto">
|
||||
<button type="button" class="btn btn-default borderless md-btn-flat text-muted px-3"><i class="ion ion-ios-undo"></i> Reply</button>
|
||||
<div class="text-lighter">|</div>
|
||||
<button type="button" class="btn btn-default borderless md-btn-flat text-muted px-3">Forward <i class="ion ion-ios-redo"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="border-light m-0">
|
||||
<!-- / Controls -->
|
||||
--}}
|
||||
<div class="p-4">
|
||||
{!! nl2br($customer_mail->message) !!}
|
||||
</div>
|
||||
<hr class="border-light m-0">
|
||||
|
||||
<!-- Message infos -->
|
||||
<div class="px-4 pt-4 pb-2">
|
||||
@if($customer_mail->customer)
|
||||
<p><strong>Kunde: </strong>
|
||||
{{ $customer_mail->customer->getSalutation() }} {{ $customer_mail->customer->title }} {{ $customer_mail->customer->firstname }} {{ $customer_mail->customer->name }}
|
||||
@if($customer_mail->booking)
|
||||
({{$customer_mail->booking->id}})1
|
||||
@endif
|
||||
</p>
|
||||
@endif
|
||||
|
||||
@if($customer_mail->booking)
|
||||
<p><strong>Buchung: </strong>
|
||||
@if($value->booking->fewo_lodging_id) {{ $value->booking->fewo_lodging->name." | " }} @endif
|
||||
({{ $value->booking->id }})
|
||||
</p>
|
||||
@endif
|
||||
|
||||
@if($customer_mail->send)
|
||||
<span class="badge badge-success">Mail gesendet</span>
|
||||
<p>Datum: {{$customer_mail->sent_at}}</p>
|
||||
@endif
|
||||
@if($customer_mail->fail)
|
||||
<span class="badge badge-danger">Mail Fehler</span>
|
||||
<p>{{$customer_mail->error }}</p>
|
||||
@endif
|
||||
</div>
|
||||
<!-- Message attachments -->
|
||||
@if($customer_mail->customer_files)
|
||||
<hr class="border-light m-0">
|
||||
<div class="px-4 pt-4 pb-2">
|
||||
<h6 class="small font-weight-semibold mb-4">Datei-Anhänge</h6>
|
||||
<div class="row">
|
||||
@foreach($customer_mail->customer_files as $file)
|
||||
<div class="col-sm-12 col-md-6 col-xl-4">
|
||||
<div class="message-attachment ui-bordered p-2 mr-3 mb-3">
|
||||
<div class="message-attachment-file display-4"><i class="{{$file->getIconExt()}}"></i></div>
|
||||
<div class="media-body ml-3">
|
||||
<strong class="message-attachment-filename">{{$file->original_name}}</strong>
|
||||
<div class="text-muted small">{{$file->formatBytes()}}</div>
|
||||
<div>
|
||||
<a href="{{$file->getURL()}}" target="_blank" class="mail-att-show">Vorschau</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@if(isset($show_move_dirs))
|
||||
<hr class="border-light m-0">
|
||||
<div class="px-4 pt-4 pb-2">
|
||||
{!! Form::open(['url' => route('customer_mail_detail', [$customer_mail->id, 'move-mail-fewo']), 'class' => 'move-mail-form']) !!}
|
||||
<div class="form-row">
|
||||
<div class="col-sm-6">
|
||||
<label for="customer_mail_dir" class="form-label">Ablegen unter:</label>
|
||||
<select class="custom-select customer_mail_dir" name="dir" id="customer_mail_dir">
|
||||
@foreach(\App\Services\BookingFewo::getCustomerMailDirs() as $customer_mail_dir)
|
||||
<option value="{{$customer_mail_dir->pos}}" @if($customer_mail->dir == $customer_mail_dir->pos) selected @endif>{{$customer_mail_dir->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<button type="submit" class="btn btn-xs btn-default float-right mt-1"><i class="ion ion-ios-redo"></i> verschieben</button>
|
||||
|
||||
<label for="subdir" class="form-label"> </label>
|
||||
{{-- TODO load subdirs by pos id
|
||||
@if($customer_mail->booking->travel_country)
|
||||
@foreach(\App\Services\Booking::getCustomerMailDirs() as $customer_mail_dir)
|
||||
@if($customer_mail_dir->pos > 0)
|
||||
<select class="custom-select customer_mail_subdir" name="subdir" id="customer_mail_subdir_{{$customer_mail_dir->pos}}">
|
||||
<option value="0">keinen Unterordner</option>
|
||||
@foreach($customer_mail->booking->travel_country->getMailDirs($customer_mail_dir->pos) as $mail_dir_id)
|
||||
@php ($mail_dir_name = \App\Services\Booking::getCustomerMailName($customer_mail_dir, $mail_dir_id))
|
||||
<option value="{{$mail_dir_id}}" @if($customer_mail->subdir == $mail_dir_id) selected @endif>{{$mail_dir_name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
--}}
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">
|
||||
{{ $value->title }}
|
||||
</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
@include('travel.user.booking.mail.modal-show-mail-inner', ['customer_mail' => $customer_mail, 'show_move_dirs' => true])
|
||||
|
||||
@if($customer_mail->customer_fewo_mail)
|
||||
@include('travel.user.booking.mail.modal-show-mail-inner', ['customer_fewo_mail' => $customer_mail->customer_mail])
|
||||
@endif
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function change_mail_subdir_select(_form){
|
||||
|
||||
var $dir_id = _form.find('#customer_mail_dir').val();
|
||||
$('.customer_mail_subdir').each(function () {
|
||||
var customer_mail_subdir = 'customer_mail_subdir_' + $dir_id;
|
||||
if($(this).attr('id') === customer_mail_subdir){
|
||||
$(this).prop('disabled', false);
|
||||
$(this).show();
|
||||
}else{
|
||||
$(this).prop('disabled', true);
|
||||
$(this).val(0);
|
||||
$(this).hide();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('form.move-mail-form').each(function () {
|
||||
var _form = $(this);
|
||||
$(this).find('.customer_mail_dir').on('change', function () {
|
||||
change_mail_subdir_select(_form);
|
||||
_form.find('.btn-default').removeClass('btn-default').addClass('btn-primary');
|
||||
});
|
||||
$(this).find('.customer_mail_subdir').on('change', function () {
|
||||
_form.find('.btn-default').removeClass('btn-default').addClass('btn-primary');
|
||||
});
|
||||
change_mail_subdir_select(_form);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
93
resources/views/travel/user/booking/upload_modal.blade.php
Executable file
93
resources/views/travel/user/booking/upload_modal.blade.php
Executable file
|
|
@ -0,0 +1,93 @@
|
|||
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">
|
||||
{{ __('Datei') }}
|
||||
<span class="font-weight-light">hinzufügen</span>
|
||||
</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-row show-content-file">
|
||||
<div class="col-12">
|
||||
<div class="alert alert-danger alert-dismissable" style="display:none;"></div>
|
||||
</div>
|
||||
<div class="col-12 mt-2 mb-4">
|
||||
{!! Form::open([ 'url' => route('customer_fewo_modal_load'), 'method' => 'post', 'files' => true, 'enctype' => 'multipart/form-data', 'class' => 'dropzone', 'id' => 'uploadBookingFile' ]) !!}
|
||||
<input type="hidden" name="travel_user_booking_fewo_id" value="{{ $data['travel_user_booking_fewo_id'] }}">
|
||||
<input type="hidden" name="action" value="upload-booking-file">
|
||||
|
||||
<div class="fallback">
|
||||
<input name="file" type="file" multiple>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$( document ).ready(function() {
|
||||
Dropzone.autoDiscover = false;
|
||||
$("#uploadBookingFile").dropzone({
|
||||
uploadMultiple: false,
|
||||
parallelUploads: 1,
|
||||
maxFilesize: 32,
|
||||
addRemoveLinks: true,
|
||||
dictDefaultMessage: '<i class="ion ion-ios-cloud-upload "></i>Hier klicken, oder Datei hier reinziehen (Drag&Drop)',
|
||||
dictFallbackMessage: 'Ihr Browser unterstützt Drag&Drop Dateiuploads nicht',
|
||||
dictFallbackText: 'Benutzen Sie das Formular um Ihre Dateien hochzuladen',
|
||||
dictFileTooBig: "Die Datei ist zu groß. Die maximale Dateigröße beträgt 32 MB",
|
||||
dictInvalidFileType: 'Eine Datei dieses Typs kann nicht hochgeladen werden',
|
||||
dictResponseError: "Der Server hat ihre Anfrage mit Status error abgelehnt",
|
||||
dictCancelUpload: 'Hochladen abbrechen',
|
||||
dictCancelUploadConfirmation: null,
|
||||
dictRemoveFile: 'Datei entfernen',
|
||||
dictMaxFilesExceeded: 'Sie können keine weiteren Dateien mehr hochladen',
|
||||
acceptedFiles: "image/jpeg,image/pjpeg,image/png,image/gif,application/pdf,text/plain",
|
||||
// The setting up of the dropzone
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
init:function() {
|
||||
this.on("removedfile", function(file) {
|
||||
var _ele = $('.alert-danger');
|
||||
_ele.fadeOut();
|
||||
|
||||
});
|
||||
this.on("addedfile", function (file) {
|
||||
var _ele = $('.alert-danger');
|
||||
_ele.fadeOut();
|
||||
});
|
||||
},
|
||||
error: function(file, response) {
|
||||
var message
|
||||
if($.type(response) === "string")
|
||||
message = response; //dropzone sends it's own error messages in string
|
||||
else
|
||||
message = response.message;
|
||||
var _ele = $('.alert-danger');
|
||||
_ele.fadeIn();
|
||||
console.log(message);
|
||||
_ele.text(message);
|
||||
},
|
||||
success: function(file, response) {
|
||||
console.log(file);
|
||||
console.log(response);
|
||||
if(response.error === false){
|
||||
//window.location.href = window.location.href; //This is a possibility
|
||||
window.location.reload(); //Another possiblity
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue