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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue