From a9a3f5b55aff11ff43072f818398ff09f6f634df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 19 May 2022 17:09:40 +0200 Subject: [PATCH 01/28] Rename filters properties --- admin/src/pages/Creation.spec.js | 16 ++++++------- admin/src/pages/Creation.vue | 4 ++-- admin/src/pages/UserSearch.spec.js | 24 +++++++++---------- admin/src/pages/UserSearch.vue | 24 +++++++------------ backend/src/graphql/arg/SearchUsersFilters.ts | 4 ++-- .../src/graphql/arg/TransactionLinkFilters.ts | 6 ++--- .../graphql/resolver/AdminResolver.test.ts | 18 +++++++------- backend/src/graphql/resolver/AdminResolver.ts | 14 +++++------ 8 files changed, 52 insertions(+), 58 deletions(-) diff --git a/admin/src/pages/Creation.spec.js b/admin/src/pages/Creation.spec.js index 98c03d277..47a111215 100644 --- a/admin/src/pages/Creation.spec.js +++ b/admin/src/pages/Creation.spec.js @@ -71,8 +71,8 @@ describe('Creation', () => { searchText: '', currentPage: 1, pageSize: 25, - filterByActivated: true, - filterByDeleted: false, + byActivated: true, // Wolle: used 'filters' object? + byDeleted: false, }, }), ) @@ -271,8 +271,8 @@ describe('Creation', () => { searchText: 'XX', currentPage: 1, pageSize: 25, - filterByActivated: true, - filterByDeleted: false, + byActivated: true, // Wolle: used 'filters' object? + byDeleted: false, }, }), ) @@ -288,8 +288,8 @@ describe('Creation', () => { searchText: '', currentPage: 1, pageSize: 25, - filterByActivated: true, - filterByDeleted: false, + byActivated: true, // Wolle: used 'filters' object? + byDeleted: false, }, }), ) @@ -305,8 +305,8 @@ describe('Creation', () => { searchText: '', currentPage: 2, pageSize: 25, - filterByActivated: true, - filterByDeleted: false, + byActivated: true, // Wolle: used 'filters' object? + byDeleted: false, }, }), ) diff --git a/admin/src/pages/Creation.vue b/admin/src/pages/Creation.vue index 54bc0d735..8d3f3edaa 100644 --- a/admin/src/pages/Creation.vue +++ b/admin/src/pages/Creation.vue @@ -102,8 +102,8 @@ export default { searchText: this.criteria, currentPage: this.currentPage, pageSize: this.perPage, - filterByActivated: true, - filterByDeleted: false, + byActivated: true, // Wolle: used 'filters' object? + byDeleted: false, }, fetchPolicy: 'network-only', }) diff --git a/admin/src/pages/UserSearch.spec.js b/admin/src/pages/UserSearch.spec.js index 1a23b4292..e990fd0ad 100644 --- a/admin/src/pages/UserSearch.spec.js +++ b/admin/src/pages/UserSearch.spec.js @@ -83,8 +83,8 @@ describe('UserSearch', () => { currentPage: 1, pageSize: 25, filters: { - filterByActivated: null, - filterByDeleted: null, + byActivated: null, + byDeleted: null, }, }, }), @@ -104,8 +104,8 @@ describe('UserSearch', () => { currentPage: 1, pageSize: 25, filters: { - filterByActivated: false, - filterByDeleted: null, + byActivated: false, + byDeleted: null, }, }, }), @@ -126,8 +126,8 @@ describe('UserSearch', () => { currentPage: 1, pageSize: 25, filters: { - filterByActivated: null, - filterByDeleted: true, + byActivated: null, + byDeleted: true, }, }, }), @@ -148,8 +148,8 @@ describe('UserSearch', () => { currentPage: 2, pageSize: 25, filters: { - filterByActivated: null, - filterByDeleted: null, + byActivated: null, + byDeleted: null, }, }, }), @@ -170,8 +170,8 @@ describe('UserSearch', () => { currentPage: 1, pageSize: 25, filters: { - filterByActivated: null, - filterByDeleted: null, + byActivated: null, + byDeleted: null, }, }, }), @@ -189,8 +189,8 @@ describe('UserSearch', () => { currentPage: 1, pageSize: 25, filters: { - filterByActivated: null, - filterByDeleted: null, + byActivated: null, + byDeleted: null, }, }, }), diff --git a/admin/src/pages/UserSearch.vue b/admin/src/pages/UserSearch.vue index 7b638c316..29ead3e25 100644 --- a/admin/src/pages/UserSearch.vue +++ b/admin/src/pages/UserSearch.vue @@ -4,22 +4,16 @@ {{ - filterByActivated === null + byActivated === null ? $t('all_emails') - : filterByActivated === false + : byActivated === false ? $t('unregistered_emails') : '' }} - {{ - filterByDeleted === null - ? $t('all_emails') - : filterByDeleted === true - ? $t('deleted_user') - : '' - }} + {{ byDeleted === null ? $t('all_emails') : byDeleted === true ? $t('deleted_user') : '' }} @@ -72,8 +66,8 @@ export default { searchResult: [], massCreation: [], criteria: '', - filterByActivated: null, - filterByDeleted: null, + byActivated: null, // Wolle: used 'filters' object? + byDeleted: null, rows: 0, currentPage: 1, perPage: 25, @@ -82,11 +76,11 @@ export default { }, methods: { unconfirmedRegisterMails() { - this.filterByActivated = this.filterByActivated === null ? false : null + this.byActivated = this.byActivated === null ? false : null this.getUsers() }, deletedUserSearch() { - this.filterByDeleted = this.filterByDeleted === null ? true : null + this.byDeleted = this.byDeleted === null ? true : null this.getUsers() }, getUsers() { @@ -98,8 +92,8 @@ export default { currentPage: this.currentPage, pageSize: this.perPage, filters: { - filterByActivated: this.filterByActivated, - filterByDeleted: this.filterByDeleted, + byActivated: this.byActivated, + byDeleted: this.byDeleted, }, }, fetchPolicy: 'no-cache', diff --git a/backend/src/graphql/arg/SearchUsersFilters.ts b/backend/src/graphql/arg/SearchUsersFilters.ts index de7c7c20a..8cc1426b3 100644 --- a/backend/src/graphql/arg/SearchUsersFilters.ts +++ b/backend/src/graphql/arg/SearchUsersFilters.ts @@ -4,8 +4,8 @@ import { Field, InputType, ObjectType } from 'type-graphql' @InputType('SearchUsersFiltersInput') export default class SearchUsersFilters { @Field(() => Boolean, { nullable: true, defaultValue: null }) - filterByActivated?: boolean | null + byActivated?: boolean | null @Field(() => Boolean, { nullable: true, defaultValue: null }) - filterByDeleted?: boolean | null + byDeleted?: boolean | null } diff --git a/backend/src/graphql/arg/TransactionLinkFilters.ts b/backend/src/graphql/arg/TransactionLinkFilters.ts index b009a3180..98c12703e 100644 --- a/backend/src/graphql/arg/TransactionLinkFilters.ts +++ b/backend/src/graphql/arg/TransactionLinkFilters.ts @@ -3,11 +3,11 @@ import { ArgsType, Field } from 'type-graphql' @ArgsType() export default class TransactionLinkFilters { @Field(() => Boolean, { nullable: true, defaultValue: true }) - filterByDeleted?: boolean + byDeleted?: boolean @Field(() => Boolean, { nullable: true, defaultValue: true }) - filterByExpired?: boolean + byExpired?: boolean @Field(() => Boolean, { nullable: true, defaultValue: true }) - filterByRedeemed?: boolean + byRedeemed?: boolean } diff --git a/backend/src/graphql/resolver/AdminResolver.test.ts b/backend/src/graphql/resolver/AdminResolver.test.ts index 1df80aa1a..b4a4f0d46 100644 --- a/backend/src/graphql/resolver/AdminResolver.test.ts +++ b/backend/src/graphql/resolver/AdminResolver.test.ts @@ -373,15 +373,15 @@ describe('AdminResolver', () => { ) }) - it('all users by "filterByActivated === null && filterByDeleted === null"', async () => { + it('all users by "byActivated === null && byDeleted === null"', async () => { await expect( query({ query: searchUsers, variables: { ...variablesWithoutTextAndFilters, filters: { - filterByActivated: null, - filterByDeleted: null, + byActivated: null, + byDeleted: null, }, }, }), @@ -404,8 +404,8 @@ describe('AdminResolver', () => { variables: { ...variablesWithoutTextAndFilters, filters: { - filterByActivated: false, - filterByDeleted: null, + byActivated: false, + byDeleted: null, }, }, }), @@ -428,8 +428,8 @@ describe('AdminResolver', () => { variables: { ...variablesWithoutTextAndFilters, filters: { - filterByActivated: null, - filterByDeleted: true, + byActivated: null, + byDeleted: true, }, }, }), @@ -452,8 +452,8 @@ describe('AdminResolver', () => { variables: { ...variablesWithoutTextAndFilters, filters: { - filterByActivated: false, - filterByDeleted: true, + byActivated: false, + byDeleted: true, }, }, }), diff --git a/backend/src/graphql/resolver/AdminResolver.ts b/backend/src/graphql/resolver/AdminResolver.ts index fe4075cd1..0cf57ac53 100644 --- a/backend/src/graphql/resolver/AdminResolver.ts +++ b/backend/src/graphql/resolver/AdminResolver.ts @@ -57,12 +57,12 @@ export class AdminResolver { const userRepository = getCustomRepository(UserRepository) const filterCriteria: ObjectLiteral[] = [] - if (filters && filters.filterByActivated !== null) { - filterCriteria.push({ emailChecked: filters.filterByActivated }) + if (filters && filters.byActivated !== null) { + filterCriteria.push({ emailChecked: filters.byActivated }) } - if (filters && filters.filterByDeleted !== null) { - filterCriteria.push({ deletedAt: filters.filterByDeleted ? Not(IsNull()) : IsNull() }) + if (filters && filters.byDeleted !== null) { + filterCriteria.push({ deletedAt: filters.byDeleted ? Not(IsNull()) : IsNull() }) } const userFields = ['id', 'firstName', 'lastName', 'email', 'emailChecked', 'deletedAt'] @@ -436,11 +436,11 @@ export class AdminResolver { } = { userId, } - if (!filters.filterByRedeemed) where.redeemedBy = null - if (!filters.filterByExpired) where.validUntil = MoreThan(new Date()) + if (!filters.byRedeemed) where.redeemedBy = null + if (!filters.byExpired) where.validUntil = MoreThan(new Date()) const [transactionLinks, count] = await dbTransactionLink.findAndCount({ where, - withDeleted: filters.filterByDeleted, + withDeleted: filters.byDeleted, order: { createdAt: order, }, From 36ed5e5d5af6d6e04fe72cfbd23022a9d06cf132 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 19 May 2022 18:48:01 +0200 Subject: [PATCH 02/28] Refactor to use filters object in UserSearch.vue --- admin/src/pages/UserSearch.vue | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/admin/src/pages/UserSearch.vue b/admin/src/pages/UserSearch.vue index 29ead3e25..f1ca31d14 100644 --- a/admin/src/pages/UserSearch.vue +++ b/admin/src/pages/UserSearch.vue @@ -4,16 +4,22 @@ {{ - byActivated === null + filters.byActivated === null ? $t('all_emails') - : byActivated === false + : filters.byActivated === false ? $t('unregistered_emails') : '' }} - {{ byDeleted === null ? $t('all_emails') : byDeleted === true ? $t('deleted_user') : '' }} + {{ + filters.byDeleted === null + ? $t('all_emails') + : filters.byDeleted === true + ? $t('deleted_user') + : '' + }} @@ -66,8 +72,10 @@ export default { searchResult: [], massCreation: [], criteria: '', - byActivated: null, // Wolle: used 'filters' object? - byDeleted: null, + filters: { + byActivated: null, + byDeleted: null, + }, rows: 0, currentPage: 1, perPage: 25, @@ -76,11 +84,11 @@ export default { }, methods: { unconfirmedRegisterMails() { - this.byActivated = this.byActivated === null ? false : null + this.filters.byActivated = this.filters.byActivated === null ? false : null this.getUsers() }, deletedUserSearch() { - this.byDeleted = this.byDeleted === null ? true : null + this.filters.byDeleted = this.filters.byDeleted === null ? true : null this.getUsers() }, getUsers() { @@ -91,10 +99,7 @@ export default { searchText: this.criteria, currentPage: this.currentPage, pageSize: this.perPage, - filters: { - byActivated: this.byActivated, - byDeleted: this.byDeleted, - }, + filters: this.filters, }, fetchPolicy: 'no-cache', }) From 14ea920a248f4f1e7d3d1d5e2b99584e0d23661f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 23 May 2022 06:57:43 +0200 Subject: [PATCH 03/28] Remove ObjectType from SearchUsersFilters and rename SearchUsersFiltersInput to the same name --- admin/src/graphql/searchUsers.js | 7 +------ backend/src/graphql/arg/SearchUsersFilters.ts | 5 ++--- backend/src/seeds/graphql/mutations.ts | 7 +------ 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/admin/src/graphql/searchUsers.js b/admin/src/graphql/searchUsers.js index 5740e24cc..cc7f83b1c 100644 --- a/admin/src/graphql/searchUsers.js +++ b/admin/src/graphql/searchUsers.js @@ -1,12 +1,7 @@ import gql from 'graphql-tag' export const searchUsers = gql` - query ( - $searchText: String! - $currentPage: Int - $pageSize: Int - $filters: SearchUsersFiltersInput - ) { + query ($searchText: String!, $currentPage: Int, $pageSize: Int, $filters: SearchUsersFilters) { searchUsers( searchText: $searchText currentPage: $currentPage diff --git a/backend/src/graphql/arg/SearchUsersFilters.ts b/backend/src/graphql/arg/SearchUsersFilters.ts index 8cc1426b3..efcdfa00d 100644 --- a/backend/src/graphql/arg/SearchUsersFilters.ts +++ b/backend/src/graphql/arg/SearchUsersFilters.ts @@ -1,7 +1,6 @@ -import { Field, InputType, ObjectType } from 'type-graphql' +import { Field, InputType } from 'type-graphql' -@ObjectType() -@InputType('SearchUsersFiltersInput') +@InputType() export default class SearchUsersFilters { @Field(() => Boolean, { nullable: true, defaultValue: null }) byActivated?: boolean | null diff --git a/backend/src/seeds/graphql/mutations.ts b/backend/src/seeds/graphql/mutations.ts index 4598cbbe2..982de3bcc 100644 --- a/backend/src/seeds/graphql/mutations.ts +++ b/backend/src/seeds/graphql/mutations.ts @@ -108,12 +108,7 @@ export const unDeleteUser = gql` ` export const searchUsers = gql` - query ( - $searchText: String! - $currentPage: Int - $pageSize: Int - $filters: SearchUsersFiltersInput - ) { + query ($searchText: String!, $currentPage: Int, $pageSize: Int, $filters: SearchUsersFilters) { searchUsers( searchText: $searchText currentPage: $currentPage From 35b47844b715dd2d6e8dbd272b5da9da4367a642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 23 May 2022 07:02:32 +0200 Subject: [PATCH 04/28] Rename convertObjValuesToArray to objectValuesToArray --- backend/src/graphql/resolver/AdminResolver.test.ts | 6 +++--- backend/src/util/utilities.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/src/graphql/resolver/AdminResolver.test.ts b/backend/src/graphql/resolver/AdminResolver.test.ts index 9181943d0..40949810e 100644 --- a/backend/src/graphql/resolver/AdminResolver.test.ts +++ b/backend/src/graphql/resolver/AdminResolver.test.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ -import { convertObjValuesToArray } from '@/util/utilities' +import { objectValuesToArray } from '@/util/utilities' import { testEnvironment, resetToken, cleanDB } from '@test/helpers' import { userFactory } from '@/seeds/factory/user' import { creationFactory } from '@/seeds/factory/creation' @@ -366,7 +366,7 @@ describe('AdminResolver', () => { data: { searchUsers: { userCount: 4, - userList: expect.arrayContaining(convertObjValuesToArray(allUsers)), + userList: expect.arrayContaining(objectValuesToArray(allUsers)), }, }, }), @@ -392,7 +392,7 @@ describe('AdminResolver', () => { data: { searchUsers: { userCount: 4, - userList: expect.arrayContaining(convertObjValuesToArray(allUsers)), + userList: expect.arrayContaining(objectValuesToArray(allUsers)), }, }, }), diff --git a/backend/src/util/utilities.ts b/backend/src/util/utilities.ts index f77ad05ec..9abb31554 100644 --- a/backend/src/util/utilities.ts +++ b/backend/src/util/utilities.ts @@ -1,4 +1,4 @@ -export const convertObjValuesToArray = (obj: { [x: string]: string }): Array => { +export const objectValuesToArray = (obj: { [x: string]: string }): Array => { return Object.keys(obj).map(function (key) { return obj[key] }) From 85eaa4b391f12bee993ab4a3c4831c1cfd2fe205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 23 May 2022 11:23:56 +0200 Subject: [PATCH 05/28] Refactor to use filters in query listTransactionLinksAdmin --- backend/src/graphql/arg/SearchUsersFilters.ts | 4 +-- .../src/graphql/arg/TransactionLinkFilters.ts | 10 +++---- backend/src/graphql/resolver/AdminResolver.ts | 2 +- backend/src/seeds/graphql/mutations.ts | 29 +++++++++++++++++++ 4 files changed, 37 insertions(+), 8 deletions(-) diff --git a/backend/src/graphql/arg/SearchUsersFilters.ts b/backend/src/graphql/arg/SearchUsersFilters.ts index efcdfa00d..dc19d456c 100644 --- a/backend/src/graphql/arg/SearchUsersFilters.ts +++ b/backend/src/graphql/arg/SearchUsersFilters.ts @@ -3,8 +3,8 @@ import { Field, InputType } from 'type-graphql' @InputType() export default class SearchUsersFilters { @Field(() => Boolean, { nullable: true, defaultValue: null }) - byActivated?: boolean | null + byActivated: boolean @Field(() => Boolean, { nullable: true, defaultValue: null }) - byDeleted?: boolean | null + byDeleted: boolean } diff --git a/backend/src/graphql/arg/TransactionLinkFilters.ts b/backend/src/graphql/arg/TransactionLinkFilters.ts index 98c12703e..0fdd5c7c6 100644 --- a/backend/src/graphql/arg/TransactionLinkFilters.ts +++ b/backend/src/graphql/arg/TransactionLinkFilters.ts @@ -1,13 +1,13 @@ -import { ArgsType, Field } from 'type-graphql' +import { Field, InputType } from 'type-graphql' -@ArgsType() +@InputType() export default class TransactionLinkFilters { @Field(() => Boolean, { nullable: true, defaultValue: true }) - byDeleted?: boolean + byDeleted: boolean @Field(() => Boolean, { nullable: true, defaultValue: true }) - byExpired?: boolean + byExpired: boolean @Field(() => Boolean, { nullable: true, defaultValue: true }) - byRedeemed?: boolean + byRedeemed: boolean } diff --git a/backend/src/graphql/resolver/AdminResolver.ts b/backend/src/graphql/resolver/AdminResolver.ts index 4aec5ca67..7aa5cd079 100644 --- a/backend/src/graphql/resolver/AdminResolver.ts +++ b/backend/src/graphql/resolver/AdminResolver.ts @@ -426,7 +426,7 @@ export class AdminResolver { async listTransactionLinksAdmin( @Args() { currentPage = 1, pageSize = 5, order = Order.DESC }: Paginated, - @Args() + @Arg('filters') filters: TransactionLinkFilters, @Arg('userId', () => Int) userId: number, ): Promise { diff --git a/backend/src/seeds/graphql/mutations.ts b/backend/src/seeds/graphql/mutations.ts index 982de3bcc..07bc46b03 100644 --- a/backend/src/seeds/graphql/mutations.ts +++ b/backend/src/seeds/graphql/mutations.ts @@ -163,3 +163,32 @@ export const deletePendingCreation = gql` deletePendingCreation(id: $id) } ` + +export const listTransactionLinksAdmin = gql` + query ( + $userId: Int! + $filters: TransactionLinkFilters! + $currentPage: Int = 1 + $pageSize: Int = 5 + ) { + listTransactionLinksAdmin( + userId: $userId + filters: $filters + currentPage: $currentPage + pageSize: $pageSize + ) { + linkCount + linkList { + id + amount + holdAvailableAmount + memo + code + createdAt + validUntil + redeemedAt + deletedAt + } + } + } +` From 311aa023e47cb50b0cc49d85c4e3c1f7d47a53e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 23 May 2022 12:45:31 +0200 Subject: [PATCH 06/28] Test listTransactionLinksAdmin resolver, a start --- .../graphql/resolver/AdminResolver.test.ts | 244 ++++++++++++++++++ backend/src/graphql/resolver/AdminResolver.ts | 2 + 2 files changed, 246 insertions(+) diff --git a/backend/src/graphql/resolver/AdminResolver.test.ts b/backend/src/graphql/resolver/AdminResolver.test.ts index 40949810e..149fc2bcb 100644 --- a/backend/src/graphql/resolver/AdminResolver.test.ts +++ b/backend/src/graphql/resolver/AdminResolver.test.ts @@ -5,6 +5,9 @@ import { objectValuesToArray } from '@/util/utilities' import { testEnvironment, resetToken, cleanDB } from '@test/helpers' import { userFactory } from '@/seeds/factory/user' import { creationFactory } from '@/seeds/factory/creation' +import { creations } from '@/seeds/creation/index' +import { transactionLinkFactory } from '@/seeds/factory/transactionLink' +import { transactionLinks } from '@/seeds/transactionLink/index' import { bibiBloxberg } from '@/seeds/users/bibi-bloxberg' import { peterLustig } from '@/seeds/users/peter-lustig' import { stephenHawking } from '@/seeds/users/stephen-hawking' @@ -18,6 +21,7 @@ import { updatePendingCreation, deletePendingCreation, confirmPendingCreation, + listTransactionLinksAdmin, } from '@/seeds/graphql/mutations' import { getPendingCreations, login } from '@/seeds/graphql/queries' import { GraphQLError } from 'graphql' @@ -1324,4 +1328,244 @@ describe('AdminResolver', () => { }) }) }) + + describe('transaction links list', () => { + const variables = { + userId: 1, // dummy, may be replaced + filters: { + byDeleted: null, + byExpired: null, + byRedeemed: null, + }, + currentPage: 1, + pageSize: 5, + } + + describe('unauthenticated', () => { + it('returns an error', async () => { + await expect( + query({ + query: listTransactionLinksAdmin, + variables, + }), + ).resolves.toEqual( + expect.objectContaining({ + errors: [new GraphQLError('401 Unauthorized')], + }), + ) + }) + }) + + describe('authenticated', () => { + describe('without admin rights', () => { + beforeAll(async () => { + user = await userFactory(testEnv, bibiBloxberg) + await query({ + query: login, + variables: { email: 'bibi@bloxberg.de', password: 'Aa12345_' }, + }) + }) + + afterAll(async () => { + await cleanDB() + resetToken() + }) + + it('returns an error', async () => { + await expect( + query({ + query: listTransactionLinksAdmin, + variables, + }), + ).resolves.toEqual( + expect.objectContaining({ + errors: [new GraphQLError('401 Unauthorized')], + }), + ) + }) + }) + + describe('with admin rights', () => { + const expectNoDeletedOrRedeemed = expect.objectContaining({ + data: { + listTransactionLinksAdmin: { + linkCount: 6, + linkList: expect.not.arrayContaining([ + expect.objectContaining({ + memo: 'Leider wollte niemand meine Gradidos zum Neujahr haben :(', + createdAt: new Date(2022, 0, 1), + }), + expect.objectContaining({ + memo: 'Da habe ich mich wohl etwas übernommen.', + deletedAt: true, + }), + ]), + }, + }, + }) + + beforeAll(async () => { + // admin 'peter@lustig.de' has to exists for 'creationFactory' + admin = await userFactory(testEnv, peterLustig) + + user = await userFactory(testEnv, bibiBloxberg) + variables.userId = user.id + // bibi need GDDs + const bibisCreation = creations.find((creation) => creation.email === 'bibi@bloxberg.de') + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + await creationFactory(testEnv, bibisCreation!) + // bibis transaktion links + const bibisTransaktionLinks = transactionLinks.filter( + (transactionLink) => transactionLink.email === 'bibi@bloxberg.de', + ) + for (let i = 0; i < bibisTransaktionLinks.length; i++) { + await transactionLinkFactory(testEnv, bibisTransaktionLinks[i]) + } + + // admin: only now log in + await query({ + query: login, + variables: { email: 'peter@lustig.de', password: 'Aa12345_' }, + }) + }) + + afterAll(async () => { + await cleanDB() + resetToken() + }) + + // Wolle: make filters object nullable + describe.skip('without any filters', () => { + it('finds 6 open transaction links and no deleted or redeemed', async () => { + await expect( + query({ + query: listTransactionLinksAdmin, + variables, + }), + ).resolves.toEqual(expectNoDeletedOrRedeemed) + }) + }) + + describe('all filters are null', () => { + it('finds 6 open transaction links and no deleted or redeemed', async () => { + await expect( + query({ + query: listTransactionLinksAdmin, + variables, + }), + ).resolves.toEqual(expectNoDeletedOrRedeemed) + }) + }) + + describe('filter by deleted', () => { + it('finds 6 open transaction links and 1 deleted and no redeemed', async () => { + await expect( + query({ + query: listTransactionLinksAdmin, + variables: { + ...variables, + filters: { + byDeleted: true, // Wolle: rename to `withDeleted`? + byExpired: null, + byRedeemed: null, + }, + }, + }), + ).resolves.toEqual( + expect.objectContaining({ + data: { + listTransactionLinksAdmin: { + linkCount: 7, + linkList: expect.arrayContaining([ + expect.not.objectContaining({ + memo: 'Leider wollte niemand meine Gradidos zum Neujahr haben :(', + // Wolle: createdAt: new Date(2022, 0, 1), + }), + expect.objectContaining({ + memo: 'Da habe ich mich wohl etwas übernommen.', + // Wolle: deletedAt: expect.any(String), + }), + ]), + }, + }, + }), + ) + }) + }) + + // Wolle: works not as expected, because of wrong 'linkCount' at least + describe.skip('filter by expired', () => { + it('finds 6 open transaction links and 1 deleted and no redeemed', async () => { + await expect( + query({ + query: listTransactionLinksAdmin, + variables: { + ...variables, + filters: { + byDeleted: null, + byExpired: true, + byRedeemed: null, + }, + }, + }), + ).resolves.toEqual( + expect.objectContaining({ + data: { + listTransactionLinksAdmin: { + linkCount: 7, // Wolle: finds 5 but counts 7 + linkList: expect.arrayContaining([ + expect.objectContaining({ + memo: 'Leider wollte niemand meine Gradidos zum Neujahr haben :(', + // Wolle: createdAt: new Date(2022, 0, 1), + }), + expect.not.objectContaining({ + memo: 'Da habe ich mich wohl etwas übernommen.', + // Wolle: deletedAt: expect.any(String), + }), + ]), + }, + }, + }), + ) + }) + + // Wolle: not done jet + describe.skip('filter by redeemed', () => { + it('finds 6 open transaction links and 1 deleted and no redeemed', async () => { + await expect( + query({ + query: listTransactionLinksAdmin, + variables: { + ...variables, + filters: { + byDeleted: null, + byExpired: null, + byRedeemed: true, + }, + }, + }), + ).resolves.toEqual( + expect.objectContaining({ + data: { + listTransactionLinksAdmin: { + linkCount: 7, // Wolle: finds 5 but counts 7 + linkList: expect.arrayContaining([ + expect.objectContaining({ + memo: 'Leider wollte niemand meine Gradidos zum Neujahr haben :(', + // Wolle: createdAt: new Date(2022, 0, 1), + }), + expect.not.objectContaining({ + memo: 'Da habe ich mich wohl etwas übernommen.', + // Wolle: deletedAt: expect.any(String), + }), + ]), + }, + }, + }), + ) + }) + }) + }) + }) + }) }) diff --git a/backend/src/graphql/resolver/AdminResolver.ts b/backend/src/graphql/resolver/AdminResolver.ts index 7aa5cd079..8576d25cb 100644 --- a/backend/src/graphql/resolver/AdminResolver.ts +++ b/backend/src/graphql/resolver/AdminResolver.ts @@ -442,7 +442,9 @@ export class AdminResolver { if (!filters.byExpired) where.validUntil = MoreThan(new Date()) const [transactionLinks, count] = await dbTransactionLink.findAndCount({ where, + // Wolle: works not as expected withDeleted: filters.byDeleted, + // withDeleted: filters.byDeleted !== undefined ? !filters.byDeleted : undefined, order: { createdAt: order, }, From b9790dea708930e00852680d12db33b172ca4945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 23 May 2022 12:49:45 +0200 Subject: [PATCH 07/28] Fix an error --- backend/src/graphql/resolver/AdminResolver.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/graphql/resolver/AdminResolver.test.ts b/backend/src/graphql/resolver/AdminResolver.test.ts index 149fc2bcb..cccf23529 100644 --- a/backend/src/graphql/resolver/AdminResolver.test.ts +++ b/backend/src/graphql/resolver/AdminResolver.test.ts @@ -1528,6 +1528,7 @@ describe('AdminResolver', () => { }), ) }) + }) // Wolle: not done jet describe.skip('filter by redeemed', () => { From befe4f7448efc784b03c0dd24e00d930261fbed1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 23 May 2022 13:15:50 +0200 Subject: [PATCH 08/28] Adjust backend test minimum to 68% --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bb2441701..b7000100e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -528,7 +528,7 @@ jobs: report_name: Coverage Backend type: lcov result_path: ./backend/coverage/lcov.info - min_coverage: 66 + min_coverage: 68 token: ${{ github.token }} ########################################################################## From cba20e84901070d96b2c61e433ea994aa89a8f30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 24 May 2022 10:15:18 +0200 Subject: [PATCH 09/28] Rename TransactionLinkFilters fields from by* back to with* --- .../src/graphql/arg/TransactionLinkFilters.ts | 6 ++--- .../graphql/resolver/AdminResolver.test.ts | 24 +++++++++---------- backend/src/graphql/resolver/AdminResolver.ts | 8 +++---- 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/backend/src/graphql/arg/TransactionLinkFilters.ts b/backend/src/graphql/arg/TransactionLinkFilters.ts index 0fdd5c7c6..a335f6a28 100644 --- a/backend/src/graphql/arg/TransactionLinkFilters.ts +++ b/backend/src/graphql/arg/TransactionLinkFilters.ts @@ -3,11 +3,11 @@ import { Field, InputType } from 'type-graphql' @InputType() export default class TransactionLinkFilters { @Field(() => Boolean, { nullable: true, defaultValue: true }) - byDeleted: boolean + withDeleted: boolean @Field(() => Boolean, { nullable: true, defaultValue: true }) - byExpired: boolean + withExpired: boolean @Field(() => Boolean, { nullable: true, defaultValue: true }) - byRedeemed: boolean + withRedeemed: boolean } diff --git a/backend/src/graphql/resolver/AdminResolver.test.ts b/backend/src/graphql/resolver/AdminResolver.test.ts index cccf23529..529d99751 100644 --- a/backend/src/graphql/resolver/AdminResolver.test.ts +++ b/backend/src/graphql/resolver/AdminResolver.test.ts @@ -1333,9 +1333,9 @@ describe('AdminResolver', () => { const variables = { userId: 1, // dummy, may be replaced filters: { - byDeleted: null, - byExpired: null, - byRedeemed: null, + withDeleted: null, + withExpired: null, + withRedeemed: null, }, currentPage: 1, pageSize: 5, @@ -1465,9 +1465,9 @@ describe('AdminResolver', () => { variables: { ...variables, filters: { - byDeleted: true, // Wolle: rename to `withDeleted`? - byExpired: null, - byRedeemed: null, + withDeleted: true, // Wolle: rename to `withDeleted`? + withExpired: null, + withRedeemed: null, }, }, }), @@ -1502,9 +1502,9 @@ describe('AdminResolver', () => { variables: { ...variables, filters: { - byDeleted: null, - byExpired: true, - byRedeemed: null, + withDeleted: null, + withExpired: true, + withRedeemed: null, }, }, }), @@ -1539,9 +1539,9 @@ describe('AdminResolver', () => { variables: { ...variables, filters: { - byDeleted: null, - byExpired: null, - byRedeemed: true, + withDeleted: null, + withExpired: null, + withRedeemed: true, }, }, }), diff --git a/backend/src/graphql/resolver/AdminResolver.ts b/backend/src/graphql/resolver/AdminResolver.ts index 8576d25cb..012bdde30 100644 --- a/backend/src/graphql/resolver/AdminResolver.ts +++ b/backend/src/graphql/resolver/AdminResolver.ts @@ -438,13 +438,11 @@ export class AdminResolver { } = { userId, } - if (!filters.byRedeemed) where.redeemedBy = null - if (!filters.byExpired) where.validUntil = MoreThan(new Date()) + if (!filters.withRedeemed) where.redeemedBy = null + if (!filters.withExpired) where.validUntil = MoreThan(new Date()) const [transactionLinks, count] = await dbTransactionLink.findAndCount({ where, - // Wolle: works not as expected - withDeleted: filters.byDeleted, - // withDeleted: filters.byDeleted !== undefined ? !filters.byDeleted : undefined, + withDeleted: filters.withDeleted, order: { createdAt: order, }, From f064575864908f3528798c582073712d6f58bb55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 25 May 2022 09:31:41 +0200 Subject: [PATCH 10/28] Refine tests in AdminResolver.test.ts --- .../graphql/resolver/AdminResolver.test.ts | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/backend/src/graphql/resolver/AdminResolver.test.ts b/backend/src/graphql/resolver/AdminResolver.test.ts index 529d99751..37250acf2 100644 --- a/backend/src/graphql/resolver/AdminResolver.test.ts +++ b/backend/src/graphql/resolver/AdminResolver.test.ts @@ -1393,11 +1393,11 @@ describe('AdminResolver', () => { linkList: expect.not.arrayContaining([ expect.objectContaining({ memo: 'Leider wollte niemand meine Gradidos zum Neujahr haben :(', - createdAt: new Date(2022, 0, 1), + createdAt: expect.any(String), }), expect.objectContaining({ memo: 'Da habe ich mich wohl etwas übernommen.', - deletedAt: true, + deletedAt: expect.any(String), }), ]), }, @@ -1410,7 +1410,7 @@ describe('AdminResolver', () => { user = await userFactory(testEnv, bibiBloxberg) variables.userId = user.id - // bibi need GDDs + // bibi needs GDDs const bibisCreation = creations.find((creation) => creation.email === 'bibi@bloxberg.de') // eslint-disable-next-line @typescript-eslint/no-non-null-assertion await creationFactory(testEnv, bibisCreation!) @@ -1434,13 +1434,13 @@ describe('AdminResolver', () => { resetToken() }) - // Wolle: make filters object nullable + // Todo: make filters argument nullable? describe.skip('without any filters', () => { it('finds 6 open transaction links and no deleted or redeemed', async () => { await expect( query({ query: listTransactionLinksAdmin, - variables, + variables: { ...variables, filters: null }, }), ).resolves.toEqual(expectNoDeletedOrRedeemed) }) @@ -1457,7 +1457,7 @@ describe('AdminResolver', () => { }) }) - describe('filter by deleted', () => { + describe('filter with deleted', () => { it('finds 6 open transaction links and 1 deleted and no redeemed', async () => { await expect( query({ @@ -1465,7 +1465,7 @@ describe('AdminResolver', () => { variables: { ...variables, filters: { - withDeleted: true, // Wolle: rename to `withDeleted`? + withDeleted: true, withExpired: null, withRedeemed: null, }, @@ -1479,11 +1479,11 @@ describe('AdminResolver', () => { linkList: expect.arrayContaining([ expect.not.objectContaining({ memo: 'Leider wollte niemand meine Gradidos zum Neujahr haben :(', - // Wolle: createdAt: new Date(2022, 0, 1), + createdAt: expect.any(String), }), expect.objectContaining({ memo: 'Da habe ich mich wohl etwas übernommen.', - // Wolle: deletedAt: expect.any(String), + deletedAt: expect.any(String), }), ]), }, @@ -1512,15 +1512,15 @@ describe('AdminResolver', () => { expect.objectContaining({ data: { listTransactionLinksAdmin: { - linkCount: 7, // Wolle: finds 5 but counts 7 + linkCount: 7, linkList: expect.arrayContaining([ expect.objectContaining({ memo: 'Leider wollte niemand meine Gradidos zum Neujahr haben :(', - // Wolle: createdAt: new Date(2022, 0, 1), + createdAt: expect.any(String), }), expect.not.objectContaining({ memo: 'Da habe ich mich wohl etwas übernommen.', - // Wolle: deletedAt: expect.any(String), + deletedAt: expect.any(String), }), ]), }, From cabb844c2c8f4ddc4654b1e4e2bbd527e0ab2f75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 31 May 2022 10:43:15 +0200 Subject: [PATCH 11/28] Fix creation date for transaction links for seeding - Add some commented code for future testing of 'withRedeemed', 'withExpired'. --- .../src/graphql/resolver/AdminResolver.test.ts | 17 +++++++++++------ .../transactionLink/TransactionLinkInterface.ts | 3 +++ backend/src/seeds/transactionLink/index.ts | 6 +++++- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/backend/src/graphql/resolver/AdminResolver.test.ts b/backend/src/graphql/resolver/AdminResolver.test.ts index 37250acf2..c923e46ad 100644 --- a/backend/src/graphql/resolver/AdminResolver.test.ts +++ b/backend/src/graphql/resolver/AdminResolver.test.ts @@ -1493,7 +1493,7 @@ describe('AdminResolver', () => { }) }) - // Wolle: works not as expected, because of wrong 'linkCount' at least + // TODO: works not as expected, because the expired link is not in the result eventhogh a link has 'createdAt' at the very first of 2022 and should be expired describe.skip('filter by expired', () => { it('finds 6 open transaction links and 1 deleted and no redeemed', async () => { await expect( @@ -1530,7 +1530,7 @@ describe('AdminResolver', () => { }) }) - // Wolle: not done jet + // TODO: works not as expected, because 'redeemedAt' and 'redeemedBy' have to be added to the transaktion link factory describe.skip('filter by redeemed', () => { it('finds 6 open transaction links and 1 deleted and no redeemed', async () => { await expect( @@ -1549,15 +1549,20 @@ describe('AdminResolver', () => { expect.objectContaining({ data: { listTransactionLinksAdmin: { - linkCount: 7, // Wolle: finds 5 but counts 7 + linkCount: 6, linkList: expect.arrayContaining([ - expect.objectContaining({ + expect.not.objectContaining({ memo: 'Leider wollte niemand meine Gradidos zum Neujahr haben :(', - // Wolle: createdAt: new Date(2022, 0, 1), + createdAt: expect.any(String), + }), + expect.objectContaining({ + memo: 'Yeah, eingelöst!', + redeemedAt: expect.any(String), + redeemedBy: expect.any(Number), }), expect.not.objectContaining({ memo: 'Da habe ich mich wohl etwas übernommen.', - // Wolle: deletedAt: expect.any(String), + deletedAt: expect.any(String), }), ]), }, diff --git a/backend/src/seeds/transactionLink/TransactionLinkInterface.ts b/backend/src/seeds/transactionLink/TransactionLinkInterface.ts index ddc835b33..eaacfdf92 100644 --- a/backend/src/seeds/transactionLink/TransactionLinkInterface.ts +++ b/backend/src/seeds/transactionLink/TransactionLinkInterface.ts @@ -3,5 +3,8 @@ export interface TransactionLinkInterface { amount: number memo: string createdAt?: Date + // TODO: for testing + // redeemedAt?: Date + // redeemedBy?: number deletedAt?: boolean } diff --git a/backend/src/seeds/transactionLink/index.ts b/backend/src/seeds/transactionLink/index.ts index 25755c0f2..1db3d4828 100644 --- a/backend/src/seeds/transactionLink/index.ts +++ b/backend/src/seeds/transactionLink/index.ts @@ -5,7 +5,7 @@ export const transactionLinks: TransactionLinkInterface[] = [ email: 'bibi@bloxberg.de', amount: 19.99, memo: 'Leider wollte niemand meine Gradidos zum Neujahr haben :(', - createdAt: new Date(2022, 0, 1), + createdAt: new Date(2022, 1, 1), }, { email: 'bibi@bloxberg.de', @@ -30,6 +30,10 @@ bei Gradidio sei dabei!`, amount: 19.99, memo: `Kein Trick, keine Zauberrei, bei Gradidio sei dabei!`, + // TODO: for testing + // memo: `Yeah, eingelöst!`, + // redeemedAt: new Date(2022, 2, 2), + // redeemedBy: not null, }, { email: 'bibi@bloxberg.de', From 514a38ea3868140ab87210ce4692ec122f5235bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 31 May 2022 11:00:56 +0200 Subject: [PATCH 12/28] Make transaction link filter object nullable --- backend/src/graphql/arg/SearchUsersArgs.ts | 2 +- .../graphql/resolver/AdminResolver.test.ts | 20 ++++++++++--------- backend/src/graphql/resolver/AdminResolver.ts | 11 +++++----- backend/src/seeds/graphql/mutations.ts | 2 +- 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/backend/src/graphql/arg/SearchUsersArgs.ts b/backend/src/graphql/arg/SearchUsersArgs.ts index 8db6bfc06..38057762d 100644 --- a/backend/src/graphql/arg/SearchUsersArgs.ts +++ b/backend/src/graphql/arg/SearchUsersArgs.ts @@ -12,6 +12,6 @@ export default class SearchUsersArgs { @Field(() => Int, { nullable: true }) pageSize?: number - @Field(() => SearchUsersFilters, { nullable: true }) + @Field(() => SearchUsersFilters, { nullable: true, defaultValue: null }) filters: SearchUsersFilters } diff --git a/backend/src/graphql/resolver/AdminResolver.test.ts b/backend/src/graphql/resolver/AdminResolver.test.ts index c923e46ad..3b5908908 100644 --- a/backend/src/graphql/resolver/AdminResolver.test.ts +++ b/backend/src/graphql/resolver/AdminResolver.test.ts @@ -1332,11 +1332,7 @@ describe('AdminResolver', () => { describe('transaction links list', () => { const variables = { userId: 1, // dummy, may be replaced - filters: { - withDeleted: null, - withExpired: null, - withRedeemed: null, - }, + filters: null, currentPage: 1, pageSize: 5, } @@ -1434,13 +1430,12 @@ describe('AdminResolver', () => { resetToken() }) - // Todo: make filters argument nullable? - describe.skip('without any filters', () => { + describe('without any filters', () => { it('finds 6 open transaction links and no deleted or redeemed', async () => { await expect( query({ query: listTransactionLinksAdmin, - variables: { ...variables, filters: null }, + variables, }), ).resolves.toEqual(expectNoDeletedOrRedeemed) }) @@ -1451,7 +1446,14 @@ describe('AdminResolver', () => { await expect( query({ query: listTransactionLinksAdmin, - variables, + variables: { + ...variables, + filters: { + withDeleted: null, + withExpired: null, + withRedeemed: null, + }, + }, }), ).resolves.toEqual(expectNoDeletedOrRedeemed) }) diff --git a/backend/src/graphql/resolver/AdminResolver.ts b/backend/src/graphql/resolver/AdminResolver.ts index 012bdde30..54207b17c 100644 --- a/backend/src/graphql/resolver/AdminResolver.ts +++ b/backend/src/graphql/resolver/AdminResolver.ts @@ -426,9 +426,10 @@ export class AdminResolver { async listTransactionLinksAdmin( @Args() { currentPage = 1, pageSize = 5, order = Order.DESC }: Paginated, - @Arg('filters') + @Arg('filters', () => TransactionLinkFilters, { nullable: true, defaultValue: null }) filters: TransactionLinkFilters, - @Arg('userId', () => Int) userId: number, + @Arg('userId', () => Int) + userId: number, ): Promise { const user = await dbUser.findOneOrFail({ id: userId }) const where: { @@ -438,11 +439,11 @@ export class AdminResolver { } = { userId, } - if (!filters.withRedeemed) where.redeemedBy = null - if (!filters.withExpired) where.validUntil = MoreThan(new Date()) + if (!filters || !filters.withRedeemed) where.redeemedBy = null + if (!filters || !filters.withExpired) where.validUntil = MoreThan(new Date()) const [transactionLinks, count] = await dbTransactionLink.findAndCount({ where, - withDeleted: filters.withDeleted, + withDeleted: !filters ? false : filters.withDeleted, order: { createdAt: order, }, diff --git a/backend/src/seeds/graphql/mutations.ts b/backend/src/seeds/graphql/mutations.ts index 269901e94..d5dc99b99 100644 --- a/backend/src/seeds/graphql/mutations.ts +++ b/backend/src/seeds/graphql/mutations.ts @@ -165,7 +165,7 @@ export const deletePendingCreation = gql` export const listTransactionLinksAdmin = gql` query ( $userId: Int! - $filters: TransactionLinkFilters! + $filters: TransactionLinkFilters $currentPage: Int = 1 $pageSize: Int = 5 ) { From d1d2ce9565b119103d47ba89d8bc838083b20622 Mon Sep 17 00:00:00 2001 From: ogerly Date: Wed, 1 Jun 2022 07:49:57 +0200 Subject: [PATCH 13/28] fixed redeem link is mobile start false --- frontend/src/pages/TransactionLink.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/pages/TransactionLink.vue b/frontend/src/pages/TransactionLink.vue index 8fb1238b0..5fc20326e 100644 --- a/frontend/src/pages/TransactionLink.vue +++ b/frontend/src/pages/TransactionLink.vue @@ -143,6 +143,7 @@ export default { }, created() { this.setTransactionLinkInformation() + this.$emit('set-mobile-start', false) }, } From 4f15e4e3cd0b7397008603290af1e923c3becd79 Mon Sep 17 00:00:00 2001 From: ogerly Date: Wed, 1 Jun 2022 09:44:14 +0200 Subject: [PATCH 14/28] add href for front button link to gradido --- frontend/src/components/Auth/AuthMobileStart.vue | 6 ++++++ frontend/src/layouts/AuthLayout.vue | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/Auth/AuthMobileStart.vue b/frontend/src/components/Auth/AuthMobileStart.vue index 7b11df0f3..09985dd77 100644 --- a/frontend/src/components/Auth/AuthMobileStart.vue +++ b/frontend/src/components/Auth/AuthMobileStart.vue @@ -124,4 +124,10 @@ export default { min-width: 360px; } } + +@media screen and (max-height: 700px) { + .mobil-start-box #img3 { + top: -104px; + } +} diff --git a/frontend/src/layouts/AuthLayout.vue b/frontend/src/layouts/AuthLayout.vue index 024d56906..26f8eae85 100644 --- a/frontend/src/layouts/AuthLayout.vue +++ b/frontend/src/layouts/AuthLayout.vue @@ -16,7 +16,9 @@
{{ $t('auth.left.gratitude') }}
{{ $t('auth.left.newCurrency') }}
{{ $t('auth.left.oneAnotherNature') }}
- {{ $t('auth.left.learnMore') }} + + {{ $t('auth.left.learnMore') }} + @@ -118,6 +120,11 @@ export default { this.$refs.pageFontSize.style.fontSize = size + 'rem' }, }, + computed: { + learnMore() { + return 'https://gradido.net/' + this.$i18n.locale + }, + }, } From d6556cd02c8195a698fc01b7373fc6a7cec4c01d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 1 Jun 2022 10:01:20 +0200 Subject: [PATCH 15/28] Update backend/src/graphql/resolver/AdminResolver.ts Co-authored-by: Moriz Wahl --- backend/src/graphql/resolver/AdminResolver.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/graphql/resolver/AdminResolver.ts b/backend/src/graphql/resolver/AdminResolver.ts index 54207b17c..13d725bac 100644 --- a/backend/src/graphql/resolver/AdminResolver.ts +++ b/backend/src/graphql/resolver/AdminResolver.ts @@ -443,7 +443,7 @@ export class AdminResolver { if (!filters || !filters.withExpired) where.validUntil = MoreThan(new Date()) const [transactionLinks, count] = await dbTransactionLink.findAndCount({ where, - withDeleted: !filters ? false : filters.withDeleted, + withDeleted: filters ? filters.withDeleted : false, order: { createdAt: order, }, From 517034dcabe8234b626d4d54e0ba7bf1df970ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 1 Jun 2022 10:02:38 +0200 Subject: [PATCH 16/28] Update backend/src/graphql/resolver/AdminResolver.ts Co-authored-by: Moriz Wahl --- backend/src/graphql/resolver/AdminResolver.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/src/graphql/resolver/AdminResolver.ts b/backend/src/graphql/resolver/AdminResolver.ts index 13d725bac..f267dbe3d 100644 --- a/backend/src/graphql/resolver/AdminResolver.ts +++ b/backend/src/graphql/resolver/AdminResolver.ts @@ -439,8 +439,10 @@ export class AdminResolver { } = { userId, } - if (!filters || !filters.withRedeemed) where.redeemedBy = null - if (!filters || !filters.withExpired) where.validUntil = MoreThan(new Date()) + if (filters) { + if (filters.withRedeemed) delete where.redeemedBy + if (filters.withExpired) delete where.validUntil + } const [transactionLinks, count] = await dbTransactionLink.findAndCount({ where, withDeleted: filters ? filters.withDeleted : false, From 06b5aaaa1cca254936702f6626bd8e1c41d496cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 1 Jun 2022 10:05:02 +0200 Subject: [PATCH 17/28] Update backend/src/graphql/resolver/AdminResolver.ts Co-authored-by: Moriz Wahl --- backend/src/graphql/resolver/AdminResolver.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/src/graphql/resolver/AdminResolver.ts b/backend/src/graphql/resolver/AdminResolver.ts index f267dbe3d..8e2d21893 100644 --- a/backend/src/graphql/resolver/AdminResolver.ts +++ b/backend/src/graphql/resolver/AdminResolver.ts @@ -438,6 +438,8 @@ export class AdminResolver { validUntil?: FindOperator | null } = { userId, + redeemedBy: null, + validUntil: MoreThan(new Date()), } if (filters) { if (filters.withRedeemed) delete where.redeemedBy From cb7e3df9e6b63416a122d334a66a519ac21a0dac Mon Sep 17 00:00:00 2001 From: ogerly Date: Wed, 1 Jun 2022 10:17:34 +0200 Subject: [PATCH 18/28] learn more button add href and locales --- frontend/src/assets/scss/gradido-template.scss | 18 ++++++++++-------- frontend/src/layouts/AuthLayout.vue | 8 +++++--- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/frontend/src/assets/scss/gradido-template.scss b/frontend/src/assets/scss/gradido-template.scss index 09c8588e9..eb85662fd 100644 --- a/frontend/src/assets/scss/gradido-template.scss +++ b/frontend/src/assets/scss/gradido-template.scss @@ -15,6 +15,15 @@ body { color: #0e79bc !important; } + +.text-gradido { + color: rgb(249 205 105 / 100%); +} + +.gradient-gradido { + background-image: linear-gradient(146deg, rgb(220 167 44) 50%, rgb(197 141 56 / 100%) 100%); +} + /* Navbar */ a, .navbar-light, @@ -32,14 +41,6 @@ a:hover, color: rgb(35 121 188 / 90%); } -.text-gradido { - color: rgb(249 205 105 / 100%); -} - -.gradient-gradido { - background-image: linear-gradient(146deg, rgb(220 167 44) 50%, rgb(197 141 56 / 100%) 100%); -} - /* Button */ .btn { border-radius: 25px; @@ -97,6 +98,7 @@ a:hover, box-shadow: 10px 10px 50px 10px rgb(56 56 56 / 0%); } + .form-control, .custom-select { border-radius: 17px; diff --git a/frontend/src/layouts/AuthLayout.vue b/frontend/src/layouts/AuthLayout.vue index 26f8eae85..a971a6135 100644 --- a/frontend/src/layouts/AuthLayout.vue +++ b/frontend/src/layouts/AuthLayout.vue @@ -16,9 +16,11 @@
{{ $t('auth.left.gratitude') }}
{{ $t('auth.left.newCurrency') }}
{{ $t('auth.left.oneAnotherNature') }}
- - {{ $t('auth.left.learnMore') }} - + + + {{ $t('auth.left.learnMore') }} + + From 7c3cfd508f2156345ccb5fb6c9e783e6ee558187 Mon Sep 17 00:00:00 2001 From: ogerly Date: Wed, 1 Jun 2022 10:18:40 +0200 Subject: [PATCH 19/28] fixed stylelint --- frontend/src/assets/scss/gradido-template.scss | 2 -- 1 file changed, 2 deletions(-) diff --git a/frontend/src/assets/scss/gradido-template.scss b/frontend/src/assets/scss/gradido-template.scss index eb85662fd..9d52f0ad9 100644 --- a/frontend/src/assets/scss/gradido-template.scss +++ b/frontend/src/assets/scss/gradido-template.scss @@ -15,7 +15,6 @@ body { color: #0e79bc !important; } - .text-gradido { color: rgb(249 205 105 / 100%); } @@ -98,7 +97,6 @@ a:hover, box-shadow: 10px 10px 50px 10px rgb(56 56 56 / 0%); } - .form-control, .custom-select { border-radius: 17px; From 3f8c1169ba9d7377dfaec58c55a07596a235d410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 1 Jun 2022 10:19:46 +0200 Subject: [PATCH 20/28] Fix wrongly changed month on transaction links data --- backend/src/seeds/transactionLink/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/seeds/transactionLink/index.ts b/backend/src/seeds/transactionLink/index.ts index 1db3d4828..c3245c2b6 100644 --- a/backend/src/seeds/transactionLink/index.ts +++ b/backend/src/seeds/transactionLink/index.ts @@ -5,7 +5,7 @@ export const transactionLinks: TransactionLinkInterface[] = [ email: 'bibi@bloxberg.de', amount: 19.99, memo: 'Leider wollte niemand meine Gradidos zum Neujahr haben :(', - createdAt: new Date(2022, 1, 1), + createdAt: new Date(2022, 0, 1), }, { email: 'bibi@bloxberg.de', From 8650f86a7deca060f7969dfc4751cf83ad79242a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 1 Jun 2022 10:26:53 +0200 Subject: [PATCH 21/28] Put expected directly into the test after Moriz suggestion to get it better to debug --- .../graphql/resolver/AdminResolver.test.ts | 58 ++++++++++++------- 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/backend/src/graphql/resolver/AdminResolver.test.ts b/backend/src/graphql/resolver/AdminResolver.test.ts index 3b5908908..a755b0da6 100644 --- a/backend/src/graphql/resolver/AdminResolver.test.ts +++ b/backend/src/graphql/resolver/AdminResolver.test.ts @@ -1382,24 +1382,6 @@ describe('AdminResolver', () => { }) describe('with admin rights', () => { - const expectNoDeletedOrRedeemed = expect.objectContaining({ - data: { - listTransactionLinksAdmin: { - linkCount: 6, - linkList: expect.not.arrayContaining([ - expect.objectContaining({ - memo: 'Leider wollte niemand meine Gradidos zum Neujahr haben :(', - createdAt: expect.any(String), - }), - expect.objectContaining({ - memo: 'Da habe ich mich wohl etwas übernommen.', - deletedAt: expect.any(String), - }), - ]), - }, - }, - }) - beforeAll(async () => { // admin 'peter@lustig.de' has to exists for 'creationFactory' admin = await userFactory(testEnv, peterLustig) @@ -1437,7 +1419,25 @@ describe('AdminResolver', () => { query: listTransactionLinksAdmin, variables, }), - ).resolves.toEqual(expectNoDeletedOrRedeemed) + ).resolves.toEqual( + expect.objectContaining({ + data: { + listTransactionLinksAdmin: { + linkCount: 6, + linkList: expect.not.arrayContaining([ + expect.objectContaining({ + memo: 'Leider wollte niemand meine Gradidos zum Neujahr haben :(', + createdAt: expect.any(String), + }), + expect.objectContaining({ + memo: 'Da habe ich mich wohl etwas übernommen.', + deletedAt: expect.any(String), + }), + ]), + }, + }, + }), + ) }) }) @@ -1455,7 +1455,25 @@ describe('AdminResolver', () => { }, }, }), - ).resolves.toEqual(expectNoDeletedOrRedeemed) + ).resolves.toEqual( + expect.objectContaining({ + data: { + listTransactionLinksAdmin: { + linkCount: 6, + linkList: expect.not.arrayContaining([ + expect.objectContaining({ + memo: 'Leider wollte niemand meine Gradidos zum Neujahr haben :(', + createdAt: expect.any(String), + }), + expect.objectContaining({ + memo: 'Da habe ich mich wohl etwas übernommen.', + deletedAt: expect.any(String), + }), + ]), + }, + }, + }), + ) }) }) From 119b8cdb96eb14fa5cdb67f180bfa81e3ed3009c Mon Sep 17 00:00:00 2001 From: ogerly Date: Wed, 1 Jun 2022 10:37:32 +0200 Subject: [PATCH 22/28] remove computed learnMore --- frontend/src/layouts/AuthLayout.vue | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/frontend/src/layouts/AuthLayout.vue b/frontend/src/layouts/AuthLayout.vue index a971a6135..c886fd7f9 100644 --- a/frontend/src/layouts/AuthLayout.vue +++ b/frontend/src/layouts/AuthLayout.vue @@ -16,7 +16,7 @@
{{ $t('auth.left.gratitude') }}
{{ $t('auth.left.newCurrency') }}
{{ $t('auth.left.oneAnotherNature') }}
- + {{ $t('auth.left.learnMore') }} @@ -122,11 +122,6 @@ export default { this.$refs.pageFontSize.style.fontSize = size + 'rem' }, }, - computed: { - learnMore() { - return 'https://gradido.net/' + this.$i18n.locale - }, - }, } From 70b1119840c0ff895be8f5326eb60308aab57cfe Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Wed, 1 Jun 2022 14:10:37 +0200 Subject: [PATCH 23/28] queries in queries file instead of mutations --- backend/src/seeds/graphql/mutations.ts | 29 -------------------------- backend/src/seeds/graphql/queries.ts | 29 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/backend/src/seeds/graphql/mutations.ts b/backend/src/seeds/graphql/mutations.ts index d5dc99b99..44a9499bf 100644 --- a/backend/src/seeds/graphql/mutations.ts +++ b/backend/src/seeds/graphql/mutations.ts @@ -161,32 +161,3 @@ export const deletePendingCreation = gql` deletePendingCreation(id: $id) } ` - -export const listTransactionLinksAdmin = gql` - query ( - $userId: Int! - $filters: TransactionLinkFilters - $currentPage: Int = 1 - $pageSize: Int = 5 - ) { - listTransactionLinksAdmin( - userId: $userId - filters: $filters - currentPage: $currentPage - pageSize: $pageSize - ) { - linkCount - linkList { - id - amount - holdAvailableAmount - memo - code - createdAt - validUntil - redeemedAt - deletedAt - } - } - } -` diff --git a/backend/src/seeds/graphql/queries.ts b/backend/src/seeds/graphql/queries.ts index 16b2b71ae..f3b9f03c2 100644 --- a/backend/src/seeds/graphql/queries.ts +++ b/backend/src/seeds/graphql/queries.ts @@ -164,3 +164,32 @@ export const getPendingCreations = gql` } } ` + +export const listTransactionLinksAdmin = gql` + query ( + $userId: Int! + $filters: TransactionLinkFilters + $currentPage: Int = 1 + $pageSize: Int = 5 + ) { + listTransactionLinksAdmin( + userId: $userId + filters: $filters + currentPage: $currentPage + pageSize: $pageSize + ) { + linkCount + linkList { + id + amount + holdAvailableAmount + memo + code + createdAt + validUntil + redeemedAt + deletedAt + } + } + } +` From 2c67d5f5fef123d14c4a169718129272396880bf Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Wed, 1 Jun 2022 14:11:50 +0200 Subject: [PATCH 24/28] filter args optional, now default values --- backend/src/graphql/arg/TransactionLinkFilters.ts | 6 +++--- backend/src/graphql/resolver/AdminResolver.test.ts | 11 +++-------- backend/src/graphql/resolver/AdminResolver.ts | 2 +- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/backend/src/graphql/arg/TransactionLinkFilters.ts b/backend/src/graphql/arg/TransactionLinkFilters.ts index a335f6a28..291d244c3 100644 --- a/backend/src/graphql/arg/TransactionLinkFilters.ts +++ b/backend/src/graphql/arg/TransactionLinkFilters.ts @@ -2,12 +2,12 @@ import { Field, InputType } from 'type-graphql' @InputType() export default class TransactionLinkFilters { - @Field(() => Boolean, { nullable: true, defaultValue: true }) + @Field(() => Boolean, { nullable: true }) withDeleted: boolean - @Field(() => Boolean, { nullable: true, defaultValue: true }) + @Field(() => Boolean, { nullable: true }) withExpired: boolean - @Field(() => Boolean, { nullable: true, defaultValue: true }) + @Field(() => Boolean, { nullable: true }) withRedeemed: boolean } diff --git a/backend/src/graphql/resolver/AdminResolver.test.ts b/backend/src/graphql/resolver/AdminResolver.test.ts index a755b0da6..eee013e84 100644 --- a/backend/src/graphql/resolver/AdminResolver.test.ts +++ b/backend/src/graphql/resolver/AdminResolver.test.ts @@ -21,9 +21,8 @@ import { updatePendingCreation, deletePendingCreation, confirmPendingCreation, - listTransactionLinksAdmin, } from '@/seeds/graphql/mutations' -import { getPendingCreations, login } from '@/seeds/graphql/queries' +import { getPendingCreations, login, listTransactionLinksAdmin } from '@/seeds/graphql/queries' import { GraphQLError } from 'graphql' import { User } from '@entity/User' /* eslint-disable-next-line @typescript-eslint/no-unused-vars */ @@ -1388,6 +1387,7 @@ describe('AdminResolver', () => { user = await userFactory(testEnv, bibiBloxberg) variables.userId = user.id + variables.pageSize = 25 // bibi needs GDDs const bibisCreation = creations.find((creation) => creation.email === 'bibi@bloxberg.de') // eslint-disable-next-line @typescript-eslint/no-non-null-assertion @@ -1486,8 +1486,6 @@ describe('AdminResolver', () => { ...variables, filters: { withDeleted: true, - withExpired: null, - withRedeemed: null, }, }, }), @@ -1513,8 +1511,7 @@ describe('AdminResolver', () => { }) }) - // TODO: works not as expected, because the expired link is not in the result eventhogh a link has 'createdAt' at the very first of 2022 and should be expired - describe.skip('filter by expired', () => { + describe('filter by expired', () => { it('finds 6 open transaction links and 1 deleted and no redeemed', async () => { await expect( query({ @@ -1522,9 +1519,7 @@ describe('AdminResolver', () => { variables: { ...variables, filters: { - withDeleted: null, withExpired: true, - withRedeemed: null, }, }, }), diff --git a/backend/src/graphql/resolver/AdminResolver.ts b/backend/src/graphql/resolver/AdminResolver.ts index 8e2d21893..4c94e48c8 100644 --- a/backend/src/graphql/resolver/AdminResolver.ts +++ b/backend/src/graphql/resolver/AdminResolver.ts @@ -426,7 +426,7 @@ export class AdminResolver { async listTransactionLinksAdmin( @Args() { currentPage = 1, pageSize = 5, order = Order.DESC }: Paginated, - @Arg('filters', () => TransactionLinkFilters, { nullable: true, defaultValue: null }) + @Arg('filters', () => TransactionLinkFilters, { nullable: true }) filters: TransactionLinkFilters, @Arg('userId', () => Int) userId: number, From 7ee664b8c87df5e4dbb9206341cabfa65b4ec2f3 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Wed, 1 Jun 2022 14:12:41 +0200 Subject: [PATCH 25/28] set defaults for transcation link list filters in query --- admin/src/graphql/listTransactionLinksAdmin.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/admin/src/graphql/listTransactionLinksAdmin.js b/admin/src/graphql/listTransactionLinksAdmin.js index 3c9eae100..2e4171f02 100644 --- a/admin/src/graphql/listTransactionLinksAdmin.js +++ b/admin/src/graphql/listTransactionLinksAdmin.js @@ -2,7 +2,12 @@ import gql from 'graphql-tag' export const listTransactionLinksAdmin = gql` query ($currentPage: Int = 1, $pageSize: Int = 5, $userId: Int!) { - listTransactionLinksAdmin(currentPage: $currentPage, pageSize: $pageSize, userId: $userId) { + listTransactionLinksAdmin( + currentPage: $currentPage + pageSize: $pageSize + userId: $userId + filters: { withRedeemed: true, withExpired: true, withDeleted: true } + ) { linkCount linkList { id From de7a41516a7b3c721dc38863ae677ba38635d95d Mon Sep 17 00:00:00 2001 From: ogerly Date: Thu, 2 Jun 2022 08:04:21 +0200 Subject: [PATCH 26/28] refactor register button position --- frontend/src/pages/Register.vue | 42 +++++++++++++++------------------ 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/frontend/src/pages/Register.vue b/frontend/src/pages/Register.vue index 3d99ca605..f1bfad6d9 100755 --- a/frontend/src/pages/Register.vue +++ b/frontend/src/pages/Register.vue @@ -63,29 +63,25 @@ - - - - - - - - - - - - {{ $t('signup') }} - - - +
+ + + + +
+
+ + {{ $t('signup') }} + +
From ca8ce34f68baca58bb7a39f8608514cb89242a08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 2 Jun 2022 11:20:58 +0200 Subject: [PATCH 27/28] Move 'searchUsers' query from mutations to queries, correct and refine test descriptions --- .../graphql/resolver/AdminResolver.test.ts | 14 +++++++---- backend/src/seeds/graphql/mutations.ts | 24 ------------------- backend/src/seeds/graphql/queries.ts | 24 +++++++++++++++++++ 3 files changed, 33 insertions(+), 29 deletions(-) diff --git a/backend/src/graphql/resolver/AdminResolver.test.ts b/backend/src/graphql/resolver/AdminResolver.test.ts index eee013e84..acf880efb 100644 --- a/backend/src/graphql/resolver/AdminResolver.test.ts +++ b/backend/src/graphql/resolver/AdminResolver.test.ts @@ -15,14 +15,18 @@ import { garrickOllivander } from '@/seeds/users/garrick-ollivander' import { deleteUser, unDeleteUser, - searchUsers, createPendingCreation, createPendingCreations, updatePendingCreation, deletePendingCreation, confirmPendingCreation, } from '@/seeds/graphql/mutations' -import { getPendingCreations, login, listTransactionLinksAdmin } from '@/seeds/graphql/queries' +import { + getPendingCreations, + login, + searchUsers, + listTransactionLinksAdmin, +} from '@/seeds/graphql/queries' import { GraphQLError } from 'graphql' import { User } from '@entity/User' /* eslint-disable-next-line @typescript-eslint/no-unused-vars */ @@ -1478,7 +1482,7 @@ describe('AdminResolver', () => { }) describe('filter with deleted', () => { - it('finds 6 open transaction links and 1 deleted and no redeemed', async () => { + it('finds 6 open transaction links, 1 deleted, and no redeemed', async () => { await expect( query({ query: listTransactionLinksAdmin, @@ -1512,7 +1516,7 @@ describe('AdminResolver', () => { }) describe('filter by expired', () => { - it('finds 6 open transaction links and 1 deleted and no redeemed', async () => { + it('finds 5 open transaction links, 1 expired, and no redeemed', async () => { await expect( query({ query: listTransactionLinksAdmin, @@ -1547,7 +1551,7 @@ describe('AdminResolver', () => { // TODO: works not as expected, because 'redeemedAt' and 'redeemedBy' have to be added to the transaktion link factory describe.skip('filter by redeemed', () => { - it('finds 6 open transaction links and 1 deleted and no redeemed', async () => { + it('finds 6 open transaction links, 1 deleted, and no redeemed', async () => { await expect( query({ query: listTransactionLinksAdmin, diff --git a/backend/src/seeds/graphql/mutations.ts b/backend/src/seeds/graphql/mutations.ts index 44a9499bf..e66827566 100644 --- a/backend/src/seeds/graphql/mutations.ts +++ b/backend/src/seeds/graphql/mutations.ts @@ -105,30 +105,6 @@ export const unDeleteUser = gql` } ` -export const searchUsers = gql` - query ($searchText: String!, $currentPage: Int, $pageSize: Int, $filters: SearchUsersFilters) { - searchUsers( - searchText: $searchText - currentPage: $currentPage - pageSize: $pageSize - filters: $filters - ) { - userCount - userList { - userId - firstName - lastName - email - creation - emailChecked - hasElopage - emailConfirmationSend - deletedAt - } - } - } -` - export const createPendingCreations = gql` mutation ($pendingCreations: [CreatePendingCreationArgs!]!) { createPendingCreations(pendingCreations: $pendingCreations) { diff --git a/backend/src/seeds/graphql/queries.ts b/backend/src/seeds/graphql/queries.ts index f3b9f03c2..03ee3b53e 100644 --- a/backend/src/seeds/graphql/queries.ts +++ b/backend/src/seeds/graphql/queries.ts @@ -91,6 +91,30 @@ export const sendResetPasswordEmail = gql` } ` +export const searchUsers = gql` + query ($searchText: String!, $currentPage: Int, $pageSize: Int, $filters: SearchUsersFilters) { + searchUsers( + searchText: $searchText + currentPage: $currentPage + pageSize: $pageSize + filters: $filters + ) { + userCount + userList { + userId + firstName + lastName + email + creation + emailChecked + hasElopage + emailConfirmationSend + deletedAt + } + } + } +` + export const listGDTEntriesQuery = gql` query ($currentPage: Int!, $pageSize: Int!) { listGDTEntries(currentPage: $currentPage, pageSize: $pageSize) { From 9f9c6aed79e931d58a0e4097982f354618b6e754 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Thu, 2 Jun 2022 14:28:27 +0200 Subject: [PATCH 28/28] devops: Release Version 1.9.0 --- CHANGELOG.md | 40 ++++++++++++++++++++++++++++++++++++++++ admin/package.json | 2 +- backend/package.json | 2 +- database/package.json | 2 +- frontend/package.json | 2 +- package.json | 2 +- 6 files changed, 45 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48eeff9a9..53aa4a9e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,48 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [1.9.0](https://github.com/gradido/gradido/compare/1.8.3...1.9.0) + +- refactor: 🍰 Refactor To `filters` Object And Rename Filters Properties [`#1914`](https://github.com/gradido/gradido/pull/1914) +- refactor register button position [`#1964`](https://github.com/gradido/gradido/pull/1964) +- fixed redeem link is mobile start false [`#1958`](https://github.com/gradido/gradido/pull/1958) +- 1951 remove back link and remove gray box [`#1959`](https://github.com/gradido/gradido/pull/1959) +- 1952 change footer icons color an remove save login [`#1955`](https://github.com/gradido/gradido/pull/1955) +- fix: License should be a valid SPDX license expression [`#1954`](https://github.com/gradido/gradido/pull/1954) +- refactor: 🍰 Refactor THX Page – 2. Step [`#1858`](https://github.com/gradido/gradido/pull/1858) +- fix: Add Timezone to Decay Start Block [`#1931`](https://github.com/gradido/gradido/pull/1931) +- devops: Update License in all package.json [`#1925`](https://github.com/gradido/gradido/pull/1925) +- docu: Creation Flowchart [`#1918`](https://github.com/gradido/gradido/pull/1918) +- refactor: Use Logger Categories [`#1912`](https://github.com/gradido/gradido/pull/1912) +- 1883 remove the animated coins in the profile settings [`#1946`](https://github.com/gradido/gradido/pull/1946) +- 1942 replace pictures for carousel [`#1943`](https://github.com/gradido/gradido/pull/1943) +- 1933 auth footer is not on one level [`#1941`](https://github.com/gradido/gradido/pull/1941) +- 1929 styling new template for password component [`#1935`](https://github.com/gradido/gradido/pull/1935) +- 1926 button concept for gradido template [`#1927`](https://github.com/gradido/gradido/pull/1927) +- 1916 remove select language from register form [`#1930`](https://github.com/gradido/gradido/pull/1930) +- rename files from auth folder, rule vue name = name files [`#1937`](https://github.com/gradido/gradido/pull/1937) +- Add files Bild_1_2400.jpg [`#1945`](https://github.com/gradido/gradido/pull/1945) +- Bilder für Slider [`#1940`](https://github.com/gradido/gradido/pull/1940) +- contribution analysis of elopage and concept proposal [`#1917`](https://github.com/gradido/gradido/pull/1917) +- 1676 feature federation technical concept [`#1711`](https://github.com/gradido/gradido/pull/1711) +- more details about Windows installation [`#1842`](https://github.com/gradido/gradido/pull/1842) +- Concept to Introduce Gradido ID [`#1797`](https://github.com/gradido/gradido/pull/1797) +- first draft of concept event protocol [`#1796`](https://github.com/gradido/gradido/pull/1796) +- 1682 new design for the login and registration area [`#1693`](https://github.com/gradido/gradido/pull/1693) +- fix: Database Connection Charset to utf8mb4_unicode_ci [`#1915`](https://github.com/gradido/gradido/pull/1915) +- refactor: 🍰 Create Filter Object in GQL And Rename Args [`#1860`](https://github.com/gradido/gradido/pull/1860) +- feat: 🍰 Improve Apollo Logging [`#1859`](https://github.com/gradido/gradido/pull/1859) +- Add files via upload [`#1903`](https://github.com/gradido/gradido/pull/1903) +- 🍰 Hide Pagenation On Short Transactionlist [`#1875`](https://github.com/gradido/gradido/pull/1875) +- 🍰 Ignore macOS .DS_Store Files [`#1902`](https://github.com/gradido/gradido/pull/1902) +- pre I from #1682, add images, svg for new styling [`#1900`](https://github.com/gradido/gradido/pull/1900) +- add browserstack logo image [`#1888`](https://github.com/gradido/gradido/pull/1888) + #### [1.8.3](https://github.com/gradido/gradido/compare/1.8.2...1.8.3) +> 13 May 2022 + +- Release 1.8.3 [`#1899`](https://github.com/gradido/gradido/pull/1899) - Checkbox [`#1894`](https://github.com/gradido/gradido/pull/1894) - fix: Count Deprecated Links as Well [`#1892`](https://github.com/gradido/gradido/pull/1892) diff --git a/admin/package.json b/admin/package.json index c649ca752..e36308fd9 100644 --- a/admin/package.json +++ b/admin/package.json @@ -3,7 +3,7 @@ "description": "Administraion Interface for Gradido", "main": "index.js", "author": "Moriz Wahl", - "version": "1.8.3", + "version": "1.9.0", "license": "Apache-2.0", "private": false, "scripts": { diff --git a/backend/package.json b/backend/package.json index ff483a0c6..bd5388632 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "gradido-backend", - "version": "1.8.3", + "version": "1.9.0", "description": "Gradido unified backend providing an API-Service for Gradido Transactions", "main": "src/index.ts", "repository": "https://github.com/gradido/gradido/backend", diff --git a/database/package.json b/database/package.json index 7a960994c..50e3bdd78 100644 --- a/database/package.json +++ b/database/package.json @@ -1,6 +1,6 @@ { "name": "gradido-database", - "version": "1.8.3", + "version": "1.9.0", "description": "Gradido Database Tool to execute database migrations", "main": "src/index.ts", "repository": "https://github.com/gradido/gradido/database", diff --git a/frontend/package.json b/frontend/package.json index ae5dca33c..e59ec8140 100755 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "bootstrap-vue-gradido-wallet", - "version": "1.8.3", + "version": "1.9.0", "private": true, "scripts": { "start": "node run/server.js", diff --git a/package.json b/package.json index b607c476d..3d5bc51b7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gradido", - "version": "1.8.3", + "version": "1.9.0", "description": "Gradido", "main": "index.js", "repository": "git@github.com:gradido/gradido.git",