@@ -23,9 +23,8 @@ export default {
RedeemInformation,
},
props: {
- user: { type: Object, required: true },
- amount: { type: String, required: true },
- memo: { type: String, required: true, default: '' },
+ linkData: { type: Object, required: true },
+ isContributionLink: { type: Boolean, default: false },
},
}
diff --git a/frontend/src/components/LinkInformations/RedeemValid.vue b/frontend/src/components/LinkInformations/RedeemValid.vue
index 301afad69..353fefaf8 100644
--- a/frontend/src/components/LinkInformations/RedeemValid.vue
+++ b/frontend/src/components/LinkInformations/RedeemValid.vue
@@ -1,9 +1,9 @@
-
+
-
+
{{ $t('gdd_per_link.redeem') }}
@@ -19,9 +19,8 @@ export default {
RedeemInformation,
},
props: {
- user: { type: Object, required: false },
- amount: { type: String, required: false },
- memo: { type: String, required: false, default: '' },
+ linkData: { type: Object, required: true },
+ isContributionLink: { type: Boolean, default: false },
},
}
diff --git a/frontend/src/graphql/queries.js b/frontend/src/graphql/queries.js
index 601880a51..adcd653a4 100644
--- a/frontend/src/graphql/queries.js
+++ b/frontend/src/graphql/queries.js
@@ -114,17 +114,33 @@ export const queryOptIn = gql`
export const queryTransactionLink = gql`
query($code: String!) {
queryTransactionLink(code: $code) {
- id
- amount
- memo
- createdAt
- validUntil
- redeemedAt
- deletedAt
- user {
- firstName
- publisherId
- email
+ ... on TransactionLink {
+ id
+ amount
+ memo
+ createdAt
+ validUntil
+ redeemedAt
+ deletedAt
+ user {
+ firstName
+ publisherId
+ email
+ }
+ }
+ ... on ContributionLink {
+ id
+ validTo
+ validFrom
+ amount
+ name
+ memo
+ cycle
+ createdAt
+ code
+ link
+ deletedAt
+ maxAmountPerMonth
}
}
}
diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json
index dd76dddf5..df621ed0b 100644
--- a/frontend/src/locales/de.json
+++ b/frontend/src/locales/de.json
@@ -26,6 +26,9 @@
"other-communities": "Weitere Gemeinschaften",
"switch-to-this-community": "zu dieser Gemeinschaft wechseln"
},
+ "contribution-link": {
+ "thanksYouWith": "dankt dir mit"
+ },
"decay": {
"before_startblock_transaction": "Diese Transaktion beinhaltet keine Vergänglichkeit.",
"calculation_decay": "Berechnung der Vergänglichkeit",
diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json
index e5ebbcb2c..c531f39f6 100644
--- a/frontend/src/locales/en.json
+++ b/frontend/src/locales/en.json
@@ -26,6 +26,9 @@
"other-communities": "Other communities",
"switch-to-this-community": "Switch to this community"
},
+ "contribution-link": {
+ "thanksYouWith": "thanks you with"
+ },
"decay": {
"before_startblock_transaction": "This transaction does not include decay.",
"calculation_decay": "Calculation of Decay",
diff --git a/frontend/src/pages/ResetPassword.vue b/frontend/src/pages/ResetPassword.vue
index d9bf1f891..ec7ae6811 100644
--- a/frontend/src/pages/ResetPassword.vue
+++ b/frontend/src/pages/ResetPassword.vue
@@ -88,7 +88,11 @@ export default {
? this.$t('message.checkEmail')
: this.$t('message.reset')
this.messageButtonText = this.$t('login')
- this.messageButtonLinktTo = '/login'
+ if (this.$route.params.code) {
+ this.messageButtonLinktTo = `/login/${this.$route.params.code}`
+ } else {
+ this.messageButtonLinktTo = '/login'
+ }
})
.catch((error) => {
let errorMessage
diff --git a/frontend/src/pages/TransactionLink.spec.js b/frontend/src/pages/TransactionLink.spec.js
index abc86f0ef..b1bbd8950 100644
--- a/frontend/src/pages/TransactionLink.spec.js
+++ b/frontend/src/pages/TransactionLink.spec.js
@@ -24,6 +24,7 @@ const transactionLinkValidExpireDate = () => {
apolloQueryMock.mockResolvedValue({
data: {
queryTransactionLink: {
+ __typename: 'TransactionLink',
id: 92,
amount: '22',
memo: 'Abrakadabra drei, vier, fünf, sechs, hier steht jetzt ein Memotext! Hex hex ',
@@ -82,6 +83,7 @@ describe('TransactionLink', () => {
variables: {
code: 'some-code',
},
+ fetchPolicy: 'no-cache',
})
})
@@ -90,6 +92,7 @@ describe('TransactionLink', () => {
apolloQueryMock.mockResolvedValue({
data: {
queryTransactionLink: {
+ __typename: 'TransactionLink',
id: 92,
amount: '22',
memo: 'Abrakadabra drei, vier, fünf, sechs, hier steht jetzt ein Memotext! Hex hex ',
@@ -120,6 +123,7 @@ describe('TransactionLink', () => {
apolloQueryMock.mockResolvedValue({
data: {
queryTransactionLink: {
+ __typename: 'TransactionLink',
id: 92,
amount: '22',
memo: 'Abrakadabra drei, vier, fünf, sechs, hier steht jetzt ein Memotext! Hex hex ',
@@ -150,6 +154,7 @@ describe('TransactionLink', () => {
apolloQueryMock.mockResolvedValue({
data: {
queryTransactionLink: {
+ __typename: 'TransactionLink',
id: 92,
amount: '22',
memo: 'Abrakadabra drei, vier, fünf, sechs, hier steht jetzt ein Memotext! Hex hex ',
@@ -177,9 +182,11 @@ describe('TransactionLink', () => {
describe('no token in store', () => {
beforeEach(() => {
+ mocks.$store.state.token = null
apolloQueryMock.mockResolvedValue({
data: {
queryTransactionLink: {
+ __typename: 'TransactionLink',
id: 92,
amount: '22',
memo: 'Abrakadabra drei, vier, fünf, sechs, hier steht jetzt ein Memotext! Hex hex ',
@@ -213,6 +220,7 @@ describe('TransactionLink', () => {
apolloQueryMock.mockResolvedValue({
data: {
queryTransactionLink: {
+ __typename: 'TransactionLink',
id: 92,
amount: '22',
memo: 'Abrakadabra drei, vier, fünf, sechs, hier steht jetzt ein Memotext! Hex hex ',
@@ -248,6 +256,7 @@ describe('TransactionLink', () => {
apolloQueryMock.mockResolvedValue({
data: {
queryTransactionLink: {
+ __typename: 'TransactionLink',
id: 92,
amount: '22',
memo: 'Abrakadabra drei, vier, fünf, sechs, hier steht jetzt ein Memotext! Hex hex ',
@@ -298,7 +307,7 @@ describe('TransactionLink', () => {
})
it('toasts a success message', () => {
- expect(mocks.$t).toBeCalledWith('gdd_per_link.redeemed', { n: '22' })
+ expect(mocks.$t).toBeCalledWith('gdd_per_link.redeem')
expect(toastSuccessSpy).toBeCalledWith('gdd_per_link.redeemed; ')
})
diff --git a/frontend/src/pages/TransactionLink.vue b/frontend/src/pages/TransactionLink.vue
index 5fc20326e..699c350ae 100644
--- a/frontend/src/pages/TransactionLink.vue
+++ b/frontend/src/pages/TransactionLink.vue
@@ -1,18 +1,21 @@