mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
add redeem modal and start function redeemLink()
This commit is contained in:
parent
6be14e83b7
commit
e1f67df794
@ -75,3 +75,9 @@ export const deleteTransactionLink = gql`
|
||||
deleteTransactionLink(id: $id)
|
||||
}
|
||||
`
|
||||
|
||||
export const redeemTransactionLink = gql`
|
||||
mutation($id: Float!) {
|
||||
redeemTransactionLink(id: $id)
|
||||
}
|
||||
`
|
||||
|
||||
@ -104,6 +104,7 @@
|
||||
"link-copied": "Link wurde in die Zwischenablage kopiert",
|
||||
"links_count": "Aktive Links",
|
||||
"links_sum": "Summe deiner versendeten Gradidos",
|
||||
"link-overview":"Linkübersicht",
|
||||
"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",
|
||||
|
||||
@ -104,6 +104,7 @@
|
||||
"link-copied": "Link copied to clipboard",
|
||||
"links_count": "Active links",
|
||||
"links_sum": "Total of your sent Gradidos",
|
||||
"link-overview":"Link overview",
|
||||
"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",
|
||||
|
||||
@ -2,10 +2,6 @@
|
||||
<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">
|
||||
<!-- store: {{ $store.state }}
|
||||
<hr />
|
||||
displaySetup : {{ displaySetup }}
|
||||
-->
|
||||
<div>
|
||||
<b-jumbotron bg-variant="info" text-variant="dark" border-variant="dark">
|
||||
<h1>
|
||||
@ -22,7 +18,12 @@
|
||||
<b-button :disabled="disabled" variant="primary" @click="redeemLink" size="lg">
|
||||
{{ $t('gdd_per_link.redeem') }}
|
||||
</b-button>
|
||||
<div v-if="disabled" class="mt-3"><small>{{ $t('gdd_per_link.no-redeem') }}</small></div>
|
||||
<div v-if="disabled" class="mt-3">
|
||||
{{ $t('gdd_per_link.no-redeem') }}
|
||||
<a to="/transactions" href="#!">
|
||||
<b>{{ $t('gdd_per_link.link-overview') }}</b>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</b-jumbotron>
|
||||
</div>
|
||||
@ -90,12 +91,13 @@ export default {
|
||||
.mutate({
|
||||
mutation: redeemTransactionLink,
|
||||
variables: {
|
||||
id: this.id,
|
||||
id: this.displaySetup.id,
|
||||
},
|
||||
})
|
||||
.then(() => {
|
||||
this.toastSuccess(this.$t('gdd_per_link.deleted'))
|
||||
this.$emit('reset-transaction-link-list')
|
||||
.then((result) => {
|
||||
alert(result.data.redeemTransactionLink)
|
||||
// this.toastSuccess(this.$t('gdd_per_link.deleted'))
|
||||
// this.$emit('reset-transaction-link-list')
|
||||
})
|
||||
.catch((err) => {
|
||||
this.toastError(err.message)
|
||||
@ -105,13 +107,11 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
disabled() {
|
||||
return this.displaySetup.user.email === this.$store.state.email ? true : false
|
||||
|
||||
return this.displaySetup.user.email === this.$store.state.email
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.setTransactionLinkInformation()
|
||||
console.log(this)
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user