Fix on addresses

This commit is contained in:
ludo
2023-11-13 00:02:21 +01:00
parent 4ce3d528dd
commit 9f90f983ab
29 changed files with 660 additions and 447 deletions

View File

@@ -1,199 +1,213 @@
<div class="row">
<div class="col-lg-8">
<div class="row mb-3">
<div class="col-3">
{{ Form::label('model', 'Familles de produit') }}<br>
@include('components.form.select', [
'name' => 'product_type',
'id_name' => 'product_type',
'list' => $models_options,
'value' => $article['product_type'] ?? null,
'class' => 'select2',
'with_empty' => '',
'required' => true
])
</div>
<div class="col-6">
{{ Form::label('model_id', 'Produit') }}<br>
@include('components.form.select', [
'name' => 'product_id',
'id_name' => 'product_id',
'list' => $products ?? [],
'value' => $article['product_id'] ?? null,
'class' => 'select2',
'with_empty' => ''
])
</div>
<div class="col-3">
{{ Form::label('article_nature_id', __('shop.article_natures.name')) }}<br>
@include('components.form.select', [
'name' => 'article_nature_id',
'id_name' => 'article_nature_id',
'list' => $natures_options,
'value' => $article['article_nature_id'] ?? null,
'class' => 'select2',
'with_empty' => '',
'required' => true
])
</div>
</div>
<div class="col-lg-8">
<div class="row mb-3">
<div class="col-3">
@include('components.form.select', [
'name' => 'product_type',
'id_name' => 'product_type',
'list' => $models_options,
'value' => $article['product_type'] ?? null,
'class' => 'select2',
'with_empty' => '',
'label' => 'Familles de produit',
'required' => true,
])
</div>
<div class="col-6">
@include('components.form.select', [
'name' => 'product_id',
'id_name' => 'product_id',
'list' => $products ?? [],
'value' => $article['product_id'] ?? null,
'class' => 'select2',
'with_empty' => '',
'label' => 'Produit',
'required' => true,
])
</div>
<div class="col-3">
@include('components.form.select', [
'name' => 'article_nature_id',
'id_name' => 'article_nature_id',
'list' => $natures_options,
'value' => $article['article_nature_id'] ?? null,
'class' => 'select2',
'with_empty' => '',
'label' => __('shop.article_natures.name'),
'required' => true,
])
</div>
</div>
<div class="row mb-3">
<div class="col-8">
{{ Form::label('name', 'Nom') }}<br>
@include('components.form.input', ['name' => 'name', 'value' => $article['name'] ?? null, 'required' => true])
</div>
<div class="col-4">
{{ Form::label('ref', 'Référence') }}<br>
@include('components.form.input', ['name' => 'ref', 'value' => $article['ref'] ?? null])
</div>
</div>
<div class="row mb-3">
<div class="col-8">
@include('components.form.input', [
'name' => 'name',
'value' => $article['name'] ?? null,
'label' => 'Nom',
'required' => true,
])
</div>
<div class="col-4">
@include('components.form.input', [
'name' => 'ref',
'value' => $article['ref'] ?? null,
'label' => 'Référence',
'required' => true,
])
</div>
</div>
<div class="row mb-3">
<div class="col-8">
{{ Form::label('categories', __('shop.shelves.title')) }}<br>
@include('components.form.select', [
'name' => 'categories[]',
'list' => $categories_options,
'values' => $article['categories'] ?? null,
'class' => 'select2',
'multiple' => true
])
</div>
<div class="col-2">
{{ Form::label('visible', 'Visible') }}<br>
@include('components.form.toggle', [
'name' => 'visible',
'value' => ($article['visible'] ?? null),
'on' => __('oui'),
'off' => __('non'),
'meta' => 'data-id=' . ($article['id'] ?? null),
'size' => 'sm',
])
</div>
<div class="col-2">
{{ Form::label('homepage', __('Accueil')) }}<br>
@include('components.form.toggle', [
'name' => 'homepage',
'value' => ($article['homepage'] ?? null),
'on' => __('oui'),
'off' => __('non'),
'meta' => 'data-id=' . ($article['id'] ?? null),
'size' => 'sm',
])
</div>
</div>
<div class="row mb-3">
<div class="col-8">
@include('components.form.select', [
'name' => 'categories[]',
'list' => $categories_options,
'values' => $article['categories'] ?? null,
'class' => 'select2',
'multiple' => true,
'label' => __('shop.shelves.title'),
])
</div>
<div class="col-2">
@include('components.form.toggle', [
'name' => 'visible',
'value' => $article['visible'] ?? null,
'on' => __('oui'),
'off' => __('non'),
'meta' => 'data-id=' . ($article['id'] ?? null),
'size' => 'sm',
'label' => 'Visible',
])
</div>
<div class="col-2">
@include('components.form.toggle', [
'name' => 'homepage',
'value' => $article['homepage'] ?? null,
'on' => __('oui'),
'off' => __('non'),
'meta' => 'data-id=' . ($article['id'] ?? null),
'size' => 'sm',
'label' => 'Accueil',
])
</div>
</div>
<div class="row mb-3">
<div class="col-12">
{{ Form::label('tags', 'Tags') }}<br>
@include('components.form.selects.select-tree', [
'name' => 'tags[]',
'list' => $tags_list,
'values' => $article['tags'] ?? null,
'class' => 'select2',
'multiple' => true
])
</div>
</div>
<div class="row mb-3">
<div class="col-12">
@include('components.form.selects.select-tree', [
'name' => 'tags[]',
'list' => $tags_list,
'values' => $article['tags'] ?? null,
'class' => 'select2',
'multiple' => true,
'label' => 'Tags',
])
</div>
</div>
<div class="row mb-3">
<div class="col-12" id="product_description">
@include('Admin.Shop.Articles.partials.product.description')
</div>
</div>
<div class="row mb-3">
<div class="col-12" id="product_description">
@include('Admin.Shop.Articles.partials.product.description')
</div>
</div>
<div class="row mb-3">
<div class="col-12">
{{ Form::label('description', 'Description') }}
@include('components.form.textarea', [
'name' => 'description',
'value' => $article['description'] ?? null,
'class' => 'editor',
'required' => true
])
</div>
</div>
<div class="row mb-3">
<div class="col-12">
@include('components.form.textarea', [
'name' => 'description',
'value' => $article['description'] ?? null,
'class' => 'editor',
'required' => false,
'label' => 'Description',
])
</div>
</div>
</div>
<div class="col-lg-4">
<div id="product_images_inherited">
@include('Admin.Shop.Articles.partials.product.images')
</div>
@include('components.uploader.widget', [
'load_url' => route('Admin.Shop.Articles.getImages', ['id' => $article['id'] ?? false]),
'delete_url' => route('Admin.Shop.Articles.deleteImage'),
'title' => 'Photos',
'name' => 'images'
])
@include('Admin.Core.Comments.partials.comments', [
'model' => 'Shop.Article',
'model_id' => $article['id'] ?? false,
'comments' => $article['comments'] ?? false
])
</div>
</div>
<div class="col-lg-4">
<div id="product_images_inherited">
@include('Admin.Shop.Articles.partials.product.images')
</div>
@include('components.uploader.widget', [
'load_url' => route('Admin.Shop.Articles.getImages', ['id' => $article['id'] ?? false]),
'delete_url' => route('Admin.Shop.Articles.deleteImage'),
'title' => 'Photos',
'name' => 'images',
])
@include('Admin.Core.Comments.partials.comments', [
'model' => 'Shop.Article',
'model_id' => $article['id'] ?? false,
'comments' => $article['comments'] ?? false,
])
</div>
</div>
@push('js')
<script>
$("#product_id").change( function(e) {
var product = $('#product_id').select2('data');
var name = product[0]['text'];
$('input[name="name"]').val(name);
<script>
$("#product_id").change(function(e) {
var product = $('#product_id').select2('data');
var name = product[0]['text'];
$('input[name="name"]').val(name);
var product_type = $('#product_type').select2('data');
var name = product_type[0]['id'];
var url = "{{ route('Admin.Shop.Articles.getProductDescription') }}/" + product[0]['id'] + '/' + btoa(name);
$('#product_description').load(url);
var product_type = $('#product_type').select2('data');
var name = product_type[0]['id'];
var url = "{{ route('Admin.Shop.Articles.getProductDescription') }}/" + product[0]['id'] + '/' + btoa(
name);
$('#product_description').load(url);
var url = "{{ route('Admin.Shop.Articles.getProductImages') }}/" + product[0]['id'] + '/' + btoa(name);
$('#product_images_inherited').load(url);
});
var url = "{{ route('Admin.Shop.Articles.getProductImages') }}/" + product[0]['id'] + '/' + btoa(name);
$('#product_images_inherited').load(url);
});
$('#product_type').change( function() {
var product_type = $(this).val();
switch (product_type) {
case 'App\\Models\\Botanic\\Specie':
var url = '{{ route('Admin.Botanic.Species.getSelect') }}';
break;
case 'App\\Models\\Botanic\\Variety':
var url = '{{ route('Admin.Botanic.Varieties.getSelect') }}';
break;
case 'App\\Models\\Shop\\Merchandise':
var url = '{{ route('Admin.Shop.Merchandises.getSelect') }}';
break;
}
loadProducts(url);
var url = '{{ route('Admin.Shop.ArticleNatures.getOptions') }}';
loadArticleNatures(url);
});
$('#product_type').change(function() {
var product_type = $(this).val();
switch (product_type) {
case 'App\\Models\\Botanic\\Specie':
var url = '{{ route('Admin.Botanic.Species.getSelect') }}';
break;
case 'App\\Models\\Botanic\\Variety':
var url = '{{ route('Admin.Botanic.Varieties.getSelect') }}';
break;
case 'App\\Models\\Shop\\Merchandise':
var url = '{{ route('Admin.Shop.Merchandises.getSelect') }}';
break;
}
loadProducts(url);
var url = '{{ route('Admin.Shop.ArticleNatures.getOptions') }}';
loadArticleNatures(url);
});
function loadArticleNatures(url) {
$.ajax({
url : url,
method : 'POST',
data: {product_type: $('#product_type').val()},
success : function(data) {
setOptions('#article_nature_id', data);
// $("#product_id").select2({data: data});
// $("#product_id").trigger('change');
}
});
}
function loadArticleNatures(url) {
$.ajax({
url: url,
method: 'POST',
data: {
product_type: $('#product_type').val()
},
success: function(data) {
setOptions('#article_nature_id', data);
// $("#product_id").select2({data: data});
// $("#product_id").trigger('change');
}
});
}
function loadProducts(url) {
$.ajax({
url : url,
method : 'POST',
data: {article_nature_id: $('#article_nature_id').val()},
success : function(data) {
setOptions('#product_id', data);
// $("#product_id").select2({data: data});
// $("#product_id").trigger('change');
}
});
}
</script>
@endpush
function loadProducts(url) {
$.ajax({
url: url,
method: 'POST',
data: {
article_nature_id: $('#article_nature_id').val()
},
success: function(data) {
setOptions('#product_id', data);
// $("#product_id").select2({data: data});
// $("#product_id").trigger('change');
}
});
}
</script>
@endpush

View File

@@ -1,56 +1,58 @@
<x-card title="Détail de la {{ $detail_type }}" classBody="mt-3">
<div class="row">
<div class="col-12">
<table class="table table-bordered table-hover w-100 ">
<thead class="thead-light">
<th>Nom</th>
<th>Quantité</th>
<th>PU HT</th>
<th>TVA</th>
<th>PU TTC</th>
<th>Total TTC</th>
</thead>
<tbody>
@foreach ($order['detail'] as $detail)
<tr>
<td>{{ $detail['name'] }}</td>
<td align="right">{{ $detail['quantity'] }}</td>
<td align="right">{{ $detail['price'] }}</td>
<td align="right">{{ $detail['tax'] }}</td>
<td align="right">{{ $detail['price_taxed'] }}</td>
<td align="right">{{ $detail['total_taxed'] }}</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<td style="font-size: 1.2em; font-weight: bold;">Total</td>
<td></td>
<td></td>
<td align="right"></td>
<td align="right"></td>
<td align="right" style="font-size: 1.2em; font-weight: bold;">{{ $order['total_taxed'] }}</td>
</tr>
@if ($order['shipping'] ?? false)
<tr>
<td style="font-size: 1.1em; font-weight: 500;">Livraison</td>
<td align="right"></td>
<td align="right"></td>
<td align="right"></td>
<td align="right"></td>
<td align="right" style="font-size: 1.1em; font-weight: bold;">{{ $order['shipping'] }}</td>
</tr>
<tr>
<td style="font-size: 1.4em; font-weight: bold;">Total à payer</td>
<td align="right"></td>
<td align="right"></td>
<td align="right">{{ $order['taxes'] }}</td>
<td align="right"></td>
<td align="right" style="font-size: 1.4em; font-weight: bold;">{{ $order['total_shipped'] }}</td>
</tr>
@endif
</tfoot>
</table>
</div>
</div>
<x-card title="Détail de la {{ $detail_type }}">
<table class="table table-bordered table-hover w-100 ">
<thead class="thead-light">
<th>Nom</th>
<th>Quantité</th>
<th>PU HT</th>
<th>TVA</th>
<th>PU TTC</th>
<th>Total TTC</th>
</thead>
<tbody>
@foreach ($order['detail'] as $detail)
<tr>
<td>{{ $detail['name'] }}</td>
<td class="text-right">{{ $detail['quantity'] }}</td>
<td class="text-right">{{ $detail['price'] }}</td>
<td class="text-right">{{ $detail['tax'] }}</td>
<td class="text-right">{{ $detail['price_taxed'] }}</td>
<td class="text-right">{{ $detail['total_taxed'] }}</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<td style="font-size: 1.2em; font-weight: bold;">Total</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td style="font-size: 1.2em; font-weight: bold;" class="text-right">
{{ $order['total_taxed'] }}
</td>
</tr>
@if ($order['shipping'] ?? false)
<tr>
<td style="font-size: 1.1em; font-weight: 500;">Livraison</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td style="font-size: 1.1em; font-weight: bold;" class="text-right">
{{ $order['shipping'] }}
</td>
</tr>
<tr>
<td style="font-size: 1.4em; font-weight: bold;">Total à payer</td>
<td></td>
<td></td>
<td class="text-right">{{ $order['taxes'] }}</td>
<td></td>
<td style="font-size: 1.4em; font-weight: bold;" class="text-right">
{{ $order['total_shipped'] }}
</td>
</tr>
@endif
</tfoot>
</table>
</x-card>

View File

@@ -1,25 +1,54 @@
@extends('Shop.layout.layout', [
'title' => __('Editer son profil'),
'title' => __('Editer son profil'),
])
@section('content')
<div class="row">
<div class="col-6">
<x-card title="Mes coordonnées" class="gradient-green1">
@include('Shop.Customers.partials.registration')
</x-card>
</div>
<div class="col-6">
<x-card title="Mes adresses de livraison" class="gradient-green1 mb-3">
@include('Shop.Customers.partials.addresses', ['addresses' => $customer['addresses']])
</x-card>
{{ Form::open([
'route' => 'Shop.Customers.store',
'id' => 'customer-form',
'autocomplete' => 'off',
'files' => true,
]) }}
<x-card title="Mon mot de passe" class="gradient-green1">
@include('Shop.auth.passwords.password_confirmation')
</x-card>
</div>
</div>
<x-save />
<input type="hidden" name="id" id="id" value="{{ $customer['id'] ?? null }}">
<div class="row mb-3">
<div class="col-6">
<x-card title="Mes coordonnées" class="gradient-green1">
@include('Shop.Customers.partials.registration')
</x-card>
</div>
<div class="col-6">
<x-card title="Mes adresses de livraison" class="gradient-green1 mb-3">
@include('Shop.Customers.partials.addresses', [
'prefix' => 'deliveries',
'addresses' => $customer['delivery_addresses'],
])
</x-card>
<x-card title="Mes adresses de facturation" class="gradient-green1 mb-3">
@include('Shop.Customers.partials.addresses', [
'prefix' => 'invoices',
'addresses' => $customer['invoice_addresses'],
])
</x-card>
<x-card title="Mon mot de passe" class="gradient-green1">
@include('Shop.auth.passwords.password_confirmation')
</x-card>
</div>
</div>
<x-save />
</form>
@endsection
@include('load.form.save')
@include('load.layout.modal')
@push('js')
<script>
$(function() {
initSaveForm('#customer-form');
});
</script>
@endpush

View File

@@ -1,7 +1,7 @@
<div class="row">
<div class="col-12">
@include('components.form.input', [
'name' => ($prefix ?? '') . 'address',
'name' => $prefix ?? false ? $prefix . "['address']" : 'address',
'value' => $customer['address'] ?? '',
'label' => $label ?? '',
])
@@ -11,7 +11,7 @@
<div class="row">
<div class="col-12">
@include('components.form.input', [
'name' => ($prefix ?? '') . 'address2',
'name' => $prefix ?? false ? $prefix . "['address2']" : 'address2',
'value' => $customer['address2'] ?? '',
'label' => 'Complément d\'adresse',
])
@@ -21,16 +21,16 @@
<div class="row">
<div class="col-4">
@include('components.form.input', [
'name' => ($prefix ?? '') . 'zipcode',
'name' => $prefix ?? false ? $prefix . "['zipcode']" : 'zipcode',
'value' => $customer['zipcode'] ?? '',
'label' => 'Code postal',
])
</div>
<div class="col-8">
@include('components.form.input', [
'name' => ($prefix ?? '') . 'city',
'name' => $prefix ?? false ? $prefix . "['city']" : 'city',
'value' => $customer['city'] ?? '',
'label' => 'Ville',
])
</div>
</div>
</div>

View File

@@ -1,39 +1,42 @@
@foreach ($addresses ?? [] as $address)
<div class="row mt-3">
<div class="col-1">
<x-form.radios.icheck name="address_id" val="{{ $address['id'] }}" id="address_{{ $address['id'] }}"/>
<x-form.radios.icheck name="@if ($prefix ?? false) {{ $prefix }} . '[]' @endif address_id"
val="{{ $address['id'] }}" id="address_{{ $address['id'] }}" />
</div>
<div class="col-11">
{{ $address['address'] }}<br/>
{{ $address['address'] }}<br />
@if ($address['address2'])
{{ $address['address2'] }}<br/>
{{ $address['address2'] }}<br />
@endif
{{ $address['zipcode'] }} {{ $address['city'] }}
</div>
</div>
@endforeach
<div id="add_address_container" class="green-dark d-none mb-3 mt-3">
<div id="add_address_container_{{ $prefix }}" class="green-dark d-none mb-3 mt-3">
<x-card classBody="bg-green-dark yellow" title="Nouvelle adresse">
@include('Shop.Customers.partials.address', [
'prefix' => 'deliveries',
'prefix' => $prefix,
'with_country' => false,
'with_tab' => true,
'label' => 'Adresse',
'customer' => [],
])
</x-card>
</div>
<div class="row">
<div class="col-12 text-right">
<x-form.button id="add_address" icon="fa-plus" txt="Ajouter une adresse" class="btn-warning btn-sm" />
<x-form.button id="add_address_{{ $prefix }}" icon="fa-plus" txt="Ajouter une adresse"
class="btn-warning btn-sm" />
</div>
</div>
@push('js')
<script>
$('#add_address').click(function() {
$('#add_address_container').toggleClass('d-none');
$('#add_address_{{ $prefix }}').click(function() {
$('#add_address_container_{{ $prefix }}').toggleClass('d-none');
})
</script>
@endpush
@endpush

View File

@@ -48,4 +48,4 @@
</div>
</div>
@include('Shop.Customers.partials.address', ['label' => 'Adresse de facturation'])
@include('Shop.Customers.partials.address', ['label' => 'Adresse'])

View File

@@ -1,9 +1,11 @@
<nav>
<div class="nav nav-tabs pl-2">
<a href="#deliveries" data-toggle="tab" class="nav-item nav-link active" role="tab" aria-controls="deliveries" aria-selected="true">
<a href="#deliveries" data-toggle="tab" class="nav-item nav-link active" role="tab" aria-controls="deliveries"
aria-selected="true">
MON MODE D'ACHAT
</a>
<a href="#invoices" data-toggle="tab" class="nav-item nav-link" role="tab" aria-controls="invoices" aria-selected="false">
<a href="#invoices" data-toggle="tab" class="nav-item nav-link" role="tab" aria-controls="invoices"
aria-selected="false">
FACTURES ET SUIVI DE COMMANDES
</a>
</div>
@@ -11,9 +13,13 @@
<div class="tab-content">
<div class="tab-pane fade show active pt-0 pb-0" id="deliveries">
@include('Shop.Customers.partials.deliveries')
<x-card classBody="bg-light">
@include('Shop.Customers.partials.deliveries')
</x-card>
</div>
<div class="tab-pane fade show pt-0 pb-0" id="invoices">
@include('Shop.Customers.partials.invoices')
<x-card classBody="bg-light">
@include('Shop.Customers.partials.invoices')
</x-card>
</div>
</div>

View File

@@ -1,4 +1,5 @@
<x-card title="Mes coordonnées" class="mb-3 gradient-green1" outline=false classBody="pt-3" tools="<button id='profile_edit' class='btn btn-outline-warning'><i class='fa fa-fw fa-edit'></i></button>">
<x-card title="Mes coordonnées" class="mb-3 gradient-green1" outline=false classBody="pt-3"
tools="<button id='profile_edit' class='btn btn-outline-warning'><i class='fa fa-fw fa-edit'></i></button>">
@if ($customer['company'])
<i class="fa fa-building pr-2"></i>
@@ -28,13 +29,6 @@
<script>
$('#profile_edit').click(function() {
window.location.assign("{{ route('Shop.Customers.edit') }}");
/*
openModal('Modification de vos coordonnées',
'profile-form',
"{{ route('Shop.Customers.modalProfile') }}/",
"{{ route('Shop.Customers.storeProfile') }}",
);
*/
});
</script>
@endpush
@endpush

View File

@@ -1,16 +1,16 @@
@extends('Shop.layout.layout', [
'title' => __('Profil'),
'title' => __('Profil'),
])
@section('content')
<div class="row">
<div class="col-lg-3 col-md-12">
@include('Shop.Customers.partials.user')
</div>
<div class="col-lg-9 col-md-12">
@include('Shop.Customers.partials.sale')
</div>
</div>
<div class="row">
<div class="col-lg-3 col-md-12">
@include('Shop.Customers.partials.user')
</div>
<div class="col-lg-9 col-md-12">
@include('Shop.Customers.partials.sale')
</div>
</div>
@endsection
@include('load.layout.modal')

View File

@@ -1,75 +1,66 @@
@extends('Shop.layout.layout', [
'title' => __('Commande'),
'title' => __('Commande'),
])
@section('content')
<div class="row">
<div class="@if ($basket['count']) col-8 @else col-12 @endif">
@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>
<div class="row">
<div class="@if ($basket['count']) col-8 @else col-12 @endif">
@if (App\Repositories\Shop\Customers::isNotConnected())
<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="identification rounded-lg" uncollapsed=true>
@include('Shop.auth.partials.login')
</x-layout.collapse>
<x-layout.collapse id="identification" title="Déjà client" class="identification rounded-lg" uncollapsed=true>
@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>
@else
{{ Form::open(['route' => 'Shop.Orders.store', 'id' => 'order-form', 'autocomplete' => 'off']) }}
<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>
@else
{{ Form::open(['route' => 'Shop.Orders.store', 'id' => 'order-form', 'autocomplete' => 'off']) }}
@include('Shop.Orders.partials.registered')
{!! Form::close() !!}
@endif
<div id="registred">
<x-layout.collapse id="adresses" title="Adresse de facturation" class="rounded-lg mb-3" uncollapsed=true>
@include('Shop.Orders.partials.addresses', ['addresses' => $customer['invoicing_addresses'] ?? false])
</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="adresses" title="Adresse de livraison" class="rounded-lg mb-3 d-none" uncollapsed=true>
@include('Shop.Orders.partials.addresses', ['addresses' => $customer['delivery_addresses'] ?? false])
</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() !!}
@endif
</div>
@if ($basket['count'])
<div class="col-4">
<x-card class='shadow'>
@include('Shop.Baskets.partials.basketTotal')
</x-card>
</div>
@endif
</div>
</div>
@if ($basket['count'])
<div class="col-4">
<x-card class='shadow'>
@include('Shop.Baskets.partials.basketTotal')
</x-card>
</div>
@endif
</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');
});
<script>
$('#customer').click(function() {
$(".personal_data").addClass('d-none');
$('.identification').removeClass('d-none');
$('#identification').collapse('show');
});
initChevron();
$('#register').click(function() {
$('.identification').addClass('d-none');
$(".personal_data").removeClass('d-none');
$('#personal_data').collapse('show');
});
</script>
@endpush
$('#delivery_mode .delivery_mode').click(function() {
var test = $(this).hasClass('at_house');
if ($(this).hasClass('at_house')) {
$('#delivery_addresses').closest('.card').removeClass('d-none');
} else {
$('#delivery_addresses').closest('.card').addClass('d-none');
}
});
initChevron();
</script>
@endpush

View File

@@ -6,17 +6,17 @@
'name' => 'address_id',
'val' => $address['id'],
'id' => 'address_' . $address['id'],
'value' => (count($addresses) === 1) ? $address['id'] : false,
'value' => count($addresses) === 1 ? $address['id'] : false,
])
</div>
<div class="col-11">
{{ $address['name'] }}<br/>
{{ $address['address'] }}<br/>
{{ $address['name'] }}<br />
{{ $address['address'] }}<br />
@if ($address['address2'])
{{ $address['address2'] }}<br/>
{{ $address['address2'] }}<br />
@endif
{{ $address['zipcode'] }} {{ $address['city'] }}<br/>
{{ $address['zipcode'] }} {{ $address['city'] }}<br />
</div>
</div>
@endforeach
@endif
@endif

View File

@@ -5,17 +5,18 @@
'name' => 'delivery_id',
'val' => $delivery['id'],
'id' => 'delivery_' . $delivery['id'],
'class' => $delivery['at_house'] ? 'at_house' : '',
'class' => 'delivery_mode' . ($delivery['at_house'] ? ' at_house' : ''),
])
</div>
<div class="col-11">
<strong>{{ $delivery['name'] }} - Tarif appliqué {{ $delivery['sale_channel']['name'] }}</strong><br/>
<strong>{{ $delivery['name'] }} - Tarif appliqué {{ $delivery['sale_channel']['name'] }}</strong><br />
{!! $delivery['sale_channel']['description'] !!}
</div>
</div>
@endforeach
Si vous voulez laisser un message à propos de votre commande, merci de bien vouloir le renseigner dans le champs ci-contre
Si vous voulez laisser un message à propos de votre commande, merci de bien vouloir le renseigner dans le champs
ci-contre
@include('components.form.textarea', [
'name' => 'content',

View File

@@ -0,0 +1,23 @@
<div id="registred">
<x-layout.collapse id="invoice_addresses" title="Adresse de facturation" class="rounded-lg mb-3" uncollapsed=true>
@include('Shop.Orders.partials.addresses', [
'addresses' => $customer['invoice_addresses'] ?? false,
])
</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="delivery_addresses" title="Adresse de livraison" class="rounded-lg mb-3 d-none"
uncollapsed=true>
@include('Shop.Orders.partials.addresses', [
'addresses' => $customer['delivery_addresses'] ?? false,
])
@include('Shop.Orders.partials.shipping')
</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>

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1,74 @@
<div class="row">
<div class="col-6">
<h4>{{ $order['delivery']['name'] ?? '' }} </h4>
</div>
<div class="col-6 text-right">
</div>
</div>
<div class="row mb-3">
<div class="col-6">
<h3>
{{ $order['customer']['last_name'] }} {{ $order['customer']['first_name'] }}
</h3>
<div class="row">
<div class="col-6">
<x-card title="Adresse de facturation">
@if ($order['invoice']['address'])
{{ $order['invoice']['address']['address'] }}<br />
@isset($order['invoice']['address']['address2'])
{{ $order['invoice']['address']['address2'] }}<br />
@endisset
{{ $order['invoice']['address']['zipcode'] }}
{{ $order['invoice']['address']['city'] }}<br />
@endif
</x-card>
</div>
<div class="col-6">
<x-card title="Adresse de livraison">
@if ($order['delivery_address'])
{{ $order['delivery_address']['address'] }}<br />
@isset($order['delivery_address']['address2'])
{{ $order['delivery_address']['address2'] }}<br />
@endisset
{{ $order['delivery_address']['zipcode'] }}
{{ $order['delivery_address']['city'] }}<br />
@endif
</x-card>
</div>
</div>
</div>
<div class="col-6">
<div class="row mb-3">
<div class="col-6" style="font-size: 1.2em; font-weight: 500;">
Commande {{ $order['ref'] }}<br />
du {{ Carbon\Carbon::parse($order['created_at'])->isoFormat('LLLL') }}
</div>
<div class="col-6">
Statut : {{ $order['status'] }}
</div>
</div>
<div class="row mb-3">
<div class="col-6">
Canal de vente : {{ $order['sale_channel']['name'] }}
</div>
<div class="col-6">
Règlement : {{ $order['payment_type'] }}
</div>
</div>
<div class="row mb-3">
<div class="col-4">
Type de livraison : {{ $order['delivery_type_id'] }}
</div>
<div class="col-4">
Référence Colis : {{ $order['delivery_ref'] }}
</div>
<div class="col-4">
Lien suivi : {{ $order['delivery_link'] }}
</div>
</div>
</div>
</div>
@include('Admin.Shop.Orders.partials.detail', ['detail_type' => 'commande'])

View File

@@ -1,7 +1,11 @@
<div class="row mb-3 mt-3">
<label for="new-password" class="col-md-6 control-label text-right">Mot de passe actuel</label>
<div class="col-md-6">
<input id="current-password" type="password" class="form-control" name="current-password" required>
@include('components.form.input', [
'name' => $prefix ?? false ? $prefix . "['current-password']" : 'current-password',
'label' => $label ?? '',
'type' => 'password',
])
</div>
</div>

View File

@@ -1,6 +1,8 @@
<div @isset($id_card) id="{{ $id_card }}" @endisset class="card {{ $class ?? 'mb-0' }} {{ isset($tabs) ? ($outline ?? config('boilerplate.theme.card.outline', false)) ? 'card-outline-tabs' : 'card-tabs' : ''}} {{ ($outline ?? config('boilerplate.theme.card.outline', false)) ? 'card-outline' : '' }} card-{{ $color ?? config('boilerplate.theme.card.default_color', 'info') }}">
@if($title ?? $header ?? false)
<div class="card-header class="{{ $classHeader ?? '' }} {{ isset($tabs) ? ($outline ?? config('boilerplate.theme.card.outline', false)) ? 'p-0' : 'p-0 pt-1' : '' }} border-bottom-0">
<div @isset($id_card) id="{{ $id_card }}" @endisset
class="card {{ $class ?? 'mb-0' }} {{ isset($tabs) ? ($outline ?? config('boilerplate.theme.card.outline', false) ? 'card-outline-tabs' : 'card-tabs') : '' }} {{ $outline ?? config('boilerplate.theme.card.outline', false) ? 'card-outline' : '' }} card-{{ $color ?? config('boilerplate.theme.card.default_color', 'info') }}">
@if ($title ?? ($header ?? false))
<div
class="card-header {{ $classHeader ?? '' }} {{ isset($tabs) ? ($outline ?? config('boilerplate.theme.card.outline', false) ? 'p-0' : 'p-0 pt-1') : '' }} border-bottom-0">
@isset($header)
{{ $header }}
@else
@@ -13,12 +15,13 @@
@endisset
</div>
@endif
<div class="card-body {{ $title ?? false ? ($outline ?? config('boilerplate.theme.card.outline', false)) ? 'pt-0' : '' : '' }} {{ $class_body ?? '' }} {{ $classBody ?? '' }}">
<div
class="card-body {{ $title ?? false ? ($outline ?? config('boilerplate.theme.card.outline', false) ? 'pt-0' : '') : '' }} {{ $class_body ?? '' }} {{ $classBody ?? '' }}">
{{ $slot }}
</div>
@isset($footer)
<div class="card-footer {{ $classFooter ?? '' }}">
{{ $footer }}
</div>
@endif
</div>
@endif
</div>