Edit / PDF / Mail / ->Leads
This commit is contained in:
parent
5d55e5be3f
commit
66ca252bfa
43 changed files with 2915 additions and 76 deletions
83
resources/views/lead/_detail_customer.blade.php
Normal file
83
resources/views/lead/_detail_customer.blade.php
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
<div class="card mb-2 border-primary">
|
||||
<h6 class="card-header bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseLeadCustomer" aria-expanded="false" aria-controls="collapseLeadCustomer">
|
||||
<strong style="line-height: 1.6em">Kunde</strong>
|
||||
</h6>
|
||||
<div class="collapse" id="collapseLeadCustomer">
|
||||
<div class="card-body">
|
||||
@if($lead->customer->count())
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="customer_id">{{ __('Kunden ID') }}</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<a class="text-primary" href="{{route('customer_detail', [$lead->customer->id])}}"><i class="fa fa-edit"></i></a></span>
|
||||
</div>
|
||||
{{ Form::text('customer[id]', $lead->customer->id, array('placeholder'=>__('Kunden ID'), 'class'=>'form-control', 'id'=>'customer_id', 'readonly')) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-sm-3">
|
||||
<label for="salutation_id" class="form-label">{{ __('Anrede') }}*</label>
|
||||
{{ Form::select('customer[salutation_id]', \App\Models\Customer::$salutationType , $lead->customer->salutation_id, array('class'=>'custom-select', 'required'=>true)) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="customer_firstname">{{ __('Vorname') }}*</label>
|
||||
{{ Form::text('customer[firstname]', $lead->customer->firstname, array('placeholder'=>__('Vorname'), 'class'=>'form-control', 'id'=>'customer_firstname', 'required'=>true)) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-5">
|
||||
<label class="form-label" for="customer_name">{{ __('Nachname') }}*</label>
|
||||
{{ Form::text('customer[name]', $lead->customer->name, array('placeholder'=>__('Nachname'), 'class'=>'form-control', 'id'=>'customer_name', 'required'=>true)) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="customer_street">{{ __('Straße') }}</label>
|
||||
{{ Form::text('customer[street]', $lead->customer->street, array('placeholder'=>__('Straße'), 'class'=>'form-control', 'id'=>'customer_street')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-3">
|
||||
<label class="form-label" for="customer_zip">{{ __('PLZ') }}</label>
|
||||
{{ Form::text('customer[zip]', $lead->customer->zip, array('placeholder'=>__('PLZ'), 'class'=>'form-control', 'id'=>'customer_zip')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="customer_city">{{ __('Stadt') }}</label>
|
||||
{{ Form::text('customer[city]', $lead->customer->city, array('placeholder'=>__('Stadt'), 'class'=>'form-control', 'id'=>'customer_city')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-5">
|
||||
<label class="form-label" for="customer_country_id">{{ __('Land') }}*</label>
|
||||
{{ Form::select('customer[country_id]', \App\Models\Customer::getCustomerCountriesArray() , $lead->customer->country_id, array('class'=>'custom-select', 'required'=>true)) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="customer_phone">{{ __('Telefon') }}</label>
|
||||
{{ Form::text('customer[phone]', $lead->customer->phone, array('placeholder'=>__('Telefon'), 'class'=>'form-control', 'id'=>'customer_phone')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="customer_phonemobile">{{ __('Telefon Mobil') }}</label>
|
||||
{{ Form::text('customer[phonemobile]', $lead->customer->phonemobile, array('placeholder'=>__('Telefon Mobil'), 'class'=>'form-control', 'id'=>'customer_phonemobile')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="customer_email">{{ __('E-Mail') }}*</label>
|
||||
{{ Form::text('customer[email]', $lead->customer->email, array('placeholder'=>__('E-Mail'), 'class'=>'form-control', 'id'=>'customer_email', 'required'=>true)) }}
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12">
|
||||
<div class="text-left mt-2">
|
||||
<button type="submit" name="action" value="saveCustomer" class="btn btn-sm btn-secondary">Änderungen speichern</button>
|
||||
<a href="{{route('leads')}}" class="btn btn-sm btn-default">{{ __('zur Übersicht') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
92
resources/views/lead/_detail_files.blade.php
Normal file
92
resources/views/lead/_detail_files.blade.php
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
<!-- Files -->
|
||||
<div class="card mb-2">
|
||||
<h6 class="card-header bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseLeadFiles" aria-expanded="false" aria-controls="collapseLeadFiles">
|
||||
<strong style="line-height: 1.6em">PDF Dateien</strong>
|
||||
</h6>
|
||||
<div class="collapse" id="collapseLeadFiles">
|
||||
|
||||
@php($lead_files_count = 1)
|
||||
<div class="card-body row">
|
||||
<div class="table-responsive" id="lead_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\Lead::contentFiles() as $content_file)
|
||||
@if($file = \App\Models\CMSContent::getModelBySlug($content_file))
|
||||
<tr>
|
||||
<th scope="row">{{$lead_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($lead->lead_files)
|
||||
@foreach($lead->lead_files as $lead_file)
|
||||
<tr>
|
||||
<th scope="row">{{$lead_files_count++}}</th>
|
||||
<td>
|
||||
<a target="_blank" href="{{ $lead_file->getURL() }}" class="badge badge-md badge-secondary">
|
||||
<i class="{{$lead_file->getIconExt()}} mr-1"></i> {{$lead_file->original_name}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ $lead_file->mine }} | {{ $lead_file->formatBytes() }}
|
||||
</td>
|
||||
<td>{{\App\Services\Util::_format_date($lead_file->created_at, 'date')}}</td>
|
||||
<td>
|
||||
<a href="{{ $lead_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('lead_delete', [$lead_file->id, 'lead_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="LeadFile"
|
||||
data-action="modal-upload-lead-file"
|
||||
data-url=""
|
||||
data-redirect="back"
|
||||
data-lead_id="{{$lead->id}}"
|
||||
data-route="{{ route('lead_mail_modal_load') }}"><i class="ion ion-md-cloud-upload"></i> Datei hinzufügen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
79
resources/views/lead/_detail_info.blade.php
Normal file
79
resources/views/lead/_detail_info.blade.php
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
<div class="card mb-2 border-primary">
|
||||
<h6 class="card-header bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseLeadInfo" aria-expanded="false" aria-controls="collapseLeadInfo">
|
||||
<strong style="line-height: 1.6em">Kunde</strong>
|
||||
</h6>
|
||||
<div class="collapse" id="collapseLeadInfo">
|
||||
<div class="card-body">
|
||||
@if($lead->customer->count())
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="customer_id">{{ __('Kunden ID') }}</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<a class="text-primary" href="{{route('customer_detail', [$lead->customer->id])}}"><i class="fa fa-edit"></i></a></span>
|
||||
</div>
|
||||
{{ Form::text('customer[id]', $lead->customer->id, array('placeholder'=>__('Kunden ID'), 'class'=>'form-control', 'id'=>'customer_id', 'readonly')) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-sm-3">
|
||||
<label for="salutation_id" class="form-label">{{ __('Anrede') }}*</label>
|
||||
{{ Form::select('customer[salutation_id]', \App\Models\Customer::$salutationType , $lead->customer->salutation_id, array('class'=>'custom-select', 'required'=>true)) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="customer_firstname">{{ __('Vorname') }}*</label>
|
||||
{{ Form::text('customer[firstname]', $lead->customer->firstname, array('placeholder'=>__('Vorname'), 'class'=>'form-control', 'id'=>'customer_firstname', 'required'=>true)) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-5">
|
||||
<label class="form-label" for="customer_name">{{ __('Nachname') }}*</label>
|
||||
{{ Form::text('customer[name]', $lead->customer->name, array('placeholder'=>__('Nachname'), 'class'=>'form-control', 'id'=>'customer_name', 'required'=>true)) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="customer_street">{{ __('Straße') }}</label>
|
||||
{{ Form::text('customer[street]', $lead->customer->street, array('placeholder'=>__('Straße'), 'class'=>'form-control', 'id'=>'customer_street')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-3">
|
||||
<label class="form-label" for="customer_zip">{{ __('PLZ') }}</label>
|
||||
{{ Form::text('customer[zip]', $lead->customer->zip, array('placeholder'=>__('PLZ'), 'class'=>'form-control', 'id'=>'customer_zip')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="customer_city">{{ __('Stadt') }}</label>
|
||||
{{ Form::text('customer[city]', $lead->customer->city, array('placeholder'=>__('Stadt'), 'class'=>'form-control', 'id'=>'customer_city')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-5">
|
||||
<label class="form-label" for="customer_country_id">{{ __('Land') }}*</label>
|
||||
{{ Form::select('customer[country_id]', \App\Models\Customer::getCustomerCountriesArray() , $lead->customer->country_id, array('class'=>'custom-select', 'required'=>true)) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="customer_phone">{{ __('Telefon') }}</label>
|
||||
{{ Form::text('customer[phone]', $lead->customer->phone, array('placeholder'=>__('Telefon'), 'class'=>'form-control', 'id'=>'customer_phone')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="customer_phonemobile">{{ __('Telefon Mobil') }}</label>
|
||||
{{ Form::text('customer[phonemobile]', $lead->customer->phonemobile, array('placeholder'=>__('Telefon Mobil'), 'class'=>'form-control', 'id'=>'customer_phonemobile')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="customer_email">{{ __('E-Mail') }}*</label>
|
||||
{{ Form::text('customer[email]', $lead->customer->email, array('placeholder'=>__('E-Mail'), 'class'=>'form-control', 'id'=>'customer_email', 'required'=>true)) }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="text-left mt-3 pl-1">
|
||||
<button type="submit" name="action" value="saveCustomer" class="btn btn-sm btn-secondary">Änderungen speichern</button>
|
||||
<a href="{{route('leads')}}" class="btn btn-sm btn-default">{{ __('zur Übersicht') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
79
resources/views/lead/_detail_lead.blade.php
Normal file
79
resources/views/lead/_detail_lead.blade.php
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
<div class="card mb-2 border-primary">
|
||||
<h6 class="card-header bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseLeadDetail" aria-expanded="false" aria-controls="collapseLeadDetail">
|
||||
<strong style="line-height: 1.6em">Anfrage</strong>
|
||||
</h6>
|
||||
<div class="collapse" id="collapseLeadDetail">
|
||||
<div class="card-body row">
|
||||
@if($lead->count())
|
||||
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<label class="form-label" for="lead_id">{{ __('Anfrage ID') }}</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<a class="text-primary" href="{{route('lead_detail', [$lead->id])}}"><i class="fa fa-edit"></i></a></span>
|
||||
</div>
|
||||
{{ Form::text('lead[id]', $lead->id, array('placeholder'=>__('Anfrage ID'), 'class'=>'form-control', 'id'=>'lead_id', 'readonly')) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<label for="sf_guard_user_id" class="form-label">{{ __('Sachbearbeiter') }}*</label>
|
||||
{{ Form::select('sf_guard_user_id', \App\Models\Lead::getSfGuardUserArray() , $lead->sf_guard_user_id, array('class'=>'custom-select', 'required'=>true)) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<label class="form-label" for="request_date">{{ __('Anfragedatum') }}*</label>
|
||||
{{ Form::text('request_date', _format_date($lead->request_date), array('placeholder'=>__('Anfragedatum'), 'class'=>'form-control datepicker-base', 'id'=>'request_date', 'required'=>true)) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<label class="form-label" for="travelperiod_start">{{ __('Reisezeitraum vom') }}</label>
|
||||
{{ Form::text('travelperiod_start', _format_date($lead->travelperiod_start), array('placeholder'=>__('Reisezeitraum vom'), 'class'=>'form-control datepicker-base', 'id'=>'travelperiod_start')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<label class="form-label" for="travelperiod_end">{{ __('Reisezeitraum bis') }}</label>
|
||||
{{ Form::text('travelperiod_end', _format_date($lead->travelperiod_end), array('placeholder'=>__('Reisezeitraum bis'), 'class'=>'form-control datepicker-base', 'id'=>'travelperiod_end')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6 col-md-2">
|
||||
<label class="form-label" for="travelperiod_length">{{ __('Reisedauer (Tage)') }}</label>
|
||||
{{ Form::text('travelperiod_length', $lead->travelperiod_length, array('placeholder'=>__('Reisedauer (Tage)'), 'class'=>'form-control', 'id'=>'travelperiod_length')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-2">
|
||||
<label class="form-label" for="pax">{{ __('Pax bis') }}</label>
|
||||
{{ Form::text('pax', $lead->pax, array('placeholder'=>__('Pax'), 'class'=>'form-control', 'id'=>'pax')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<label for="travelcountry_id" class="form-label">{{ __('Reiseland') }}*</label>
|
||||
{{ Form::select('travelcountry_id', \App\Models\Lead::getTravelCountryArray(true) , $lead->travelcountry_id, array('class'=>'custom-select')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<label class="form-label" for="travelagenda_id">{{ __('Reiseprogramm') }}</label>
|
||||
{{ Form::select('travelagenda_id', \App\Models\Lead::getTravelAgendaArray(true) , $lead->travelagenda_id, array('class'=>'custom-select')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<label class="form-label" for="travelcategory_id">{{ __('Reiseart') }}</label>
|
||||
{{ Form::select('travelcategory_id', \App\Models\Lead::getTravelCategoryArray(true) , $lead->travelcategory_id, array('class'=>'custom-select')) }}
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12">
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-12">
|
||||
<label for="remarks" class="form-label">{{ __('Anfrage') }}</label>
|
||||
{{ Form::textarea('remarks', $lead->remarks, array('placeholder'=>__('Anfrage'), 'class'=>'form-control autoExpand', 'id'=>'remarks', 'rows'=>'1', 'data-min-rows'=>'1')) }}
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12">
|
||||
<div class="text-left mt-2">
|
||||
<button type="submit" name="action" value="saveLead" class="btn btn-sm btn-secondary">Änderungen speichern</button>
|
||||
<a href="{{route('leads')}}" class="btn btn-sm btn-default">{{ __('zur Übersicht') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
137
resources/views/lead/_detail_mails.blade.php
Normal file
137
resources/views/lead/_detail_mails.blade.php
Normal 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>
|
||||
58
resources/views/lead/_detail_notice.blade.php
Normal file
58
resources/views/lead/_detail_notice.blade.php
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
<div class="card mb-2">
|
||||
<h6 class="card-header bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseLeadNotice" aria-expanded="false" aria-controls="collapseLeadNotice">
|
||||
<strong style="line-height: 1.6em">Notizen</strong>
|
||||
</h6>
|
||||
<div class="collapse" id="collapseLeadNotice">
|
||||
|
||||
<div class="card-body row">
|
||||
|
||||
<div class="col-sm-12">
|
||||
{!! Form::open(['url' => route('lead_detail', [$id]), 'class' => 'form-horizontal']) !!}
|
||||
<input type="hidden" name="action" value="save_notice">
|
||||
<div class="form-group">
|
||||
{{ Form::textarea('lead_notice', '', array('placeholder'=>__('Neue Notiz hinzufügen …'), 'class'=>'form-control autoExpand', 'id'=>'booking_notice', 'rows'=>'1', 'data-min-rows'=>'1', 'required')) }}
|
||||
</div>
|
||||
<div class="form-group text-right">
|
||||
<button type="submit" class="btn btn-sm btn-primary" ><i class="ion ion-ios-send"></i> Notiz hinzufügen</button>
|
||||
<hr>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
|
||||
@if($lead->lead_notices)
|
||||
@foreach($lead->lead_notices as $lead_notice)
|
||||
<div class="col-sm-12">
|
||||
@if($lead_notice->from_user_id === \Auth::user()->id)
|
||||
<div class="bg-primary rounded py-2 px-3 mr-3 text-white mb-2">
|
||||
<div class="font-weight-semibold mb-1">{{ $lead_notice->getName() }} | {{ $lead_notice->created_at->format("d.m.Y - H:i:s") }}
|
||||
@else
|
||||
<div class="bg-secondary rounded py-2 px-3 mr-3 mb-2">
|
||||
<div class="font-weight-semibold mb-1">{{ $lead_notice->getName() }} | {{ $lead_notice->created_at->format("d.m.Y - H:i:s") }}
|
||||
@endif
|
||||
@if($lead_notice->edit_at != null)
|
||||
| <i class="ion ion-ios-create"></i> {{ $lead_notice->edit_at->format("d.m.Y - H:i:s") }}
|
||||
@endif
|
||||
@if($lead_notice->from_user_id === \Auth::user()->id || \Auth::user()->isPermission('sua-bo-n-edit'))
|
||||
<div class="float-right"><a href="">
|
||||
<a href="javascript:void(0)" class="btn btn-xs btn-white" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="{{ $lead_notice->id }}"
|
||||
data-model="LeadNotice"
|
||||
data-action="edit_notice"
|
||||
data-url="{{ route('lead_detail', [$lead->id]) }}"
|
||||
data-redirect="back"
|
||||
data-lead_id="{{$lead->id}}"
|
||||
data-route="{{ route('lead_modal_load') }}">
|
||||
<i class="ion ion-ios-create"></i>
|
||||
</a>
|
||||
<a href="{{ route('lead_delete', [$lead_notice->id, 'lead_notice']) }}" class="btn btn-xs btn-white text-danger" onclick="return confirm('Wirklich löschen?');"><i class="ion ion-md-trash"></i></a>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
{!! nl2br($lead_notice->message) !!}
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
95
resources/views/lead/_detail_status.blade.php
Normal file
95
resources/views/lead/_detail_status.blade.php
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
<div class="card mb-2 border-primary">
|
||||
<h6 class="card-header bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseLeadStatus" aria-expanded="false" aria-controls="collapseLeadStatus">
|
||||
<strong style="line-height: 1.6em">Status {!! $lead->getStatusBadge() !!}</strong>
|
||||
</h6>
|
||||
<div class="collapse" id="collapseLeadStatus">
|
||||
<div class="card-body">
|
||||
@if($lead->count())
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="custom-control custom-checkbox mt-2">
|
||||
{!! Form::checkbox('is_closed', 1, $lead->is_closed, ['class'=>'custom-control-input', 'readonly']) !!}
|
||||
<span class="custom-control-label">{{__('Vorgang abgeschlossen')}}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label class="custom-control custom-checkbox mt-2">
|
||||
{!! Form::checkbox('is_rebook', 1, $lead->is_rebook, ['class'=>'custom-control-input', 'readonly']) !!}
|
||||
<span class="custom-control-label">{{__('Umbuchung abgeschlossen')}}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12">
|
||||
<hr>
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-6">
|
||||
<label class="form-label" for="status_id">{{ __('Status ändern') }} </label>
|
||||
{{ Form::select('status[id]', \App\Models\Lead::getStatusArray() , $lead->status_id, array('class'=>'custom-select')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-12">
|
||||
<label for="status_remarks" class="form-label">{{ __('Bemerkung für Statusänderung') }}</label>
|
||||
{{ Form::textarea('status[remarks]', '', array('placeholder'=>__('Bemerkung'), 'class'=>'form-control autoExpand', 'id'=>'status_remarks', 'rows'=>'1', 'data-min-rows'=>'1')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="status[date]">{{ __('Datum für Statusänderung') }}</label>
|
||||
{{ Form::text('status[date]', _format_date(now()), array('placeholder'=>__('dd.mm.YY'), 'class'=>'form-control datepicker-base', 'id'=>'status[date]')) }}
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12">
|
||||
<div class="text-left mt-2">
|
||||
<button type="submit" name="action" value="saveStatus" class="btn btn-sm btn-secondary">Änderungen speichern</button>
|
||||
<a href="{{route('leads')}}" class="btn btn-sm btn-default">{{ __('zur Übersicht') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if($lead->status_histories)
|
||||
<div class="row">
|
||||
<div class="col-sm-12"><hr></div>
|
||||
<div class="col-sm-12">
|
||||
<table class="table table-striped table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Status</th>
|
||||
<th>Sachbearbeiter</th>
|
||||
<th>Datum</th>
|
||||
<th>Zieldatum</th>
|
||||
<th>Bemerkungen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($lead->status_histories as $status_history)
|
||||
<tr>
|
||||
<th scope="row">
|
||||
@if($status_history->status)
|
||||
{!! $status_history->status->getStatusBadge() !!}
|
||||
@endif
|
||||
</th>
|
||||
<td>
|
||||
@if($status_history->lead->sf_guard_user)
|
||||
{{ $status_history->lead->sf_guard_user->fullname }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ _format_date($status_history->date) }}</td>
|
||||
<td>{{ _format_date($status_history->target_date) }}</td>
|
||||
<td>{{ $status_history->remarks }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -36,42 +36,207 @@
|
|||
|
||||
</style>
|
||||
|
||||
<div class="float-right mt-3">
|
||||
<a href="{{route('leads')}}" class="btn btn-sm btn-default">{{ __('zur Übersicht') }}</a>
|
||||
<a href="{{ make_old_url('/index.php/leads/'.$lead->id.'/edit') }}" class="btn btn-sm btn-default float-right">{{ __('zurück ins CRM v2') }}</a>
|
||||
</div>
|
||||
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
Anfrage verwalten
|
||||
</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="#collapseLeadCustomer">
|
||||
Kunde
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="javascript:void(0)" data-collapse="#collapseLeadDetail">
|
||||
Anfrage
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="javascript:void(0)" data-collapse="#collapseLeadStatus">
|
||||
Status
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="javascript:void(0)" data-collapse="#collapseLeadMails">
|
||||
E-Mails
|
||||
<span class="badge badge-outline-primary">{{ $lead->lead_mails->count() }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="javascript:void(0)" data-collapse="#collapseLeadFiles">
|
||||
PDF Dateien
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="javascript:void(0)" data-collapse="#collapseLeadNotice">
|
||||
Notizen
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{!! Form::open(['url' => route('lead_detail', [$id]), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
|
||||
|
||||
<input type="hidden" name="id" id="id" value="{{$id}}">
|
||||
<!-- Kunde -->
|
||||
@include('lead._detail_customer')
|
||||
<!-- Anfrage -->
|
||||
@include('lead._detail_lead')
|
||||
<!-- Status -->
|
||||
@include('lead._detail_status')
|
||||
{!! Form::close() !!}
|
||||
|
||||
<!-- draft -->
|
||||
<div class="card mb-2">
|
||||
<div class="card-body row">
|
||||
@if($id !== "new")
|
||||
{{--
|
||||
@include('lead._detail_mails')
|
||||
|
||||
--}}
|
||||
@include('lead._detail_files')
|
||||
@endif
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="lead_id">{{ __('Nr.') }}*</label>
|
||||
{{ Form::text('id', $lead->id, array('placeholder'=>__('Nr.'), 'class'=>'form-control', 'id'=>'lead_id', 'readonly')) }}
|
||||
</div>
|
||||
@include('lead._detail_notice')
|
||||
|
||||
|
||||
</div>
|
||||
<div class="float-right mt-3">
|
||||
<a href="{{route('leads')}}" class="btn btn-sm btn-default">{{ __('zur Übersicht') }}</a>
|
||||
<a href="{{ make_old_url('/index.php/leads/'.$lead->id.'/edit') }}" class="btn btn-sm btn-default float-right">{{ __('zurück ins CRM v2') }}</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="text-left mt-3">
|
||||
<button type="submit" name="action" value="saveAll" class="btn btn-submit">{{ __('save changes') }}</button>
|
||||
<a href="{{route('leads')}}" class="btn btn-default">{{ __('zur Übersicht') }}</a>
|
||||
<a href="{{ make_old_url('/index.php/leads/'.$lead->id.'/edit') }}" class="btn btn-default float-right">{{ __('zurück ins CRM v2') }}</a>
|
||||
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
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('lead_collapse', $(this).attr('id'));
|
||||
window.location.hash = "#"+$(this).attr('id');
|
||||
|
||||
});
|
||||
|
||||
$(".collapse").on('hidden.bs.collapse', function (){
|
||||
CookiesRemoveJSONValue('lead_collapse', $(this).attr('id'));
|
||||
});
|
||||
|
||||
function init_site(){
|
||||
if(window.location.hash){
|
||||
value = $(window.location.hash).attr('id');
|
||||
if(value){
|
||||
collapseHashValue = value;
|
||||
CookiesAddJSONValue('lead_collapse', value);
|
||||
}
|
||||
}
|
||||
var lead_collapses = Cookies.get('lead_collapse');
|
||||
if (lead_collapses != null)
|
||||
{
|
||||
lead_collapses = JSON.parse(lead_collapses);
|
||||
for (var lead_collapse in lead_collapses){
|
||||
$("#"+lead_collapses[lead_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: '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>
|
||||
|
||||
|
|
|
|||
31
resources/views/lead/edit_notice_modal.blade.php
Normal file
31
resources/views/lead/edit_notice_modal.blade.php
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">
|
||||
{{ __('Notiz') }}
|
||||
<span class="font-weight-light">bearbeiten</span>
|
||||
</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
{!! Form::open(['url' => $data['url'], 'class' => '', 'id'=>'edit-notice-form']) !!}
|
||||
{{ Form::hidden('lead_id', $data['lead_id']) }}
|
||||
{{ Form::hidden('action', $data['action']) }}
|
||||
{{ Form::hidden('notice_id', $data['id']) }}
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="full_text" class="form-label">{{ __('Notiz') }}</label>
|
||||
{{ Form::textarea('lead_notice', $value->message, array('placeholder'=>__('Notiz bearbeiten'), 'class'=>'form-control', 'rows'=>8)) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
|
||||
<button type="submit" class="btn btn-primary" name="update-action" value="save-edit-notice">speichern</button>
|
||||
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
{ data: 'customer.email', name: 'customer.email' },
|
||||
{ data: 'request_date', name: 'request_date' },
|
||||
{ data: 'sf_guard_user.last_name', name: 'sf_guard_user.last_name', searchable: false },
|
||||
{ data: 'status.name', name: 'status.name' },
|
||||
{ data: 'status', name: 'status' },
|
||||
|
||||
],
|
||||
"bLengthChange": false,
|
||||
|
|
|
|||
105
resources/views/lead/upload_modal.blade.php
Normal file
105
resources/views/lead/upload_modal.blade.php
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
|
||||
<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('lead_mail_modal_load'), 'method' => 'post', 'files' => true, 'enctype' => 'multipart/form-data', 'class' => 'dropzone', 'id' => 'uploadLeadFile' ]) !!}
|
||||
<input type="hidden" name="lead_id" value="{{ $data['lead_id'] }}">
|
||||
<input type="hidden" name="action" value="upload-lead-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">
|
||||
|
||||
var responseReaload = false;
|
||||
$('#modals-load-content').on('hide.bs.modal', function (event) {
|
||||
$(this).off('hide.bs.modal');
|
||||
if(responseReaload){
|
||||
responseReaload = false;
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
$( document ).ready(function() {
|
||||
Dropzone.autoDiscover = false;
|
||||
$("#uploadLeadFile").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();
|
||||
$(file.previewElement).find('.dz-error-message').text(message);
|
||||
$(file.previewElement).addClass('dz-error');
|
||||
_ele.text(message);
|
||||
},
|
||||
success: function(file, response) {
|
||||
// console.log(file);
|
||||
// console.log(response);
|
||||
$(file.previewElement).addClass('dz-success');
|
||||
if(response.error === false){
|
||||
responseReaload = true;
|
||||
//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