diff --git a/frontend/spa/src/stores/CartStore.js b/frontend/spa/src/stores/CartStore.js index bb33e80..67d8e93 100644 --- a/frontend/spa/src/stores/CartStore.js +++ b/frontend/spa/src/stores/CartStore.js @@ -16,6 +16,8 @@ export const useCartStore = defineStore('cart', { success: '', coupon: '', voucher: '', + error_coupon: '', + error_voucher: '', }), getters: { @@ -128,10 +130,11 @@ export const useCartStore = defineStore('cart', { try { this.isLoading = true; this.error_warning = ''; + this.error_coupon = ''; const response = await setCoupon(this.coupon); if (response.error) { - this.error_warning = response.error; + this.error_coupon = response.error; } else { await this.getProducts(); } @@ -147,10 +150,11 @@ export const useCartStore = defineStore('cart', { try { this.isLoading = true; this.error_warning = ''; + this.error_voucher = ''; const response = await setVoucher(this.voucher); if (response.error) { - this.error_warning = response.error; + this.error_voucher = response.error; } else { await this.getProducts(); } diff --git a/frontend/spa/src/views/Cart.vue b/frontend/spa/src/views/Cart.vue index 8935472..3f8828f 100644 --- a/frontend/spa/src/views/Cart.vue +++ b/frontend/spa/src/views/Cart.vue @@ -14,6 +14,20 @@ {{ cart.error_warning }} +