From 64199167f6685dfeea3b7e0f92c3c5c0f0c3d705 Mon Sep 17 00:00:00 2001 From: Kostya Date: Wed, 13 Dec 2023 23:51:57 +0300 Subject: [PATCH] added checking amount --- luckydiamond/src/components/PaymentsModal.vue | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/luckydiamond/src/components/PaymentsModal.vue b/luckydiamond/src/components/PaymentsModal.vue index 0cebd3b..b2ba961 100644 --- a/luckydiamond/src/components/PaymentsModal.vue +++ b/luckydiamond/src/components/PaymentsModal.vue @@ -64,22 +64,24 @@ export default { watch: { amount(newAmount) { console.log(newAmount) - this.offBtn = true - console.log('OFFBTN', this.offBtn) - setTimeout(() => { - try { - GettingMoneyOperation(newAmount) - .then((response) => { - console.log('Payments Modal Working!: ', response) - this.url = response.url - this.offBtn = false - console.log('ONBTN', this.offBtn) - }) - } - catch (e) { - console.error('Error in PaymentModal!', e) - } - }, 2000) + if (!this.amount < 0 && this.amount !== '' ) { + this.offBtn = true + console.log('OFFBTN', this.offBtn) + setTimeout(() => { + try { + GettingMoneyOperation(newAmount) + .then((response) => { + console.log('Payments Modal Working!: ', response) + this.url = response.url + this.offBtn = false + console.log('ONBTN', this.offBtn) + }) + } + catch (e) { + console.error('Error in PaymentModal!', e) + } + }, 2000) + } } }, methods: {