mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 12:19:31 +02:00
added logic for accept data from modal
This commit is contained in:
@@ -45,6 +45,7 @@ export default {
|
|||||||
return this.$emit('closemodal')
|
return this.$emit('closemodal')
|
||||||
},
|
},
|
||||||
detectorMethod(method) {
|
detectorMethod(method) {
|
||||||
|
this.closeModal()
|
||||||
if (method === 'dep') {
|
if (method === 'dep') {
|
||||||
return this.$emit('deposit', this.amount)
|
return this.$emit('deposit', this.amount)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<payments-modal v-if="openModal" @closemodal="openModal = false" :payments="payments"></payments-modal>
|
<payments-modal v-if="openModal" @deposit="claimDataDeposit" @withdraw="claimDataWithdraw" @closemodal="openModal = false" :payments="payments"></payments-modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -66,7 +66,8 @@ export default {
|
|||||||
username: 'Artemka',
|
username: 'Artemka',
|
||||||
balance: 25000,
|
balance: 25000,
|
||||||
openModal: false,
|
openModal: false,
|
||||||
payments: true
|
payments: true,
|
||||||
|
arrayHistory: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -77,6 +78,26 @@ export default {
|
|||||||
withdrawClick() {
|
withdrawClick() {
|
||||||
this.openModal = true
|
this.openModal = true
|
||||||
this.payments = false
|
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user