This commit is contained in:
Kevin Adametz 2024-08-05 12:05:24 +02:00
parent 04d677d37a
commit bfa3bb1df4
1191 changed files with 637397 additions and 10619 deletions

View file

@ -2,112 +2,202 @@
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
{{ __('navigation.my_orders') }} / {{ __('navigation.do_order') }}
{{ __('navigation.my_orders') }}
</h4>
{!! Form::open(['url' => route('user_order_my_delivery', [$for, $delivery_id]), 'class' => 'form-horizontal']) !!}
<div class="card">
<div class="card-body p-2 p-md-4">
{!! Form::open(['url' => route('user_order_my_delivery', [$for, $delivery_id]), 'class' => 'form-horizontal']) !!}
<h4>Lieferdaten</h4>
<div class="switchers-stacked">
<label class="switcher switcher-secondary">
<input type="radio" class="switcher-input" name="switchers-radio-is-for" value="me" @if(!$shopping_user) checked="checked" @endif >
<span class="switcher-indicator">
<span class="switcher-yes"></span>
<span class="switcher-no"></span>
</span>
<span class="switcher-label">Ware ist für mich und wird an meine Adresse versandt</span>
</label>
<h4>{{ __('navigation.do_order') }}</h4>
<label class="switcher switcher-secondary">
<input type="radio" class="switcher-input" name="switchers-radio-is-for" value="ot" @if($shopping_user) checked="checked" @endif>
<input type="radio" class="switcher-input" name="switchers-radio-is-for" value="me" @if(!$shopping_user && $for === 'me') checked="checked" @endif >
<span class="switcher-indicator">
<span class="switcher-yes"></span>
<span class="switcher-no"></span>
</span>
<span class="switcher-label">Ware ist für einen Kunden und wird an den Kunden versandt</span>
<span class="switcher-label">{{ __('order.goods_are_for_me_and_shipped') }}</span>
</label>
<label class="switcher switcher-secondary mt-3">
<input type="radio" class="switcher-input" name="switchers-radio-is-for" value="ot-member" @if($shopping_user && $for === 'ot-member') checked="checked" @endif>
<span class="switcher-indicator">
<span class="switcher-yes"></span>
<span class="switcher-no"></span>
</span>
<span class="switcher-label">
{{ __('order.goods_are_for_customer_and_shipped') }}
<span class="badge badge-secondary" data-toggle="tooltip" data-placement="top" title="{{ __('order.ipay_text') }}"><strong>({{ __('order.ipay') }})</strong></span>
</span>
</label>
<label class="switcher switcher-secondary mt-3">
<input type="radio" class="switcher-input" name="switchers-radio-is-for" value="ot-customer" @if($shopping_user && $for === 'ot-customer') checked="checked" @endif>
<span class="switcher-indicator">
<span class="switcher-yes"></span>
<span class="switcher-no"></span>
</span>
<span class="switcher-label">
{{ __('order.goods_are_for_customer_and_shipped') }}
<span class="badge badge-secondary" data-toggle="tooltip" data-placement="top" title="{{ __('order.cpay_text') }}"><strong>({{ __('order.cpay') }})</strong></span>
</span>
</label>
<hr>
<h4>{{ __('order.abo_delivery') }}</h4>
<label class="switcher switcher-secondary">
<input type="radio" class="switcher-input" name="switchers-radio-is-for" value="abo-me" @if(!$shopping_user && $for === 'abo-me') checked="checked" @endif>
<span class="switcher-indicator">
<span class="switcher-yes"></span>
<span class="switcher-no"></span>
</span>
<span class="switcher-label">{{ __('order.abo_are_for_me_and_shipped') }}</span>
</label>
<label class="switcher switcher-secondary mt-3">
<input type="radio" class="switcher-input" name="switchers-radio-is-for" value="abo-ot-member" @if($shopping_user && $for === 'abo-ot-member') checked="checked" @endif>
<span class="switcher-indicator">
<span class="switcher-yes"></span>
<span class="switcher-no"></span>
</span>
<span class="switcher-label">
{{ __('order.abo_are_for_customer_and_shipped') }}
<span class="badge badge-secondary" data-toggle="tooltip" data-placement="top" title="{{ __('order.ipay_text') }}"><strong>({{ __('order.ipay') }})</strong></span>
</span>
</label>
<label class="switcher switcher-secondary mt-3">
<input type="radio" class="switcher-input" name="switchers-radio-is-for" value="abo-ot-customer" @if($shopping_user && $for === 'abo-ot-customer') checked="checked" @endif>
<span class="switcher-indicator">
<span class="switcher-yes"></span>
<span class="switcher-no"></span>
</span>
<span class="switcher-label">
{{ __('order.abo_are_for_customer_and_shipped') }}
<span class="badge badge-secondary" data-toggle="tooltip" data-placement="top" title="{{ __('order.cpay_text') }}"><strong>({{ __('order.cpay') }})</strong></span>
</span>
</label>
</div>
<hr>
@if(Session::has('custom-error'))
<div class="alert alert-dark-warning alert-dismissible fade show">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>{{ Session::get('custom-error') }}</strong>
</div>
@endif
<div id="show-is-for-customer" @if(!$shopping_user) style="display: none" @endif >
<div class="form-row">
<div class="form-group col-sm-6">
<button type="button" class="btn btn-sm btn-secondary" data-toggle="modal" data-target="#modals-load-content"
<button type="button" class="btn btn-sm btn-secondary" id="button-user-order-my-delivery-show" data-toggle="modal" data-target="#modals-load-content"
data-id="show"
data-action="user-order-my-delivery-show"
data-back="{{route('user_order_my_delivery', [$for])}}"
data-isfor="{{ $for }}"
data-modal="modal-xl"
data-route="{{route('modal_load')}}"><span class="fa fa-shopping-cart"></span> An bestehenden Kunden versenden | Kunden auswählen</button>
data-route="{{route('modal_load')}}"><span class="fa fa-shopping-cart"></span> {{ __('order.ship_to_existing_customer_select_customer') }}</button>
</div>
<div class="form-group col-sm-6">
<a href="{{route('user_customer_add', ['new'])}}" class="btn btn-sm btn-primary">An neuen Kunden versenden | <i class="ion ion-md-person-add"></i> Kunden hinzufügen</a>
<a href="{{route('user_customer_add', ['new'])}}" class="btn btn-sm btn-primary">{{ __('order.ship_to_new_customer') }} | <i class="ion ion-md-person-add"></i> {{ __('order.add_customer') }}</a>
</div>
</div>
<hr>
@if($shopping_user)
<div class="show-is-for-customer">
<h4>An diesen Kunde versenden</h4>
<p>Sollten unten stehende Angaben nicht korrekt sein oder aktualisiert werden müssen, ändere diese bitte vorerst unter:
<a href="{{route('user_customers')}}">Meine Kunden -> Übersicht</a> -> <a href="{{route('user_customer_detail', $shopping_user->id)}}"><i class="fa fa-edit"></i> Kunde</a></a></p>
<h4>{{ __('order.ship_to_this_customer') }}</h4>
<p>{{ __('order.ship_to_this_customer_info') }}:
<a href="{{route('user_customers')}}">{{ __('navigation.my_clients') }} -> {{ __('navigation.overview') }}</a> -> <a href="{{route('user_customer_detail', $shopping_user->id)}}"><i class="fa fa-edit"></i> {{ __('navigation.clients') }}</a></a></p>
@include('admin.customer._customer_detail')
</div>
@endif
</div>
@if($shopping_user)
<div class="" id="hide_for_me">
<hr>
<div class="form-group">
<label class="custom-control custom-checkbox m-2 ">
<input type="checkbox" class="custom-control-input" name="check_for_ot" id="checkbox_for_me" required>
<span class="custom-control-label secondary">{{__('Mir ist bekannt, dass dieser Bestellvorgang nur für Kundenbestellungen ist und nicht für meine eigenen Bestellungen')}}</span>
</label>
</div>
</div>
<div class="float-rights">
<button type="submit" class="btn btn-secondary" name="action" value="next">bestätigen und weiter zur Bestellung</button>
</div>
@if($shopping_user)
<div class="" id="hide_for_me">
<hr>
<div class="form-group">
<label class="custom-control custom-checkbox m-2 ">
<input type="checkbox" class="custom-control-input" name="check_for_ot" id="checkbox_for_me" required>
<span class="custom-control-label secondary">{{ __('order.ship_to_this_customer_check') }}</span>
</label>
</div>
</div>
<div class="float-rights">
<button type="submit" class="btn btn-secondary" name="action" value="next">{{ __('order.confirm_and_proceed_to_order') }}</button>
</div>
@else
<div class="float-rights" id="hide_for_ot">
<button type="submit" class="btn btn-secondary" name="action" value="next">bestätigen und weiter zur Bestellung</button>
<button type="submit" class="btn btn-secondary" name="action" value="next">{{ __('order.confirm_and_proceed_to_order') }}</button>
</div>
@endif
</div>
{!! Form::close() !!}
</div>
{!! Form::close() !!}
<script>
$( document ).ready(function() {
function showHideCustomer($val) {
switch($val){
case 'me':
$('#show-is-for-customer').hide('slow');
$('#hide_for_ot').show('slow');
$('#hide_for_me').hide('slow');
$('#checkbox_for_me').attr('required', false);
break;
case 'abo-me':
$('#show-is-for-customer').hide('slow');
$('#hide_for_ot').show('slow');
$('#hide_for_me').hide('slow');
$('#checkbox_for_me').attr('required', false);
break;
case 'ot-member':
$('#show-is-for-customer').show('slow');
$('#hide_for_ot').hide('slow');
$('#hide_for_me').show('slow');
$('#button-user-order-my-delivery-show').data('isfor', 'ot-member');
$('#checkbox_for_me').attr('required', true);
break;
case 'ot-customer':
$('#show-is-for-customer').show('slow');
$('#hide_for_ot').hide('slow');
$('#hide_for_me').show('slow');
$('#button-user-order-my-delivery-show').data('isfor', 'ot-customer');
$('#checkbox_for_me').attr('required', true);
break;
case 'abo-ot-member':
$('#show-is-for-customer').show('slow');
$('#hide_for_ot').hide('slow');
$('#hide_for_me').show('slow');
$('#button-user-order-my-delivery-show').data('isfor', 'abo-ot-member');
$('#checkbox_for_me').attr('required', true);
break;
case 'abo-ot-customer':
$('#show-is-for-customer').show('slow');
$('#hide_for_ot').hide('slow');
$('#hide_for_me').show('slow');
$('#button-user-order-my-delivery-show').data('isfor', 'abo-ot-customer');
$('#checkbox_for_me').attr('required', true);
break;
}
}
$('input[name="switchers-radio-is-for"]').on('change', function (){
if($(this).val() === 'ot'){
$('#show-is-for-customer').show('slow');
$('#hide_for_ot').hide('slow');
$('#hide_for_me').show('slow');
$('#checkbox_for_me').attr('required', true);
}else{
$('#show-is-for-customer').hide('slow');
$('#hide_for_ot').show('slow');
$('#hide_for_me').hide('slow');
$('#checkbox_for_me').attr('required', false);
}
showHideCustomer($(this).val());
});
showHideCustomer($('input[name="switchers-radio-is-for"]:checked').val());
});
</script>
@endsection