Upload Files Booking, Mails, Attachments,
This commit is contained in:
parent
5daea268f7
commit
68b9d1ff88
92 changed files with 2837 additions and 1778 deletions
|
|
@ -20,21 +20,26 @@
|
|||
|
||||
@if($value->show === 'single' || $value->show === 'reply')
|
||||
<div class="row">
|
||||
@if(isset($value->booking))
|
||||
<div class="col-sm-4">
|
||||
<strong>Buchung: </strong><br>
|
||||
{{ $value->booking->id }}
|
||||
@if($value->booking->travel_country_id)
|
||||
{{ " | ".$value->booking->travel_country->name }}
|
||||
@endif
|
||||
@if($value->booking->travelagenda_id)
|
||||
{{ " | ".$value->booking->travel_agenda->name }}
|
||||
@endif
|
||||
({{ $value->booking->id }})
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
@if($value->booking->customer)
|
||||
<strong>Kunde: </strong><br>{{ $value->booking->customer->salutation->name }} {{ $value->booking->customer->firstname }} {{ $value->booking->customer->name }}
|
||||
<strong>Kunde: </strong><br>{{ $value->booking->customer->salutation->name }} {{ $value->booking->customer->title }} {{ $value->booking->customer->firstname }} {{ $value->booking->customer->name }}
|
||||
@endif
|
||||
@if($value->booking->lead)
|
||||
({{$value->booking->lead->id}})
|
||||
@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 }}
|
||||
|
|
@ -62,7 +67,7 @@
|
|||
<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>
|
||||
</span>
|
||||
</label>
|
||||
@endforeach
|
||||
</div>
|
||||
|
|
@ -123,9 +128,10 @@
|
|||
|
||||
<div class="form-group mb-1">
|
||||
<label class="form-label" for="message">Nachricht</label>
|
||||
|
||||
@if($value->show === 'single' || $value->show === 'multi')
|
||||
<div class="float-right small">Vorlage unter: <a href="{{route('cms_content_all')}}">CMS->Inhalte->Allgemein</a> Slug:mailvorlage</div>
|
||||
@endif
|
||||
<div id="message-editor-toolbar">
|
||||
|
||||
<span class="ql-formats">
|
||||
<button class="ql-bold"></button>
|
||||
<button class="ql-italic"></button>
|
||||
|
|
@ -155,12 +161,12 @@
|
|||
{{ Form::textarea('message', $value->message, array('placeholder'=>$value->m_placeholder, 'id'=>'message-editor-fallback', 'class'=>'form-control d-none', 'rows'=>15)) }}
|
||||
</div>
|
||||
@if(isset($value->customers))
|
||||
<p>Platzhalter: #geehrte/r# #Anrede# #Vorname# #Nachname# #Reiseland# #Programm# #Anreisedatum# #Abreisedatum# #Buchungsdatum# #Airline#</p>
|
||||
<p>Platzhalter: #geehrte/r# #Anrede# #Titel# #Vorname# #Nachname# #Reiseland# #Programm# #Anreisedatum# #Abreisedatum# #Buchungsdatum# #Airline#</p>
|
||||
@endif
|
||||
@if($value->show === 'single' || $value->show === 'reply')
|
||||
<div class="form-row">
|
||||
<div class="col-sm-6">
|
||||
<label for="to" class="form-label">Ablegen unter:</label>
|
||||
<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)
|
||||
|
|
@ -183,15 +189,24 @@
|
|||
</div>
|
||||
@endif
|
||||
@if(isset($value->customer_mail))
|
||||
{{ Form::hidden('customer_mail_id', $value->customer_mail->id) }}
|
||||
{{ 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('customer.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>
|
||||
|
|
@ -211,7 +226,6 @@
|
|||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
</div>
|
||||
<div class="col-6">
|
||||
{!! Form::open([ 'url' => route('customer_mail_upload_attachment', ['tmp']), 'method' => 'post', 'files' => true, 'enctype' => 'multipart/form-data', 'class' => 'dropzone', 'id' => 'uploadAttachmentFile' ]) !!}
|
||||
|
|
@ -253,16 +267,21 @@
|
|||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function add_mail_attachment_preview(file, response){
|
||||
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.filename);
|
||||
template.find('.message-attachment-filename').text(response.original_name);
|
||||
template.find('.mail-att-size').text(response.file_format_bytes);
|
||||
|
||||
///'storage/file/{id}/{disk}
|
||||
|
|
@ -337,7 +356,7 @@
|
|||
parallelUploads: 1,
|
||||
maxFilesize: 32,
|
||||
addRemoveLinks: true,
|
||||
dictDefaultMessage: 'Hier klicken, oder Datei hier reinziehen (Drag&Drop)',
|
||||
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",
|
||||
|
|
@ -375,7 +394,7 @@
|
|||
// console.log(file);
|
||||
// console.log(response);
|
||||
if(response.error === false){
|
||||
add_mail_attachment_preview(file, response);
|
||||
add_mail_attachment_preview(response);
|
||||
this.removeFile(file);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue