From 3d86619802378ab712549abd6670a4627731ce74 Mon Sep 17 00:00:00 2001 From: Kostya Date: Sun, 26 Nov 2023 17:08:00 +0300 Subject: [PATCH] added logic for accept data from modal --- .../src/components/archive/PaymentsModal.vue | 1 + luckydiamond/src/pages/ProfilePage.vue | 25 +++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/luckydiamond/src/components/archive/PaymentsModal.vue b/luckydiamond/src/components/archive/PaymentsModal.vue index 417b5a5..9076d9e 100644 --- a/luckydiamond/src/components/archive/PaymentsModal.vue +++ b/luckydiamond/src/components/archive/PaymentsModal.vue @@ -45,6 +45,7 @@ export default { return this.$emit('closemodal') }, detectorMethod(method) { + this.closeModal() if (method === 'dep') { return this.$emit('deposit', this.amount) } diff --git a/luckydiamond/src/pages/ProfilePage.vue b/luckydiamond/src/pages/ProfilePage.vue index 057f894..fa91973 100644 --- a/luckydiamond/src/pages/ProfilePage.vue +++ b/luckydiamond/src/pages/ProfilePage.vue @@ -48,7 +48,7 @@ - + @@ -66,7 +66,8 @@ export default { username: 'Artemka', balance: 25000, openModal: false, - payments: true + payments: true, + arrayHistory: [], } }, methods: { @@ -77,6 +78,26 @@ export default { withdrawClick() { this.openModal = true this.payments = false + }, + claimDataDeposit(amount) { + const historyPayments = { + name: 'TEST USER', + comment: 'test', + data: '5ч назад', + amount: amount + } + + this.arrayHistory.push(historyPayments) + }, + claimDataWithdraw(amount) { + const historyPayments = { + name: 'TEST USER', + comment: 'test', + data: '5ч назад', + amount: -amount + } + + this.arrayHistory.push(historyPayments) } } }