Booking edit v3
This commit is contained in:
parent
6706d28f51
commit
6880c7e989
20 changed files with 691 additions and 97 deletions
|
|
@ -30,7 +30,7 @@
|
|||
</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) , $booking->travelagenda_id, array('class'=>'custom-select', 'id'=>'travelagenda_id')) }}
|
||||
{{ Form::select('travelagenda_id', \App\Services\Model::getTravelAgendaArray(true, $booking->travel_country_id) , $booking->travelagenda_id, array('class'=>'custom-select', 'id'=>'travelagenda_id')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<label class="form-label" for="travel_category_id">{{ __('Reiseart') }}</label>
|
||||
|
|
@ -60,6 +60,26 @@
|
|||
{{ Form::text('title', $booking->title, array('placeholder'=>__('Reisetitel'), 'class'=>'form-control', 'id'=>'title')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="pax">{{ __('Pax') }}</label>
|
||||
{{ Form::select('pax', range(0, 80) , $booking->pax, array('class'=>'custom-select', 'id'=>'pax')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="travel_documents">{{ __('Reiseunterlagen') }}</label>
|
||||
{{ Form::select('travel_documents', [0=>'nicht vollständig', 1=>'vollständig'], $booking->travel_documents, array('class'=>'custom-select', 'id'=>'travel_documents')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="branch_id">{{ __('Filiale') }}</label>
|
||||
{{ Form::select('branch_id', \App\Services\Model::getBranchArray(false) , $booking->branch_id, array('class'=>'custom-select', 'id'=>'branch_id')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="travel_company_id">{{ __('Reiseveranstalter') }}</label>
|
||||
{{ Form::select('travel_company_id', \App\Services\Model::getTravelCompanyArray(false) , $booking->travel_company_id, array('class'=>'custom-select', 'id'=>'travel_company_id')) }}
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<h5 class="card-title mt-3 mb-1">Status</h5>
|
||||
<hr class="mt-0">
|
||||
|
|
@ -138,9 +158,32 @@
|
|||
<button type="submit" name="action" value="update_booking" class="btn btn-sm btn-secondary">{{ __('save changes') }}</button>
|
||||
<a href="{{route('bookings')}}" class="btn btn-sm btn-default">{{ __('zur Übersicht') }}</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</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', $('#travel_country_id').val());
|
||||
$elem.data('url', '{{route('ajax_load_data')}}');
|
||||
ajax_object_action(false, $elem, callback_ajax_selected_travelagenda);
|
||||
}
|
||||
$('#travel_country_id').on('change', function () {
|
||||
load_selected_travelagenda();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue