mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
add id to query queryTransactionLink, add locales for redeem amount, check auth
This commit is contained in:
parent
e2bba25679
commit
5dc1d1e67c
@ -132,6 +132,7 @@ export const communities = gql`
|
||||
export const queryTransactionLink = gql`
|
||||
query($code: String!) {
|
||||
queryTransactionLink(code: $code) {
|
||||
id
|
||||
amount
|
||||
memo
|
||||
createdAt
|
||||
@ -139,6 +140,7 @@ export const queryTransactionLink = gql`
|
||||
user {
|
||||
firstName
|
||||
publisherId
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -107,6 +107,7 @@
|
||||
"not-copied": "Konnte den Link nicht kopieren: {err}",
|
||||
"sentence_1": "Wähle einen Betrag aus, welchen du per Link versenden möchtest. Du kannst auch noch eine Nachricht eintragen. Beim Klick „jetzt generieren“ wird ein Link erstellt, den du versenden kannst.",
|
||||
"redeem":"Einlösen",
|
||||
"redeem-text":"Willst du den Betrag jetzt einlösen?",
|
||||
"no-account":"Du hast noch kein Gradido Konto",
|
||||
"to-register":"Registriere ein neues Konto",
|
||||
"has-account":"Du hast einen Gradido Konto",
|
||||
|
||||
@ -107,6 +107,7 @@
|
||||
"not-copied": "Could not copy link: {err}",
|
||||
"sentence_1": "Select an amount that you would like to send via link. You can also enter a message. Click 'Generate now' to create a link that you can share.",
|
||||
"redeem": "Redeem",
|
||||
"redeem-text":"Do you want to redeem the amount now?",
|
||||
"no-account": "You don't have a Gradido account yet",
|
||||
"to-register": "Register a new account",
|
||||
"has-account": "You have a Gradido account",
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
<div class="show-transaction-link-informations">
|
||||
<div class="text-center"><b-img :src="img" fluid alt="logo"></b-img></div>
|
||||
<b-container class="pt-5">
|
||||
displaySetup : {{displaySetup}}
|
||||
<div>
|
||||
<b-jumbotron bg-variant="info" text-variant="dark" border-variant="dark">
|
||||
<h1>
|
||||
@ -12,7 +13,19 @@
|
||||
</b-jumbotron>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div v-if="$store.state.token">
|
||||
<b-jumbotron>
|
||||
<div class="mb-3 text-center">
|
||||
|
||||
|
||||
<b-button variant="primary" to="/register" size="lg">
|
||||
{{ $t('gdd_per_link.redeem') }}
|
||||
</b-button>
|
||||
</div>
|
||||
</b-jumbotron>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
<b-jumbotron>
|
||||
<div class="mb-6">
|
||||
<h2>{{ $t('gdd_per_link.redeem') }}</h2>
|
||||
@ -67,9 +80,29 @@ export default {
|
||||
this.toastError(error)
|
||||
})
|
||||
},
|
||||
redeemLink() {
|
||||
this.$bvModal.msgBoxConfirm(this.$t('gdd_per_link.redeem-text')).then(async (value) => {
|
||||
if (value)
|
||||
await this.$apollo
|
||||
.mutate({
|
||||
mutation: deleteTransactionLink,
|
||||
variables: {
|
||||
id: this.id,
|
||||
},
|
||||
})
|
||||
.then(() => {
|
||||
this.toastSuccess(this.$t('gdd_per_link.deleted'))
|
||||
this.$emit('reset-transaction-link-list')
|
||||
})
|
||||
.catch((err) => {
|
||||
this.toastError(err.message)
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.setTransactionLinkInformation()
|
||||
console.log(this)
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user