mivita/resources/views/user/order/delivery.blade.php
2020-09-08 19:22:07 +02:00

97 lines
4.4 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
{{ __('navigation.my_orders') }} / {{ __('navigation.do_order') }}
</h4>
<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>
<label class="switcher switcher-secondary">
<input type="radio" class="switcher-input" name="switchers-radio-is-for" value="ot" @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 einen Kunden und wird an den Kunden versandt</span>
</label>
</div>
<hr>
<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"
data-id="show"
data-action="user-order-my-delivery-show"
data-back="{{route('user_order_my_delivery', [$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>
</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>
</div>
</div>
<hr>
@if($shopping_user)
@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 class="show-is-for-customer">
<h4>An diesen Kunde versenden</h4>
<p>Sollten unten stehend 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>
@include('admin.customer._customer_detail')
</div>
@endif
</div>
@if($shopping_user)
<div class="float-right">
<button type="submit" class="btn btn-secondary" name="action" value="next">bestätigen und weiter zur Bestellung</button>
</div>
@else
<div class="float-right" id="hide_for_ot">
<button type="submit" class="btn btn-secondary" name="action" value="next">bestätigen und weiter zur Bestellung</button>
</div>
@endif
</div>
{!! Form::close() !!}
</div>
<script>
$( document ).ready(function() {
$('input[name="switchers-radio-is-for"]').on('change', function (){
if($(this).val() === 'ot'){
$('#show-is-for-customer').show('slow');
$('#hide_for_ot').hide('slow');
}else{
$('#show-is-for-customer').hide('slow');
$('#hide_for_ot').show('slow');
}
});
});
</script>
@endsection