mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
send coins works with gradido ID and email
This commit is contained in:
parent
9d79a92f3f
commit
a60f99a5e5
@ -5,9 +5,7 @@
|
|||||||
<b-row class="mt-5">
|
<b-row class="mt-5">
|
||||||
<b-col cols="2"></b-col>
|
<b-col cols="2"></b-col>
|
||||||
<b-col>
|
<b-col>
|
||||||
<div class="h4">
|
<div class="h4">{{ userName ? userName : identifier }}</div>
|
||||||
{{ email }}
|
|
||||||
</div>
|
|
||||||
<div class="mt-3 h5">{{ $t('form.memo') }}</div>
|
<div class="mt-3 h5">{{ $t('form.memo') }}</div>
|
||||||
<div>{{ memo }}</div>
|
<div>{{ memo }}</div>
|
||||||
</b-col>
|
</b-col>
|
||||||
@ -64,9 +62,10 @@ export default {
|
|||||||
name: 'TransactionConfirmationSend',
|
name: 'TransactionConfirmationSend',
|
||||||
props: {
|
props: {
|
||||||
balance: { type: Number, required: true },
|
balance: { type: Number, required: true },
|
||||||
email: { type: String, required: false, default: '' },
|
identifier: { type: String, required: false, default: '' },
|
||||||
amount: { type: Number, required: true },
|
amount: { type: Number, required: true },
|
||||||
memo: { type: String, required: true },
|
memo: { type: String, required: true },
|
||||||
|
userName: { type: String, default: '' },
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@ -55,7 +55,7 @@
|
|||||||
:name="$t('form.recipient')"
|
:name="$t('form.recipient')"
|
||||||
:label="$t('form.recipient')"
|
:label="$t('form.recipient')"
|
||||||
:placeholder="$t('form.email')"
|
:placeholder="$t('form.email')"
|
||||||
v-model="form.email"
|
v-model="form.identifier"
|
||||||
:disabled="isBalanceDisabled"
|
:disabled="isBalanceDisabled"
|
||||||
@onValidation="onValidation"
|
@onValidation="onValidation"
|
||||||
/>
|
/>
|
||||||
@ -148,7 +148,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
form: {
|
form: {
|
||||||
email: this.identifier,
|
identifier: this.identifier,
|
||||||
amount: this.amount ? String(this.amount) : '',
|
amount: this.amount ? String(this.amount) : '',
|
||||||
memo: this.memo,
|
memo: this.memo,
|
||||||
},
|
},
|
||||||
@ -161,16 +161,18 @@ export default {
|
|||||||
this.$refs.formValidator.validate()
|
this.$refs.formValidator.validate()
|
||||||
},
|
},
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
|
if (this.gradidoID) this.form.identifier = this.gradidoID
|
||||||
this.$emit('set-transaction', {
|
this.$emit('set-transaction', {
|
||||||
selected: this.radioSelected,
|
selected: this.radioSelected,
|
||||||
identifier: this.form.email,
|
identifier: this.form.identifier,
|
||||||
amount: Number(this.form.amount.replace(',', '.')),
|
amount: Number(this.form.amount.replace(',', '.')),
|
||||||
memo: this.form.memo,
|
memo: this.form.memo,
|
||||||
|
userName: this.userName,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onReset(event) {
|
onReset(event) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
this.form.email = ''
|
this.form.identifier = ''
|
||||||
this.form.amount = ''
|
this.form.amount = ''
|
||||||
this.form.memo = ''
|
this.form.memo = ''
|
||||||
this.$refs.formValidator.validate()
|
this.$refs.formValidator.validate()
|
||||||
@ -200,7 +202,7 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
disabled() {
|
disabled() {
|
||||||
if (
|
if (
|
||||||
this.form.email.length > 5 &&
|
this.form.identifier.length > 5 &&
|
||||||
parseInt(this.form.amount) <= parseInt(this.balance) &&
|
parseInt(this.form.amount) <= parseInt(this.balance) &&
|
||||||
this.form.memo.length > 5 &&
|
this.form.memo.length > 5 &&
|
||||||
this.form.memo.length <= 255
|
this.form.memo.length <= 255
|
||||||
@ -220,7 +222,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.form.email !== '') this.$refs.formValidator.validate()
|
if (this.form.identifier !== '') this.$refs.formValidator.validate()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -11,9 +11,7 @@
|
|||||||
<template #transactionConfirmationSend>
|
<template #transactionConfirmationSend>
|
||||||
<transaction-confirmation-send
|
<transaction-confirmation-send
|
||||||
:balance="balance"
|
:balance="balance"
|
||||||
:email="transactionData.email"
|
v-bind="transactionData"
|
||||||
:amount="transactionData.amount"
|
|
||||||
:memo="transactionData.memo"
|
|
||||||
@send-transaction="sendTransaction"
|
@send-transaction="sendTransaction"
|
||||||
@on-back="onBack"
|
@on-back="onBack"
|
||||||
></transaction-confirmation-send>
|
></transaction-confirmation-send>
|
||||||
@ -21,7 +19,7 @@
|
|||||||
<template #transactionConfirmationLink>
|
<template #transactionConfirmationLink>
|
||||||
<transaction-confirmation-link
|
<transaction-confirmation-link
|
||||||
:balance="balance"
|
:balance="balance"
|
||||||
:email="transactionData.email"
|
:email="transactionData.identifier"
|
||||||
:amount="transactionData.amount"
|
:amount="transactionData.amount"
|
||||||
:memo="transactionData.memo"
|
:memo="transactionData.memo"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user