diff --git a/frontend/components/cart/global/CartSummary.vue b/frontend/components/cart/global/CartSummary.vue index 02bbf39..a6d3ec0 100644 --- a/frontend/components/cart/global/CartSummary.vue +++ b/frontend/components/cart/global/CartSummary.vue @@ -35,6 +35,8 @@ const { mutateAsync: deleteSpecialDiscountCode, isPending: deleteSpecialDiscount const { mutateAsync: pay, isPending: paymentIsPending } = usePayOrder(); +const isTermsAccepted = ref(false); + // computed const nextPage = computed(() => route.meta.nextPage as { name: string; label: string; query?: string } | undefined); @@ -99,7 +101,7 @@ const handleSubmitSpecialDiscountCode = () => { }); specialDiscountCode.value = ""; }, - } + }, ); }; @@ -141,7 +143,7 @@ const handlePayment = () => { }, }); }, - } + }, ); }; @@ -155,7 +157,7 @@ watch( } else { discountCode.value = ""; } - } + }, ); watch( @@ -166,7 +168,7 @@ watch( } else { specialDiscountCode.value = ""; } - } + }, ); @@ -312,6 +314,7 @@ watch( class="w-full rounded-100" @click="handlePayment" variant="primary" + :disabled="!isTermsAccepted" > {{ nextPage?.label }} @@ -329,6 +332,40 @@ watch( +