mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
send gradido only one click
This commit is contained in:
parent
a2320908bc
commit
2dac88565b
@ -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
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user