@wikala/spmkt 2.31.0 → 2.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
<button name="enter_coupon" @click="applyCoupon" class="button is-small" :class="{ 'is-loading': acLoading }">{{ $t('cart.applyCoupon') }}</button>
|
|
7
7
|
</div>
|
|
8
8
|
<!-- Coupon the shop offers to this customer, passed by the server in initial state as offered_coupon -->
|
|
9
|
-
<div v-if="
|
|
9
|
+
<div v-if="offeredCoupon" class="pc-offer" data-test="offered-coupon">
|
|
10
10
|
<div>
|
|
11
11
|
{{ $t('cart.offeredCoupon') }}: <strong class="pc-offer-code">{{ offeredCoupon.code }}</strong>
|
|
12
|
-
<button type="button" name="apply_offered_coupon" class="button is-small pc-offer-apply" @click="applyCode(offeredCoupon.code)">{{ $t('cart.applyOfferedCoupon') }}</button>
|
|
12
|
+
<button v-if="!offeredCouponApplied" type="button" name="apply_offered_coupon" class="button is-small pc-offer-apply" @click="applyCode(offeredCoupon.code)">{{ $t('cart.applyOfferedCoupon') }}</button>
|
|
13
13
|
</div>
|
|
14
14
|
<div class="pc-offer-details">
|
|
15
15
|
{{ offeredCoupon.description }}
|
|
@@ -61,9 +61,8 @@ export default {
|
|
|
61
61
|
computed: {
|
|
62
62
|
...mapState(['cart']),
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
return this.
|
|
66
|
-
&& String(this.cart.coupon_code || '').toUpperCase() !== this.offeredCoupon.code.toUpperCase()
|
|
64
|
+
offeredCouponApplied() {
|
|
65
|
+
return String(this.cart.coupon_code || '').toUpperCase() === this.offeredCoupon.code.toUpperCase()
|
|
67
66
|
}
|
|
68
67
|
},
|
|
69
68
|
methods: {
|