68 lines
2.1 KiB
PHP
68 lines
2.1 KiB
PHP
@extends('Shop.layout.layout', [
|
|
'title' => __('Commande'),
|
|
])
|
|
|
|
@section('content')
|
|
<div class="row">
|
|
<div class="col-8">
|
|
@if (!App\Repositories\Shop\Customers::isConnected())
|
|
<p>
|
|
<a href="#" id="customer" class="pr-5">Déja client ?</a>
|
|
<button class="btn btn-secondary" id="register">Créez mon compte</button>
|
|
</p>
|
|
|
|
<x-layout.collapse id="identification" title="Déjà client" class="d-none identification rounded-lg">
|
|
@include('Shop.auth.partials.login')
|
|
</x-layout.collapse>
|
|
|
|
<x-layout.collapse id="personal_data" title="Informations personnelles" class="d-none personal_data rounded-lg" uncollapsed=true>
|
|
@include('Shop.auth.partials.register')
|
|
</x-layout.collapse>
|
|
@endif
|
|
|
|
{{ Form::open(['route' => 'Shop.Orders.store', 'id' => 'order-form', 'autocomplete' => 'off']) }}
|
|
|
|
<div id="registred" @if (!App\Repositories\Shop\Customers::isConnected()) class="d-none" @endif>
|
|
<x-layout.collapse id="adresses" title="Adresses" class="rounded-lg mb-3" uncollapsed=true>
|
|
@include('Shop.Orders.partials.addresses')
|
|
</x-layout.collapse>
|
|
|
|
<x-layout.collapse id="delivery_mode" title="Mode de livraison" class="rounded-lg mb-3" uncollapsed=true>
|
|
@include('Shop.Orders.partials.deliveries')
|
|
</x-layout.collapse>
|
|
|
|
<x-layout.collapse id="payment" title="Paiement" class="rounded-lg mb-3" uncollapsed=true>
|
|
@include('Shop.Orders.partials.payments')
|
|
</x-layout.collapse>
|
|
</div>
|
|
|
|
{!! Form::close() !!}
|
|
|
|
</div>
|
|
<div class="col-4">
|
|
<x-card class='shadow'>
|
|
@include('Shop.Baskets.partials.basketTotal')
|
|
</x-card>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|
|
@include('load.layout.chevron')
|
|
|
|
@push('js')
|
|
<script>
|
|
$('#customer').click(function() {
|
|
$(".personal_data").addClass('d-none');
|
|
$('.identification').removeClass('d-none');
|
|
$('#identification').collapse('show');
|
|
});
|
|
$('#register').click(function() {
|
|
$('.identification').addClass('d-none');
|
|
$(".personal_data").removeClass('d-none');
|
|
$('#personal_data').collapse('show');
|
|
});
|
|
|
|
initChevron();
|
|
|
|
</script>
|
|
@endpush |