Lead create Booking
This commit is contained in:
parent
3df0e93c2c
commit
34a3d2196b
18 changed files with 462 additions and 160 deletions
|
|
@ -45,12 +45,12 @@
|
|||
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<label for="travelcountry_id" class="form-label">{{ __('Reiseland') }}*</label>
|
||||
{{ Form::select('travelcountry_id', \App\Services\Model::getTravelCountryCRMArray(true) , $lead->travelcountry_id, array('class'=>'custom-select')) }}
|
||||
{{ Form::select('travelcountry_id', \App\Services\Model::getTravelCountryCRMArray(true) , $lead->travelcountry_id, array('class'=>'custom-select', 'id'=>'travelcountry_id')) }}
|
||||
</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\Services\Model::getTravelAgendaArray(true) , $lead->travelagenda_id, array('class'=>'custom-select')) }}
|
||||
{{ Form::select('travelagenda_id', \App\Services\Model::getTravelAgendaArray(true, $lead->travelcountry_id) , $lead->travelagenda_id, array('class'=>'custom-select', 'id'=>'travelagenda_id')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
|
|
@ -76,4 +76,27 @@
|
|||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
function callback_ajax_selected_travelagenda(data){
|
||||
var $el = $("#travelagenda_id");
|
||||
$el.empty(); // remove old options
|
||||
$.each(data.html, function(key,value) {
|
||||
$el.append($("<option></option>")
|
||||
.attr("value", key).text(value));
|
||||
});
|
||||
}
|
||||
function load_selected_travelagenda(){
|
||||
var $elem = $('<div/>');
|
||||
$elem.data('action', 'load_travelagenda_by_country');
|
||||
$elem.data('travel_country_id', $('#travelcountry_id').val());
|
||||
$elem.data('url', '{{route('ajax_load_data')}}');
|
||||
ajax_object_action(false, $elem, callback_ajax_selected_travelagenda);
|
||||
}
|
||||
$('#travelcountry_id').on('change', function () {
|
||||
load_selected_travelagenda();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
@ -28,7 +28,12 @@
|
|||
<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>
|
||||
|
||||
@if ($lead->bookings->count() === 0)
|
||||
<div class="form-group col-sm-6 col-md-6">
|
||||
<label class="form-label" for="status_id">{{ __('Buchnung erstellen') }} </label><br>
|
||||
<button type="submit" name="action" value="createBooking" class="btn btn-sm btn-primary">Neue Buchnung aus Anfrage erstellen</button>
|
||||
</div>
|
||||
@endif
|
||||
<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')) }}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
</div>
|
||||
<div class="col-sm-4">
|
||||
@if($value->lead->customer)
|
||||
<strong>Kunde: </strong><br>{{ $value->lead->customer->getSalutation() }} {{ $value->lead->customer->title }} {{ $value->lead->customer->firstname }} {{ $value->lead->customer->name }}
|
||||
<strong>Kunde: </strong><br>{{ $value->lead->customer->getSalutation(true) }} {{ $value->lead->customer->title }} {{ $value->lead->customer->firstname }} {{ $value->lead->customer->name }}
|
||||
({{$value->lead->id}})
|
||||
@endif
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
<div class="px-4 pt-4 pb-2">
|
||||
@if($lead_mail->customer)
|
||||
<p><strong>Kunde: </strong>
|
||||
{{ $lead_mail->customer->getSalutation() }} {{ $lead_mail->customer->title }} {{ $lead_mail->customer->firstname }} {{ $lead_mail->customer->name }}
|
||||
{{ $lead_mail->customer->getSalutation(true) }} {{ $lead_mail->customer->title }} {{ $lead_mail->customer->firstname }} {{ $lead_mail->customer->name }}
|
||||
@if($lead_mail->lead)
|
||||
({{$lead_mail->lead->id}})
|
||||
@endif
|
||||
|
|
|
|||
|
|
@ -28,24 +28,49 @@
|
|||
{{ Form::text('title', $program->title, array('placeholder'=>__('Title'), 'class'=>'form-control', 'id'=>'program_title', 'required'=>true)) }}
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-6">
|
||||
<div class="form-group col">
|
||||
<label class="form-label" for="program_subtitle">{{ __('Subtitle') }}*</label>
|
||||
{{ Form::text('subtitle', $program->subtitle, array('placeholder'=>__('Subtitle'), 'class'=>'form-control', 'id'=>'program_subtitle', 'required'=>true)) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="program_code">{{ __('Programm Code') }}*</label>
|
||||
{{ Form::text('program_code', $program->program_code, array('placeholder'=>__('Programm Code'), 'class'=>'form-control', 'id'=>'program_code', 'required'=>true)) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<label for="program_code" class="form-label">{{ __('Programm Code') }}*</label>
|
||||
{{ Form::text('program_code', $program->program_code, array('class'=>'form-control', 'id'=>'program_code', 'required'=>true)) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<label for="program_type" class="form-label">{{ __('Programtyp') }}*</label>
|
||||
{{ Form::select('program_type', $program::$programTypeTypes , $program->program_type, array('class'=>'custom-select', 'id'=>'program_type', 'required'=>true)) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<label for="category_id" class="form-label">{{ __('Kategorie') }}*</label>
|
||||
{{ Form::select('category_id', $program::$travelCategoryTypes , $program->category_id, array('class'=>'custom-select', 'id'=>'category_id', 'required'=>true)) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<label for="travel_country" class="form-label">{{ __('Reiseland') }}*</label>
|
||||
{{ Form::select('travel_country', \App\Services\Model::getSymTravelCountryArray() , $program->travel_country, array('class'=>'custom-select', 'id'=>'travel_country', 'required'=>true)) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<label for="travel_agenda" class="form-label">{{ __('Reiseprogramm') }}*</label>
|
||||
{{ Form::select('travel_agenda', \App\Services\Model::getTravelAgendaArray(false) , $program->travel_agenda, array('class'=>'custom-select', 'id'=>'travel_agenda', 'required'=>true)) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<label for="travel_category" class="form-label">{{ __('Reiseart') }}*</label>
|
||||
{{ Form::select('travel_category', \App\Services\Model::getTravelCategoryArray() , $program->travel_category, array('class'=>'custom-select', 'id'=>'travel_category', 'required'=>true)) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-8">
|
||||
<label for="weekdays" class="form-label">{{__('Wochentage')}}*</label>
|
||||
<select class="selectpicker" data-style="btn-default" name="weekdays[]" multiple required>
|
||||
{!! HTMLHelper::getWeekdaysOptions(false, $program->getWeekdaysArray()) !!}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<label for="travel_company" class="form-label">{{ __('Veranstalter') }}*</label>
|
||||
{{ Form::select('travel_company', \App\Services\Model::getTravelCompanyArray() , $program->travel_company, array('class'=>'custom-select', 'id'=>'travel_company', 'required'=>true)) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{--
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
</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 }}
|
||||
<strong>Kunde: </strong><br>{{ $value->booking->customer->getSalutation(true) }} {{ $value->booking->customer->title }} {{ $value->booking->customer->first_name }} {{ $value->booking->customer->last_name }}
|
||||
({{$value->booking->id}})
|
||||
@endif
|
||||
@if($value->booking)
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
<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 }}
|
||||
{{ $customer_mail->customer->getSalutation(true) }} {{ $customer_mail->customer->title }} {{ $customer_mail->customer->firstname }} {{ $customer_mail->customer->name }}
|
||||
@if($customer_mail->customer)
|
||||
({{$customer_mail->customer->id}})
|
||||
@endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue