From 0feebca7e0ae2c01a5aa089d2635e5a403268450 Mon Sep 17 00:00:00 2001 From: Ludovic CANDELLIER Date: Thu, 22 Dec 2022 01:09:11 +0100 Subject: [PATCH] fixes --- .../Controllers/Shop/CustomerController.php | 14 ++++ build/css/site.css | 46 ++++++++++- .../partials/ArticleAddBasket.blade.php | 3 +- .../Shop/Articles/partials/article.blade.php | 2 +- .../partials/article_botanic.blade.php | 72 +++++++++-------- .../Articles/partials/article_rows.blade.php | 2 +- resources/views/Shop/Baskets/basket.blade.php | 4 +- .../Shop/Baskets/partials/article.blade.php | 2 +- .../Customers/partials/deliveries.blade.php | 5 +- .../Customers/partials/invoices.blade.php | 40 +++++---- .../Customers/partials/registration.blade.php | 78 ++++++++++++++++++ .../Shop/Customers/partials/sale.blade.php | 4 +- .../Shop/Customers/partials/user.blade.php | 45 ++++++++--- .../views/Shop/Customers/profile.blade.php | 15 ++-- .../partials/sliderByShelve.blade.php | 8 +- resources/views/Shop/Orders/order.blade.php | 21 +++-- .../Shop/auth/partials/register.blade.php | 81 +------------------ resources/views/Shop/home.blade.php | 4 +- resources/views/Shop/layout/layout.blade.php | 2 +- .../Shop/layout/partials/sections.blade.php | 4 +- resources/views/components/card.blade.php | 6 +- resources/views/paybox/aborted.blade.php | 16 ++-- resources/views/paybox/refused.blade.php | 16 ++-- routes/Shop/Customers.php | 2 + routes/web.php | 1 + 25 files changed, 298 insertions(+), 195 deletions(-) create mode 100644 resources/views/Shop/Customers/partials/registration.blade.php diff --git a/app/Http/Controllers/Shop/CustomerController.php b/app/Http/Controllers/Shop/CustomerController.php index 66228d84..29c0ea33 100644 --- a/app/Http/Controllers/Shop/CustomerController.php +++ b/app/Http/Controllers/Shop/CustomerController.php @@ -14,4 +14,18 @@ class CustomerController extends Controller $data = Customers::editProfile($id); return view('Shop.Customers.profile', $data); } + + public function modalProfile($id = false) + { + $data['old'] = Customers::get($id); + return view('Shop.Customers.partials.registration', $data); + } + + public function storeProfileAjax(Request $request) + { + $data = $request->all(); + $customer = Customers::store($data); + return response()->json(['error' => 0]); + } + } diff --git a/build/css/site.css b/build/css/site.css index 78d7f2d6..7c931492 100644 --- a/build/css/site.css +++ b/build/css/site.css @@ -1,6 +1,27 @@ body { font-family: 'noto_sanscondensed', sans-serif; /* line-height: 1em!important; */ + /* + background-image: linear-gradient(to right top, #1d382e, #234236, #2a4d3d, #315745, #39624c, #3a634d, #3a654d, #3b664e, #355e48, #2f5543, #2a4d3d, #254537); + */ + + background: rgb(52,91,71); + background: linear-gradient(180deg, rgba(52,91,71,1) 0%, rgba(45,81,63,1) 10%, rgba(24,48,39,1) 90%, rgba(28,54,45,1) 100%); + background-size: cover; + background-attachment: fixed; + +} + +.gradient-green1 { + background: linear-gradient(to right top, #395339, #3c573a, #3f5b3c, #425f3d, #45633e); +} + +.gradient-green2 { + background: linear-gradient(to right top, #2c5f45, #25503c, #1e4233, #19342a, #142620); +} + +.gradient-yellow1 { + background-image: linear-gradient(to left top, #efeac9, #e3dcb8, #d7cea6, #cbc196, #bfb385); } .content-wrapper { @@ -15,6 +36,19 @@ body { background-color: #335012; } +.bg-green-ultra-dark { + background: linear-gradient(to left top, #102723, #112723, #122724, #122724, #132724); + color: #a5b94f; +} + +.bg-green-ultra-dark a { + color: #a5b94f; +} + +.green-fluo { + color: #a5b94f!important; +} + .bg-green-light { background-color: #F1F7EE; } @@ -52,7 +86,12 @@ a.green-dark:hover { } .bg-yellow { - background-color: #F2B90F; + background-color: #f4c234; + color: #19342a; +} + +.bg-yellow-light { + background-color: #f9e7b4; } .bg-grey { @@ -60,9 +99,14 @@ a.green-dark:hover { } .yellow { + color: #e5c551; +} + +.yellow2 { color: #F2B90F; } + .light { color: #F5F5F5; } diff --git a/resources/views/Shop/Articles/partials/ArticleAddBasket.blade.php b/resources/views/Shop/Articles/partials/ArticleAddBasket.blade.php index 1346c755..ce54c8a1 100644 --- a/resources/views/Shop/Articles/partials/ArticleAddBasket.blade.php +++ b/resources/views/Shop/Articles/partials/ArticleAddBasket.blade.php @@ -12,7 +12,7 @@ 'data' => $article['offers']['plants'], 'title' => 'Plant', 'model' => 'plants', - 'bgClass' => 'bg-green', + 'bgClass' => 'bg-green-dark', ]) @endif @@ -44,7 +44,6 @@ label: '{{ __('Commander') }}', className: 'btn-success', callback: function() { - console.log('ici'); window.location = "{{ route('Shop.Basket.basket') }}"; } }, diff --git a/resources/views/Shop/Articles/partials/article.blade.php b/resources/views/Shop/Articles/partials/article.blade.php index 84e7d1b2..9a54912d 100644 --- a/resources/views/Shop/Articles/partials/article.blade.php +++ b/resources/views/Shop/Articles/partials/article.blade.php @@ -1,5 +1,5 @@ -
+
{{ $product_name }}
diff --git a/resources/views/Shop/Articles/partials/article_botanic.blade.php b/resources/views/Shop/Articles/partials/article_botanic.blade.php index 2440ba51..0dc73a56 100644 --- a/resources/views/Shop/Articles/partials/article_botanic.blade.php +++ b/resources/views/Shop/Articles/partials/article_botanic.blade.php @@ -1,36 +1,38 @@ -
-
- @if ($article_nature == 'semences') - Semences
- - {{ $article['semences']['variation'] ?? null }} - - @endif - @if ($article_nature == 'plants') - Plants
- - {{ $article['plants']['variation'] ?? null }} - - @endif +@if ($article_nature ?? false) +
+
+ @if ($article_nature == 'semences') + Semences
+ + {{ $article['semences']['variation'] ?? null }} + + @endif + @if ($article_nature == 'plants') + Plants
+ + {{ $article['plants']['variation'] ?? null }} + + @endif +
+
+ @if ($article_nature == 'semences') + + @if ($article['semences'] ?? false) + {{ $article['semences']['price'] ?? null }} € + @else + - + @endif +
+ @endif + @if ($article_nature == 'plants') + + @if ($article['plants'] ?? false) + {{ $article['plants']['price'] }} € + @else + - + @endif +
+ @endif +
-
- @if ($article_nature == 'semences') - - @if ($article['semences'] ?? false) - {{ $article['semences']['price'] ?? null }} € - @else - - - @endif -
- @endif - @if ($article_nature == 'plants') - - @if ($article['plants'] ?? false) - {{ $article['plants']['price'] }} € - @else - - - @endif -
- @endif -
-
\ No newline at end of file +@endif \ No newline at end of file diff --git a/resources/views/Shop/Articles/partials/article_rows.blade.php b/resources/views/Shop/Articles/partials/article_rows.blade.php index feda7750..0df9bb20 100644 --- a/resources/views/Shop/Articles/partials/article_rows.blade.php +++ b/resources/views/Shop/Articles/partials/article_rows.blade.php @@ -1,4 +1,4 @@ -
+
diff --git a/resources/views/Shop/Baskets/basket.blade.php b/resources/views/Shop/Baskets/basket.blade.php index 30c35b4e..0c8bc60c 100644 --- a/resources/views/Shop/Baskets/basket.blade.php +++ b/resources/views/Shop/Baskets/basket.blade.php @@ -17,7 +17,7 @@
@foreach ($basket as $nature => $items) -
+

{{ $nature }}

@foreach ($items as $item) @@ -28,7 +28,7 @@ @endforeach
- + @include('Shop.Baskets.partials.basketTotal')
diff --git a/resources/views/Shop/Baskets/partials/article.blade.php b/resources/views/Shop/Baskets/partials/article.blade.php index 474a6ce7..57494e17 100644 --- a/resources/views/Shop/Baskets/partials/article.blade.php +++ b/resources/views/Shop/Baskets/partials/article.blade.php @@ -1,6 +1,6 @@
- +

{{ $item['name'] }}

diff --git a/resources/views/Shop/Customers/partials/deliveries.blade.php b/resources/views/Shop/Customers/partials/deliveries.blade.php index c6bc8674..9146df02 100644 --- a/resources/views/Shop/Customers/partials/deliveries.blade.php +++ b/resources/views/Shop/Customers/partials/deliveries.blade.php @@ -1,13 +1,14 @@ @foreach ($deliveries as $delivery)
-
+
@include('components.form.radios.icheck', [ 'name' => 'delivery_id', + 'id_name' => 'delivery_id_' . $delivery['id'], 'value' => $delivery['id'], 'checked' => $customer['sale_delivery_id'] ?? false, ])
-
+
{{ $delivery['name'] }} - {{ $delivery['sale_channel']['name'] }}

{{ $delivery['description'] }}

diff --git a/resources/views/Shop/Customers/partials/invoices.blade.php b/resources/views/Shop/Customers/partials/invoices.blade.php index ee53666c..a05686f5 100644 --- a/resources/views/Shop/Customers/partials/invoices.blade.php +++ b/resources/views/Shop/Customers/partials/invoices.blade.php @@ -1,20 +1,26 @@ -
- @if ($customer['orders'] ?? false) +@if ($customer['orders'] ?? false) + @foreach ($customer['orders'] as $order) -
-
-
-
+
+ + + + + @endforeach - @endif - \ No newline at end of file +
+ {{ Carbon\Carbon::parse($order['created_at'])->format('d-m-Y') }} + Numero facture - -
- Date facture -
- - +
+ {{ $order['total_shipped'] }} € + + + + +
+@endif diff --git a/resources/views/Shop/Customers/partials/registration.blade.php b/resources/views/Shop/Customers/partials/registration.blade.php new file mode 100644 index 00000000..06c283b1 --- /dev/null +++ b/resources/views/Shop/Customers/partials/registration.blade.php @@ -0,0 +1,78 @@ +
+
+
+ {{ Form::text('first_name', old('first_name'), ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.first_name'), 'required', 'autofocus']) }} + {!! $errors->first('first_name','

:message

') !!} +
+
+
+
+ {{ Form::text('last_name', old('last_name'), ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.last_name'), 'required']) }} + {!! $errors->first('last_name','

:message

') !!} +
+
+
+
+
+
+ {{ Form::text('company', old('company'), ['class' => 'form-control', 'placeholder' => __('Société'), 'autofocus']) }} + {!! $errors->first('company','

:message

') !!} +
+
+
+
+
+
+ {{ Form::text('tva', old('tva'), ['class' => 'form-control', 'placeholder' => __('N° de TVA'), 'autofocus']) }} + {!! $errors->first('tva','

:message

') !!} +
+
+
+
+
+
+ {{ Form::email('email', old('email'), ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.email'), 'required']) }} + {!! $errors->first('email','

:message

') !!} +
+
+
+
+ {{ Form::text('phone', old('phone'), ['class' => 'form-control', 'placeholder' => __('phone')]) }} + {!! $errors->first('phone','

:message

') !!} +
+
+
+ +
+
+
+ {{ Form::text('address', old('address'), ['class' => 'form-control', 'placeholder' => __('Adresse de facturation'), 'required']) }} + {!! $errors->first('address','

:message

') !!} +
+
+
+ +
+
+
+ {{ Form::text('address2', old('address2'), ['class' => 'form-control', 'placeholder' => __('Complément d\'adresse')]) }} + {!! $errors->first('address2','

:message

') !!} +
+
+
+ +
+
+
+ {{ Form::text('zipcode', old('zipcode'), ['class' => 'form-control', 'placeholder' => __('zipcode'), 'required']) }} + {!! $errors->first('zipcode','

:message

') !!} +
+
+
+
+ {{ Form::text('city', old('city'), ['class' => 'form-control', 'placeholder' => __('city'), 'required']) }} + {!! $errors->first('city','

:message

') !!} +
+
+
+ diff --git a/resources/views/Shop/Customers/partials/sale.blade.php b/resources/views/Shop/Customers/partials/sale.blade.php index 84b0c35d..e2e7b866 100644 --- a/resources/views/Shop/Customers/partials/sale.blade.php +++ b/resources/views/Shop/Customers/partials/sale.blade.php @@ -10,10 +10,10 @@
-
+
@include('Shop.Customers.partials.deliveries')
-
+
@include('Shop.Customers.partials.invoices')
diff --git a/resources/views/Shop/Customers/partials/user.blade.php b/resources/views/Shop/Customers/partials/user.blade.php index a2ad4cd9..1af04e43 100644 --- a/resources/views/Shop/Customers/partials/user.blade.php +++ b/resources/views/Shop/Customers/partials/user.blade.php @@ -1,10 +1,37 @@ -
-Mes coordonnées
- {{ $customer['first_name'] }} {{ $customer['first_name'] }} {{ $customer['company'] }} - {{ $customer['address'] }}
- {{ $customer['address2'] }}
+ - {{ $customer['phone'] }}
- {{ $customer['email'] }}
-
-Compte créé le {{ Carbon\Carbon::parse($customer['created_at'])->format('d-m-Y') }} \ No newline at end of file + @if ($customer['company']) + + {{ $customer['company'] }} + @endif + + + {{ $customer['first_name'] }} {{ $customer['last_name'] }} +
+ + + {{ $customer['address'] }}
+ @if ($customer['address2']) + {{ $customer['address2'] }}
+ @endif + {{ $customer['zipcode'] }} {{ $customer['city'] }}
+
+ + {{ $customer['phone'] }}
+ {{ $customer['email'] }}
+
+ Compte créé le {{ Carbon\Carbon::parse($customer['created_at'])->format('d-m-Y') }} + +
+ +@push('js') + +@endpush \ No newline at end of file diff --git a/resources/views/Shop/Customers/profile.blade.php b/resources/views/Shop/Customers/profile.blade.php index fb3ee17e..d319caa2 100644 --- a/resources/views/Shop/Customers/profile.blade.php +++ b/resources/views/Shop/Customers/profile.blade.php @@ -3,11 +3,14 @@ ]) @section('content') -
-
- @include('Shop.Customers.partials.user') -
-
- @include('Shop.Customers.partials.sale') +
+
+ @include('Shop.Customers.partials.user') +
+
+ @include('Shop.Customers.partials.sale') +
@endsection + +@include('load.layout.modal') diff --git a/resources/views/Shop/Homepage/partials/sliderByShelve.blade.php b/resources/views/Shop/Homepage/partials/sliderByShelve.blade.php index 0ae3d4b5..7d816b29 100644 --- a/resources/views/Shop/Homepage/partials/sliderByShelve.blade.php +++ b/resources/views/Shop/Homepage/partials/sliderByShelve.blade.php @@ -1,8 +1,8 @@ @if ($shelve['articles']) -
+
-

{{ $shelve['name'] }}

+

{{ $shelve['name'] }}

Découvrir la sélection @@ -13,8 +13,8 @@
@foreach ($shelve['articles'] as $name => $article) diff --git a/resources/views/Shop/Orders/order.blade.php b/resources/views/Shop/Orders/order.blade.php index 7e17e269..a8ed6c5f 100644 --- a/resources/views/Shop/Orders/order.blade.php +++ b/resources/views/Shop/Orders/order.blade.php @@ -11,11 +11,11 @@

- + @include('Shop.auth.partials.login') - + @include('Shop.auth.partials.register') @endif @@ -23,15 +23,15 @@ {{ Form::open(['route' => 'Shop.Orders.store', 'id' => 'order-form', 'autocomplete' => 'off']) }}
- + @include('Shop.Orders.partials.addresses') - + @include('Shop.Orders.partials.deliveries') - + @include('Shop.Orders.partials.payments')
@@ -40,24 +40,29 @@
- + @include('Shop.Baskets.partials.basketTotal')
@endsection +@include('load.layout.chevron') + @push('js') @endpush \ No newline at end of file diff --git a/resources/views/Shop/auth/partials/register.blade.php b/resources/views/Shop/auth/partials/register.blade.php index 8c49834c..d0fb3628 100644 --- a/resources/views/Shop/auth/partials/register.blade.php +++ b/resources/views/Shop/auth/partials/register.blade.php @@ -2,83 +2,8 @@
-
-
-
- {{ Form::text('first_name', old('first_name'), ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.first_name'), 'required', 'autofocus']) }} - {!! $errors->first('first_name','

:message

') !!} -
-
-
-
- {{ Form::text('last_name', old('last_name'), ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.last_name'), 'required']) }} - {!! $errors->first('last_name','

:message

') !!} -
-
-
-
-
-
- {{ Form::text('company', old('company'), ['class' => 'form-control', 'placeholder' => __('Société'), 'autofocus']) }} - {!! $errors->first('company','

:message

') !!} -
-
-
-
-
-
- {{ Form::text('tva', old('tva'), ['class' => 'form-control', 'placeholder' => __('N° de TVA'), 'autofocus']) }} - {!! $errors->first('tva','

:message

') !!} -
-
-
-
-
-
- {{ Form::email('email', old('email'), ['class' => 'form-control', 'placeholder' => __('boilerplate::auth.fields.email'), 'required']) }} - {!! $errors->first('email','

:message

') !!} -
-
-
-
- {{ Form::text('phone', old('phone'), ['class' => 'form-control', 'placeholder' => __('phone')]) }} - {!! $errors->first('phone','

:message

') !!} -
-
-
-
-
-
- {{ Form::text('address', old('address'), ['class' => 'form-control', 'placeholder' => __('Adresse de livraison'), 'required']) }} - {!! $errors->first('address','

:message

') !!} -
-
-
- -
-
-
- {{ Form::text('address2', old('address2'), ['class' => 'form-control', 'placeholder' => __('Complément d\'adresse')]) }} - {!! $errors->first('address2','

:message

') !!} -
-
-
- -
-
-
- {{ Form::text('zipcode', old('zipcode'), ['class' => 'form-control', 'placeholder' => __('zipcode'), 'required']) }} - {!! $errors->first('zipcode','

:message

') !!} -
-
-
-
- {{ Form::text('city', old('city'), ['class' => 'form-control', 'placeholder' => __('city'), 'required']) }} - {!! $errors->first('city','

:message

') !!} -
-
-
+ @include('Shop.Customers.partials.registration')
@@ -97,8 +22,8 @@
- @include('components.form.checkbox', ['name' => 'use_for_invoice', 'value' => false]) - Utiliser aussi cette adresse pour la facturation + @include('components.form.checkbox', ['name' => 'use_for_delivery', 'value' => false]) + Utiliser une autre adresse pour la livraison
diff --git a/resources/views/Shop/home.blade.php b/resources/views/Shop/home.blade.php index fa937a97..e6127831 100644 --- a/resources/views/Shop/home.blade.php +++ b/resources/views/Shop/home.blade.php @@ -7,7 +7,7 @@ @if (!empty($text))
-
{!! $text !!}
+
{!! $text !!}
@endif @@ -27,7 +27,7 @@ $(document).ready(function() { $('.slider').slick({ lazyLoad: 'ondemand', - slidesToShow: 6, + slidesToShow: 5, slidesToScroll: 1, dots: false, autoplay: true, diff --git a/resources/views/Shop/layout/layout.blade.php b/resources/views/Shop/layout/layout.blade.php index b8f07b08..27e1bb06 100644 --- a/resources/views/Shop/layout/layout.blade.php +++ b/resources/views/Shop/layout/layout.blade.php @@ -23,7 +23,7 @@ -
+
@include("Shop.layout.partials.header")
diff --git a/resources/views/Shop/layout/partials/sections.blade.php b/resources/views/Shop/layout/partials/sections.blade.php index 942c0ef7..22c4a482 100644 --- a/resources/views/Shop/layout/partials/sections.blade.php +++ b/resources/views/Shop/layout/partials/sections.blade.php @@ -1,6 +1,6 @@
-
-