diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e9762b4bb..18d1143db 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -438,7 +438,7 @@ jobs: report_name: Coverage Frontend type: lcov result_path: ./coverage/lcov.info - min_coverage: 94 + min_coverage: 95 token: ${{ github.token }} ############################################################################## diff --git a/backend/src/graphql/resolver/TransactionLinkResolver.ts b/backend/src/graphql/resolver/TransactionLinkResolver.ts index ea55fe3b9..646a7c296 100644 --- a/backend/src/graphql/resolver/TransactionLinkResolver.ts +++ b/backend/src/graphql/resolver/TransactionLinkResolver.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ -import { Resolver, Args, Arg, Authorized, Ctx, Mutation, Query } from 'type-graphql' +import { Resolver, Args, Arg, Authorized, Ctx, Mutation, Query, Int } from 'type-graphql' import { TransactionLink } from '@model/TransactionLink' import { TransactionLink as dbTransactionLink } from '@entity/TransactionLink' import { User as dbUser } from '@entity/User' @@ -70,7 +70,10 @@ export class TransactionLinkResolver { @Authorized([RIGHTS.DELETE_TRANSACTION_LINK]) @Mutation(() => Boolean) - async deleteTransactionLink(@Arg('id') id: number, @Ctx() context: any): Promise { + async deleteTransactionLink( + @Arg('id', () => Int) id: number, + @Ctx() context: any, + ): Promise { const { user } = context const transactionLink = await dbTransactionLink.findOne({ id }) @@ -96,7 +99,7 @@ export class TransactionLinkResolver { @Authorized([RIGHTS.QUERY_TRANSACTION_LINK]) @Query(() => TransactionLink) async queryTransactionLink(@Arg('code') code: string): Promise { - const transactionLink = await dbTransactionLink.findOneOrFail({ code }) + const transactionLink = await dbTransactionLink.findOneOrFail({ code }, { withDeleted: true }) const user = await dbUser.findOneOrFail({ id: transactionLink.userId }) let redeemedBy: User | null = null if (transactionLink && transactionLink.redeemedBy) { @@ -131,9 +134,12 @@ export class TransactionLinkResolver { @Authorized([RIGHTS.REDEEM_TRANSACTION_LINK]) @Mutation(() => Boolean) - async redeemTransactionLink(@Arg('id') id: number, @Ctx() context: any): Promise { + async redeemTransactionLink( + @Arg('code', () => String) code: string, + @Ctx() context: any, + ): Promise { const { user } = context - const transactionLink = await dbTransactionLink.findOneOrFail({ id }) + const transactionLink = await dbTransactionLink.findOneOrFail({ code }) const linkedUser = await dbUser.findOneOrFail({ id: transactionLink.userId }) const now = new Date() diff --git a/frontend/src/components/GddSend/TransactionForm.vue b/frontend/src/components/GddSend/TransactionForm.vue index 845e749cc..ec4aff4d3 100644 --- a/frontend/src/components/GddSend/TransactionForm.vue +++ b/frontend/src/components/GddSend/TransactionForm.vue @@ -19,7 +19,7 @@

{{ $t('gdd_per_link.header') }}

- {{ $t('gdd_per_link.sentence_1') }} + {{ $t('gdd_per_link.choose-amount') }}
diff --git a/frontend/src/components/LinkInformations/RedeemInformation.vue b/frontend/src/components/LinkInformations/RedeemInformation.vue new file mode 100644 index 000000000..bdc17db9a --- /dev/null +++ b/frontend/src/components/LinkInformations/RedeemInformation.vue @@ -0,0 +1,21 @@ + + diff --git a/frontend/src/components/LinkInformations/RedeemLoggedOut.vue b/frontend/src/components/LinkInformations/RedeemLoggedOut.vue new file mode 100644 index 000000000..20b75869a --- /dev/null +++ b/frontend/src/components/LinkInformations/RedeemLoggedOut.vue @@ -0,0 +1,47 @@ + + diff --git a/frontend/src/components/LinkInformations/RedeemSelfCreator.vue b/frontend/src/components/LinkInformations/RedeemSelfCreator.vue new file mode 100644 index 000000000..5a4928690 --- /dev/null +++ b/frontend/src/components/LinkInformations/RedeemSelfCreator.vue @@ -0,0 +1,31 @@ + + diff --git a/frontend/src/components/LinkInformations/RedeemValid.vue b/frontend/src/components/LinkInformations/RedeemValid.vue new file mode 100644 index 000000000..301afad69 --- /dev/null +++ b/frontend/src/components/LinkInformations/RedeemValid.vue @@ -0,0 +1,27 @@ + + diff --git a/frontend/src/components/LinkInformations/RedeemedTextBox.vue b/frontend/src/components/LinkInformations/RedeemedTextBox.vue new file mode 100644 index 000000000..4a33668af --- /dev/null +++ b/frontend/src/components/LinkInformations/RedeemedTextBox.vue @@ -0,0 +1,21 @@ + + diff --git a/frontend/src/components/TransactionLinkItem.vue b/frontend/src/components/TransactionLinkItem.vue new file mode 100644 index 000000000..bea893724 --- /dev/null +++ b/frontend/src/components/TransactionLinkItem.vue @@ -0,0 +1,16 @@ + + diff --git a/frontend/src/components/TransactionListItem.vue b/frontend/src/components/TransactionListItem.vue index f2f7f3e90..e39345d5e 100644 --- a/frontend/src/components/TransactionListItem.vue +++ b/frontend/src/components/TransactionListItem.vue @@ -5,7 +5,7 @@