From f49538fe4077f24b927ac3600b7fd54a9a9a3625 Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Tue, 22 Oct 2024 14:59:39 +0200 Subject: [PATCH 1/5] fix: Fix demarche collapse on product.show --- resources/views/fo/pages/products/show.blade.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/views/fo/pages/products/show.blade.php b/resources/views/fo/pages/products/show.blade.php index 95476099..d9099361 100644 --- a/resources/views/fo/pages/products/show.blade.php +++ b/resources/views/fo/pages/products/show.blade.php @@ -168,15 +168,15 @@ title="{{ $productModel->productTypes[0]->picture_title }}" alt="{{ $productModel->productTypes[0]->picture_alt }}"> - {{-- Not displaying the button before we know more about it --}} - {{--
+
{!! clean($productModel->productTypes[0]->description) !!} - @if ($productModel->productTypes[0]->button_status) + {{-- Not displaying the button before we know more about it --}} + {{-- @if ($productModel->productTypes[0]->button_status) {{ __('En savoir plus') }} - @endif -
--}} + @endif --}} +
@elseif ($productModel->approach)
From 452e1eae1e9bde7d5873c4a5696b3109251f2c93 Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Wed, 23 Oct 2024 09:12:29 +0200 Subject: [PATCH 2/5] feat: npm audit fix --- package-lock.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 31f30bee..9e6dd0bb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6469,9 +6469,9 @@ } }, "node_modules/rollup": { - "version": "3.29.4", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz", - "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==", + "version": "3.29.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.5.tgz", + "integrity": "sha512-GVsDdsbJzzy4S/v3dqWPJ7EfvZJfCHiDqe80IyrF59LYuP+e6U1LJoUqeuqRbwAWoMNoXivMNeNAOf5E22VA1w==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -7549,9 +7549,9 @@ "dev": true }, "node_modules/sweetalert2": { - "version": "11.13.2", - "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.13.2.tgz", - "integrity": "sha512-Q361QVJrDce3pA+46m2JmfDQyxxlmVE6t7ScoMwubm2PQKTlUqaMpzWq/DZRSPL8Sg2hUCzUAXQ9dwMPnbsy7Q==", + "version": "11.14.4", + "resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.14.4.tgz", + "integrity": "sha512-8QMzjxCuinwm18EK5AtYvuhP+lRMRxTWVXy8om9wGlULsXSI4TD29kyih3VYrSXMMBlD4EShFvNC7slhTC7j0w==", "dev": true, "funding": { "type": "individual", @@ -8421,9 +8421,9 @@ } }, "node_modules/vite": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.3.tgz", - "integrity": "sha512-kQL23kMeX92v3ph7IauVkXkikdDRsYMGTVl5KY2E9OY4ONLvkHf04MDTbnfo6NKxZiDLWzVpP5oTa8hQD8U3dg==", + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.5.tgz", + "integrity": "sha512-ifW3Lb2sMdX+WU91s3R0FyQlAyLxOzCSCP37ujw0+r5POeHPwe6udWVIElKQq8gk3t7b8rkmvqC6IHBpCff4GQ==", "dev": true, "dependencies": { "esbuild": "^0.18.10", @@ -8711,9 +8711,9 @@ } }, "node_modules/vite-plugin-eslint/node_modules/rollup": { - "version": "2.79.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", - "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", + "version": "2.79.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.2.tgz", + "integrity": "sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==", "dev": true, "bin": { "rollup": "dist/bin/rollup" From 9307ccfde9b5277725e871718e22c98adb7e9a13 Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Wed, 23 Oct 2024 09:13:08 +0200 Subject: [PATCH 3/5] fix: Handle MesBR error on getCustomerDiscountsCount call --- app/Models/Discount.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Models/Discount.php b/app/Models/Discount.php index 06dcc9de..e22449c2 100644 --- a/app/Models/Discount.php +++ b/app/Models/Discount.php @@ -158,7 +158,11 @@ class Discount extends Model public static function getCustomerDiscountsCount(string $hashcode): int { /** @var \LDC\MESBR\MesBr */ - $mesBr = app('mesBrAPI'); + $mesBr = app('mesBrAPI'); + $customerWall = $mesBr->getMurCustomer($hashcode); + if ($customerWall->status === "KO") { + return 0; + } return collect($mesBr->getMurCustomer($hashcode)->coupons)->filter(function ($discount) { return !$discount->used; From c8237c68cb1007d30417b8d7130e03eb20bf2e3f Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Wed, 23 Oct 2024 11:28:23 +0200 Subject: [PATCH 4/5] fix: Fix onChange civility value on club shop form --- .../components/club/shop/RecapComponent.vue | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/resources/ts/club/components/club/shop/RecapComponent.vue b/resources/ts/club/components/club/shop/RecapComponent.vue index 3fdf4189..f291facf 100644 --- a/resources/ts/club/components/club/shop/RecapComponent.vue +++ b/resources/ts/club/components/club/shop/RecapComponent.vue @@ -25,6 +25,7 @@ id="userCivility" class="form-select" :aria-label="trans.methods.__('Choisir la civilité dans la liste déroulante')" + @change="setCivility($event)" > @@ -109,6 +109,7 @@ id="userCivility" class="form-select" :aria-label="trans.methods.__('Choisir la civilité dans la liste déroulante')" + @change="setShippingCivility($event)" > @@ -494,20 +494,26 @@ function selectPayement(payment: number): void { /** * Add specific item to the customer cart. - * @param civility "{label: string, value: number}" + * e.target.value = "{label: string, value: number}" + * + * @param e Event * @return void */ -function setCivility(civility: number): void { - form.value.coords.civility = civility; +function setCivility(e: Event): void { + const input = e.target as HTMLOptionElement; + form.value.coords.civility = parseInt(input.value); } /** * Add specific item to the customer cart. - * @param civility "{label: string, value: number}" + * e.target.value = "{label: string, value: number}" + * + * @param e Event * @return void */ -function setShippingCivility(civility: number): void { - form.value.shipping!.civility = civility; +function setShippingCivility(e: Event): void { + const input = e.target as HTMLOptionElement; + form.value.shipping!.civility = parseInt(input.value); } /** From 35a3dd97fe3130366932e579069fc0de2888b1a6 Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Wed, 23 Oct 2024 11:38:15 +0200 Subject: [PATCH 5/5] feat: Hide img on BR card --- resources/views/club/partials/club-card-coupon.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/club/partials/club-card-coupon.blade.php b/resources/views/club/partials/club-card-coupon.blade.php index 2e5ff2a9..1e1dc614 100644 --- a/resources/views/club/partials/club-card-coupon.blade.php +++ b/resources/views/club/partials/club-card-coupon.blade.php @@ -11,7 +11,7 @@ ])>
- @if ((new \Detection\MobileDetect())->isMobile()) + {{-- @if ((new \Detection\MobileDetect())->isMobile()) {{ __('Bon de réduction :name', ['name' => $discount->name]) }} - @endif + @endif --}}