Fewo Mails / Booking Country Services
This commit is contained in:
parent
b9c26d06d0
commit
48a6eb2282
154 changed files with 7761 additions and 1643 deletions
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