changed redeem for contribution link and transaction link

This commit is contained in:
ogerly 2022-06-16 10:21:59 +02:00
parent 7b66ba4064
commit 1ba7e86173
5 changed files with 28 additions and 9 deletions

View File

@ -1,8 +1,12 @@
<template> <template>
<div class="redeem-information"> <div class="redeem-information">
<b-jumbotron bg-variant="muted" text-variant="dark" border-variant="info"> <b-jumbotron bg-variant="muted" text-variant="dark" border-variant="info">
<h1> <h1 v-if="isContributionLink">
{{ firstName }} {{ CONFIG.COMMUNITY_NAME }}
{{ $t('contribution-link.thanksYouWith') }} {{ amount | GDD }}
</h1>
<h1 v-else>
{{ user.firstName }}
{{ $t('transaction-link.send_you') }} {{ amount | GDD }} {{ $t('transaction-link.send_you') }} {{ amount | GDD }}
</h1> </h1>
<b>{{ memo }}</b> <b>{{ memo }}</b>
@ -10,12 +14,20 @@
</div> </div>
</template> </template>
<script> <script>
import CONFIG from '@/config'
export default { export default {
name: 'RedeemInformation', name: 'RedeemInformation',
props: { props: {
firstName: { type: String, required: true }, user: { type: Object, required: true },
amount: { type: String, required: true }, amount: { type: String, required: true },
memo: { type: String, required: true, default: '' }, memo: { type: String, required: true, default: '' },
isContributionLink: { type: Boolean, default: false },
},
data() {
return {
CONFIG,
}
}, },
} }
</script> </script>

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="redeem-logged-out"> <div class="redeem-logged-out">
<redeem-information :firstName="user.firstName" :amount="amount" :memo="memo" /> <redeem-information v-bind="linkData" :isContributionLink="isContributionLink" />
<b-jumbotron> <b-jumbotron>
<div class="mb-6"> <div class="mb-6">
@ -32,9 +32,8 @@ export default {
RedeemInformation, RedeemInformation,
}, },
props: { props: {
user: { type: Object, required: true }, linkData: { type: Object, required: true },
amount: { type: String, required: true }, isContributionLink: { type: Boolean, default: false },
memo: { type: String, required: true, default: '' },
}, },
computed: { computed: {
login() { login() {

View File

@ -271,6 +271,9 @@
"transaction-link": { "transaction-link": {
"send_you": "sendet dir" "send_you": "sendet dir"
}, },
"contribution-link": {
"thanksYouWith":"dankt dir mit"
},
"via_link": "über einen Link", "via_link": "über einen Link",
"welcome": "Willkommen", "welcome": "Willkommen",
"WelcomeBy": "bei {name}" "WelcomeBy": "bei {name}"

View File

@ -271,6 +271,9 @@
"transaction-link": { "transaction-link": {
"send_you": "wants to send you" "send_you": "wants to send you"
}, },
"contribution-link": {
"thanksYouWith":"thanks you with"
},
"via_link": "via Link", "via_link": "via Link",
"welcome": "Welcome", "welcome": "Welcome",
"WelcomeBy": "by {name}" "WelcomeBy": "by {name}"

View File

@ -1,10 +1,9 @@
<template> <template>
<div class="show-transaction-link-informations"> <div class="show-transaction-link-informations">
<div class="text-center"><b-img :src="img" fluid alt="logo"></b-img></div>
<b-container class="mt-4"> <b-container class="mt-4">
<transaction-link-item :type="itemType"> <transaction-link-item :type="itemType">
<template #LOGGED_OUT> <template #LOGGED_OUT>
<redeem-logged-out v-bind="linkData" /> <redeem-logged-out :linkData="linkData" :isContributionLink="isContributionLink" />
</template> </template>
<template #SELF_CREATOR> <template #SELF_CREATOR>
@ -95,6 +94,9 @@ export default {
}, },
}, },
computed: { computed: {
isContributionLink() {
return this.$route.params.code.search(/^CL-/) === 0
},
itemType() { itemType() {
// link wurde gelöscht: am, von // link wurde gelöscht: am, von
if (this.linkData.deletedAt) { if (this.linkData.deletedAt) {