[WIP] Order process with interactive methods

This commit is contained in:
Ludovic CANDELLIER
2022-07-03 23:36:33 +02:00
parent 06cfb92757
commit 573e98a2ce
6 changed files with 30 additions and 15 deletions

View File

@@ -1,6 +1,6 @@
@extends('layout.index', [
'title' => __('shop.homepages.title'),
'subtitle' => __('shop.homepages.add'),
'title' => __('Contenus'),
'subtitle' => __('Ajouter un contenu'),
])
@section('content')

View File

@@ -1,7 +1,6 @@
@extends('layout.index', [
'title' => __('shop.homepages.title'),
'subtitle' => __('shop.homepages.edit'),
'breadcrumb' => [__('shop.homepages.title')]
'title' => __('Contenus'),
'subtitle' => __('Editer un contenu'),
])
@section('content')

View File

@@ -1,7 +1,6 @@
@extends('layout.index', [
'title' => __('shop.homepages.title'),
'subtitle' => __('shop.homepages.list'),
'breadcrumb' => [__('shop.homepages.title')]
'title' => __('Contenus'),
'subtitle' => __('Liste des contenus'),
])
@section('content')

View File

@@ -6,14 +6,16 @@
<div class="row">
<div class="col-8">
@if (!App\Repositories\Shop\Customers::isConnected())
Déja client ?
<button class="btn">Créez mon compte</button>
<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">
<x-layout.collapse id="identification" title="Déjà client" class="d-none identification">
@include('Shop.auth.partials.login')
</x-layout.collapse>
<x-layout.collapse id="personal_data" title="Informations personnelles">
<x-layout.collapse id="personal_data" title="Informations personnelles" class="d-none personal_data">
@include('Shop.auth.partials.register')
</x-layout.collapse>
@endif
@@ -43,5 +45,15 @@
@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');
})
</script>
@endpush

View File

@@ -16,9 +16,14 @@
</a>
</li>
<li class="dropdown-item">
<a href="{{ route('Shop.logout') }}" title="Vous déconnectez" rel="nofollow">
<span>Se déconnecter</span>
<a href="#" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
Déconnexion
</a>
<form id="logout-form" action="{{ route('Shop.logout') }}" method="POST" style="display: none;">
@csrf
</form>
</li>
@else
<li class="dropdown-item">