Fewos in CRM,
Fewo Clients Bookings create / edit / delelte via API in DB
This commit is contained in:
parent
aebfb0586a
commit
c0c2a1822c
55 changed files with 9787 additions and 1486 deletions
41
resources/views/travel/user/booking/detail.blade.php
Executable file
41
resources/views/travel/user/booking/detail.blade.php
Executable file
|
|
@ -0,0 +1,41 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
Kunden @if($id == "new") <span class="text-primary">anlegen</span> @else {{"(ID: ".$id.")"}} verwalten @endif
|
||||
</h4>
|
||||
|
||||
{!! 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.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>
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
@endsection
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
144
resources/views/travel/user/booking/form.blade.php
Executable file
144
resources/views/travel/user/booking/form.blade.php
Executable file
|
|
@ -0,0 +1,144 @@
|
|||
|
||||
<div class="card mb-2">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label">{{ __('Kunde') }}*</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) !!}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label class="form-label">{{ __('FeWo') }}*</label>
|
||||
<select class="selectpicker" data-style="btn-light" name="fewo_lodging_id" required>
|
||||
{!! HTMLHelper::getFewoLodgingOptions($travel_user_booking_fewo->fewo_lodging_id) !!}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="invoice_number">{{ __('Rechnungsnummer') }}</label>
|
||||
{{ Form::text('invoice_number', $travel_user_booking_fewo->invoice_number, array('placeholder'=>__('Rechnungsnummer'), 'class'=>'form-control')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="booking_date">{{ __('Buchungsdatum') }}*</label>
|
||||
{{ Form::text('booking_date', $travel_user_booking_fewo->booking_date, array('placeholder'=>__('Buchungsdatum'), 'class'=>'form-control datepicker-base', 'required'=>true)) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="adults">{{ __('Erwachsene') }}</label>
|
||||
{{ Form::text('adults', $travel_user_booking_fewo->adults, array('placeholder'=>__('Erwachsene'), 'class'=>'form-control')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="children">{{ __('Kinder') }}</label>
|
||||
{{ Form::text('children', $travel_user_booking_fewo->children, array('placeholder'=>__('Kinder'), 'class'=>'form-control')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="persons">{{ __('Personen Gesamt') }}*</label>
|
||||
{{ Form::text('persons', $travel_user_booking_fewo->persons, array('placeholder'=>__('Personen'), 'class'=>'form-control', 'readonly')) }}
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="from_date">{{ __('Datum von') }}*</label>
|
||||
{{ Form::text('from_date', $travel_user_booking_fewo->from_date, array('placeholder'=>__('Datum von'), 'class'=>'form-control datepicker-base', 'required'=>true)) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="to_date">{{ __('Datum bis') }}*</label>
|
||||
{{ Form::text('to_date', $travel_user_booking_fewo->to_date, array('placeholder'=>__('Datum bis'), 'class'=>'form-control datepicker-base', 'required'=>true)) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-12">
|
||||
<em>Änderungen werden nicht bei den Reservierungen geändert!</em>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-3">
|
||||
<label class="form-label" for="price_travel">{{ __('Preis Übernachtungen') }}*</label>
|
||||
{{ Form::text('price_travel', $travel_user_booking_fewo->price_travel, array('placeholder'=>__('Preis Übernachtungen'), 'class'=>'form-control')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-3">
|
||||
<label class="form-label" for="price_service">{{ __('Preis Service-Gebühr') }}*</label>
|
||||
{{ Form::text('price_service', $travel_user_booking_fewo->price_service, array('placeholder'=>__('Preis Service-Gebühr'), 'class'=>'form-control')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-3">
|
||||
<label class="form-label" for="price_deposit">{{ __('Preis Kaution') }}*</label>
|
||||
{{ Form::text('price_deposit', $travel_user_booking_fewo->price_deposit, array('placeholder'=>__('Preis Kaution'), 'class'=>'form-control')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-3">
|
||||
<label class="form-label" for="price_total">{{ __('Preis Gesamt') }}*</label>
|
||||
{{ Form::text('price_total', $travel_user_booking_fewo->price_total, array('placeholder'=>__('Preis Gesamt'), 'class'=>'form-control', 'readonly')) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<hr>
|
||||
<div class="form-row">
|
||||
<div class="col-sm-12">
|
||||
<label class="form-label">Eingetragen in</label>
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="custom-control custom-checkbox">
|
||||
{!! Form::checkbox('is_calendar_fewo_direct', 1, $travel_user_booking_fewo->is_calendar_fewo_direct, ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">{{__('FEWO Direkt')}}</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="custom-control custom-checkbox">
|
||||
{!! Form::checkbox('is_calendar_hrs', 1, $travel_user_booking_fewo->is_calendar_hrs, ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">{{__('HRS')}}</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="custom-control custom-checkbox">
|
||||
{!! Form::checkbox('is_calendar_stern_tours', 1, $travel_user_booking_fewo->is_calendar_stern_tours, ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">{{__('STERN TOURS')}}</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="col-sm-6">
|
||||
<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>
|
||||
{!! HTMLHelper::getTravelBookingFewoChannelOptions($travel_user_booking_fewo->travel_booking_fewo_channel_id) !!}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="status_text">{{ __('Notiz') }}</label>
|
||||
{{ Form::textarea('status_text', $travel_user_booking_fewo->status_text, ['class' => 'form-control', 'rows'=>4]) }}
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="notice">{{ __('Bemerkung Kunde') }}*</label>
|
||||
{{ Form::textarea('notice', $travel_user_booking_fewo->notice, ['class' => 'form-control', 'rows'=>4]) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
97
resources/views/travel/user/booking/index.blade.php
Executable file
97
resources/views/travel/user/booking/index.blade.php
Executable file
|
|
@ -0,0 +1,97 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
{{ __('Buchungen') }} FeWo
|
||||
</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>
|
||||
<table id="datatables-default" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="max-width: 10px;"> </th>
|
||||
<th>{{__('ID')}}</th>
|
||||
<th>{{__('FeWo')}}</th>
|
||||
<th>{{__('Kunde')}}</th>
|
||||
<th>{{__('vom')}}</th>
|
||||
<th>{{__('bis')}}</th>
|
||||
<th>{{__('Eingetragen')}}</th>
|
||||
<th>{{__('Status')}}</th>
|
||||
<th>{{__('Datum')}}</th>
|
||||
<th style="max-width: 60px;">{{__('delete')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div class="mr-4 mt-2 text-right">
|
||||
<a href="{{ route('travel_user_booking_fewo_detail', ['new']) }}" class="btn btn-sm btn-primary">Neue Buchung anlegen</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
$('#datatables-default').dataTable({
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
"searching": false,
|
||||
"ajax": '{!! route('data_table_travel_user_booking_fewos') !!}',
|
||||
"columns": [
|
||||
{ data: 'action_edit', orderable: false, searchable: false},
|
||||
{ data: 'id', name: 'id' },
|
||||
{ data: 'fewo_lodging', name: 'fewo_lodging' },
|
||||
{ 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: 'status_name', name: 'status_name' },
|
||||
{ data: 'booking_date', name: 'booking_date' },
|
||||
{ data: 'action_delete', orderable: false, searchable: false},
|
||||
],
|
||||
"order": [[ 1, "desc" ]],
|
||||
"bLengthChange": false,
|
||||
"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();
|
||||
}*/
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@endsection
|
||||
41
resources/views/travel/user/detail.blade.php
Executable file
41
resources/views/travel/user/detail.blade.php
Executable file
|
|
@ -0,0 +1,41 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
Kunden @if($id == "new") <span class="text-primary">anlegen</span> @else {{"(ID: ".$id.")"}} verwalten @endif
|
||||
</h4>
|
||||
|
||||
{!! Form::open(['url' => route('travel_user_detail', [$id]), 'class' => 'form-horizontal']) !!}
|
||||
<input type="hidden" name="id" id="id" value="{{$id}}">
|
||||
|
||||
@include('travel.user.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_users')}}" class="btn btn-default">{{ __('back') }}</a>
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
@endsection
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
109
resources/views/travel/user/form.blade.php
Executable file
109
resources/views/travel/user/form.blade.php
Executable file
|
|
@ -0,0 +1,109 @@
|
|||
|
||||
<div class="card mb-2">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label">{{ __('Salutation') }}*</label>
|
||||
<select class="selectpicker" data-style="btn-light" name="salutation_id" required>
|
||||
{!! HTMLHelper::getSalutationOptions($travel_user->salutation_id) !!}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-sm-8">
|
||||
<label class="form-label" for="title">{{ __('Title') }}</label>
|
||||
{{ Form::text('title', $travel_user->title, array('placeholder'=>__('Title'), 'class'=>'form-control')) }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="first_name">{{ __('First name') }}*</label>
|
||||
{{ Form::text('first_name', $travel_user->first_name, array('placeholder'=>__('First name'), 'class'=>'form-control', 'required'=>true)) }}
|
||||
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="last_name">{{ __('Last Name') }}*</label>
|
||||
{{ Form::text('last_name', $travel_user->last_name, array('placeholder'=>__('Last Name'), 'class'=>'form-control', 'required'=>true)) }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="company">{{ __('Firma') }}</label>
|
||||
{{ Form::text('company', $travel_user->company, array('placeholder'=>__('Firma'), 'class'=>'form-control')) }}
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="street">{{ __('Street') }} / {{ __('House number') }}</label>
|
||||
{{ Form::text('street', $travel_user->street, array('placeholder'=>__('Street'), 'class'=>'form-control')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-3">
|
||||
<label class="form-label" for="zipcode">{{ __('Postcode') }}</label>
|
||||
{{ Form::text('zipcode', $travel_user->zipcode, array('placeholder'=>__('Postcode'), 'class'=>'form-control')) }}
|
||||
|
||||
</div>
|
||||
<div class="form-group col-sm-5">
|
||||
<label class="form-label" for="city">{{ __('City') }}</label>
|
||||
{{ Form::text('city', $travel_user->city, array('placeholder'=>__('City'), 'class'=>'form-control')) }}
|
||||
|
||||
</div>
|
||||
<div class="form-group col-sm-4 {{ $errors->has('travel_nationality_id') ? 'has-error' : '' }}">
|
||||
<label class="form-label">{{ __('Country') }}*</label>
|
||||
<select class="selectpicker" name="travel_nationality_id" id="travel_nationality_id" data-style="btn-light" data-live-search="true" required>
|
||||
{!! HTMLHelper::getTravelNationalityOptions($travel_user->travel_nationality_id) !!}
|
||||
</select>
|
||||
@if ($errors->has('travel_nationality_id'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('travel_nationality_id') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="phone">{{ __('Phone') }}</label>
|
||||
{{ Form::text('phone', $travel_user->phone, array('placeholder'=>__('Phone'), 'class'=>'form-control')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="mobil">{{ __('Mobile Phone') }}</label>
|
||||
{{ Form::text('mobil', $travel_user->mobil, array('placeholder'=>__('Mobile Phone'), 'class'=>'form-control')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
<label for="birthday" class="form-label">{{ __('Geburtstag') }}</label>
|
||||
{{ Form::text('birthday', $travel_user->birthday, array('placeholder'=>Util::formatDate(), 'data-date-format'=>Util::formatDate(), 'data-start_view'=>2, 'class'=>'form-control datepicker-birthday')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="fax">{{ __('Fax') }}</label>
|
||||
{{ Form::text('fax', $travel_user->fax, array('placeholder'=>__('Fax'), 'class'=>'form-control')) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="email">{{ __('E-Mail Address') }}*</label>
|
||||
{{ Form::text('email', $travel_user->email, array('placeholder'=>'E-Mail', 'class'=>'form-control', 'required'=>true)) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
58
resources/views/travel/user/index.blade.php
Executable file
58
resources/views/travel/user/index.blade.php
Executable file
|
|
@ -0,0 +1,58 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
{{ __('Kunden') }} (FeWo)
|
||||
</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_detail', ['new']) }}" class="btn btn-sm btn-primary">Neue Kunden anlegen</a>
|
||||
</div>
|
||||
<table id="datatables-default" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="max-width: 10px;"> </th>
|
||||
<th>{{__('ID')}}</th>
|
||||
<th>{{__('Vorname')}}</th>
|
||||
<th>{{__('Nachname')}}</th>
|
||||
<th>{{__('E-Mail')}}</th>
|
||||
<th style="max-width: 60px;">{{__('delete')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div class="mr-4 mt-2 text-right">
|
||||
<a href="{{ route('travel_user_detail', ['new']) }}" class="btn btn-sm btn-primary">Neue Kunden anlegen</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
$('#datatables-default').dataTable({
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
"ajax": '{!! route('data_table_travel_users') !!}',
|
||||
"columns": [
|
||||
{ data: 'action_edit', orderable: false, searchable: false},
|
||||
{ data: 'id', name: 'id' },
|
||||
{ data: 'first_name', name: 'first_name' },
|
||||
{ data: 'last_name', name: 'last_name' },
|
||||
{ data: 'email', name: 'email' },
|
||||
{ data: 'action_delete', orderable: false, searchable: false},
|
||||
],
|
||||
"order": [[ 1, "desc" ]],
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@endsection
|
||||
Loading…
Add table
Add a link
Reference in a new issue