send gradido only one click

This commit is contained in:
ogerly 2021-05-13 17:08:11 +02:00
parent a2320908bc
commit 2dac88565b
2 changed files with 6 additions and 1 deletions

View File

@ -19,6 +19,7 @@
:amount="transactionData.amount"
:memo="transactionData.memo"
:date="transactionData.target_date"
:loading="loading"
@send-transaction="sendTransaction"
@on-reset="onReset"
></transaction-confirmation>
@ -74,6 +75,7 @@ export default {
transactionData: EMPTY_TRANSACTION_DATA,
error: false,
currentTransactionStep: 0,
loading: false,
}
},
props: {
@ -100,6 +102,7 @@ export default {
this.currentTransactionStep = 1
},
async sendTransaction() {
this.loading = true
const result = await communityAPI.send(this.$store.state.sessionId, this.transactionData)
if (result.success) {
this.error = false
@ -108,6 +111,7 @@ export default {
this.error = true
}
this.currentTransactionStep = 2
this.loading = false
},
onReset() {
this.transactionData = EMPTY_TRANSACTION_DATA

View File

@ -27,7 +27,7 @@
<b-button @click="$emit('on-reset')">{{ $t('form.cancel') }}</b-button>
</b-col>
<b-col class="text-right">
<b-button variant="success" @click="$emit('send-transaction')">
<b-button variant="success" :disabled="loading" @click="$emit('send-transaction')">
{{ $t('form.send_now') }}
</b-button>
</b-col>
@ -43,6 +43,7 @@ export default {
amount: { type: String, default: '' },
memo: { type: String, default: '' },
date: { type: String, default: '' },
loading: { type: Boolean, default: false },
},
}
</script>