Merge branch 'le-gaulois-2024' into develop
This commit is contained in:
commit
8de7185411
5 changed files with 38 additions and 28 deletions
|
|
@ -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;
|
||||
|
|
|
|||
24
package-lock.json
generated
24
package-lock.json
generated
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
id="userCivility"
|
||||
class="form-select"
|
||||
:aria-label="trans.methods.__('Choisir la civilité dans la liste déroulante')"
|
||||
@change="setCivility($event)"
|
||||
>
|
||||
<option
|
||||
:value="null"
|
||||
|
|
@ -37,7 +38,6 @@
|
|||
v-for="civility in currentShop.civility"
|
||||
:key="civility.value"
|
||||
:value="civility.value"
|
||||
@click="setCivility(civility.value)"
|
||||
>
|
||||
{{ civility.label }}
|
||||
</option>
|
||||
|
|
@ -109,6 +109,7 @@
|
|||
id="userCivility"
|
||||
class="form-select"
|
||||
:aria-label="trans.methods.__('Choisir la civilité dans la liste déroulante')"
|
||||
@change="setShippingCivility($event)"
|
||||
>
|
||||
<option
|
||||
:value="null"
|
||||
|
|
@ -121,7 +122,6 @@
|
|||
v-for="civility in currentShop.civility"
|
||||
:key="civility.value"
|
||||
:value="civility.value"
|
||||
@click="setShippingCivility(civility.value)"
|
||||
>
|
||||
{{ civility.label }}
|
||||
</option>
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
])>
|
||||
<div class="row g-0 h-100 w-100">
|
||||
<div class="col-5">
|
||||
@if ((new \Detection\MobileDetect())->isMobile())
|
||||
{{-- @if ((new \Detection\MobileDetect())->isMobile())
|
||||
<img class="discount-product-img img-fluid"
|
||||
data-unavailable="{{ $discount->mobile_image_unavailable ?? $discount->desktop_image_unavailable }}"
|
||||
src="{{ $discount->mobile_image_available ?? $discount->desktop_image_available }}"
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
data-unavailable="{{ $discount->desktop_image_unavailable ?? $discount->mobile_image_unavailable }}"
|
||||
src="{{ $discount->desktop_image_available ?? $discount->mobile_image_available }}"
|
||||
alt="{{ __('Bon de réduction :name', ['name' => $discount->name]) }}">
|
||||
@endif
|
||||
@endif --}}
|
||||
</div>
|
||||
<div class="col-7">
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -168,15 +168,15 @@
|
|||
title="{{ $productModel->productTypes[0]->picture_title }}"
|
||||
alt="{{ $productModel->productTypes[0]->picture_alt }}">
|
||||
</button>
|
||||
{{-- Not displaying the button before we know more about it --}}
|
||||
{{-- <div class="collapse" id="productDemarcheMobile">
|
||||
<div class="collapse" id="productDemarcheMobile">
|
||||
{!! 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)
|
||||
<a class="btn btn-secondary" href="#FIXME:wait feeback JM">
|
||||
{{ __('En savoir plus') }}
|
||||
</a>
|
||||
@endif
|
||||
</div> --}}
|
||||
@endif --}}
|
||||
</div>
|
||||
</div>
|
||||
@elseif ($productModel->approach)
|
||||
<div class="col-12 d-xl-none product-paper-demarche">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue