feat(frontend): send coins via gradidoID

This commit is contained in:
Moriz Wahl 2023-03-14 12:17:10 +01:00
parent b67192f108
commit 0936602cb6
4 changed files with 17 additions and 3 deletions

View File

@ -50,7 +50,7 @@
<b-col>
<b-row>
<b-col cols="12">
<div v-if="radioSelected === sendTypes.send">
<div v-if="radioSelected === sendTypes.send && !gradidoID">
<input-email
:name="$t('form.recipient')"
:label="$t('form.recipient')"
@ -60,6 +60,14 @@
@onValidation="onValidation"
/>
</div>
<div v-else-if="gradidoID" class="mb-4">
<b-row>
<b-col>{{ $t('form.recipient') }}</b-col>
</b-row>
<b-row>
<b-col>{{ gradidoID }}</b-col>
</b-row>
</div>
</b-col>
<b-col cols="12" lg="6">
<input-amount
@ -196,6 +204,9 @@ export default {
recipientEmail() {
return this.getTunneledEmail()
},
gradidoID() {
return this.$route.query && this.$route.query.gradidoID
},
},
created() {
this.setNewRecipientEmail()

View File

@ -1,7 +1,7 @@
<template>
<div class="name">
<div class="gdd-transaction-list-item-name">
<div v-if="linkedUser && linkedUser.email">
<div v-if="linkedUser && linkedUser.gradidoID">
<b-link @click.stop="tunnelEmail" :class="fontColor">
{{ itemText }}
</b-link>
@ -36,7 +36,8 @@ export default {
methods: {
tunnelEmail() {
this.$emit('set-tunneled-email', this.linkedUser.email)
if (this.$router.history.current.fullPath !== '/send') this.$router.push({ path: '/send' })
if (this.$router.history.current.fullPath !== '/send')
this.$router.push({ path: '/send', query: { gradidoID: this.linkedUser.gradidoID } })
},
},
computed: {

View File

@ -144,6 +144,7 @@ export const createContributionMessage = gql`
export const login = gql`
mutation($email: String!, $password: String!, $publisherId: Int) {
login(email: $email, password: $password, publisherId: $publisherId) {
gradidoID
email
firstName
lastName

View File

@ -38,6 +38,7 @@ export const transactionsQuery = gql`
linkedUser {
firstName
lastName
gradidoID
email
}
decay {