From d04fcc928024cd5274843c26f2be1ff81e4de436 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Thu, 25 Nov 2021 10:57:46 +0100 Subject: [PATCH 01/86] Document release --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index ead54701c..a5060ffef 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,21 @@ We are currently restructuring the service to reduce dependencies and unify busi Once you have `docker-compose` up and running, you can open [http://localhost/vue](http://localhost/vue) and create yourself a new wallet account. +## How to release + +A release is tagged on Github by its version number and published as github release. This is done automatically when a new version is defined in the [package.json](./package.json) and merged into master - furthermore we set all our sub-package-versions to the same version as the main package.json version to make version management as simple as possible. +Each release is accompanied with release notes automatically generated from the git log which is available as [CHANGELOG.md](./CHANGELOG.md). + +To generate the Changelog and set a new Version you should use the following commands in the main folder +```bash +git fetch --all +yarn release +``` + +The first command `git fetch --all` will make sure you have all tags previously defined which is required to generate a correct changelog. The second command `yarn release` will execute the changelog tool and set version numbers in the main package and sub-packages. It is required to do `yarn install` before you can use this command. +After generating a new version you should commit the changes. This will be the CHANGELOG.md and several package.json files. This commit will be omitted in the changelog. + +Note: The Changelog will be regenerated with all tags on release on the external builder tool, but will not be checked in there. The Changelog on the github release will therefore always be correct, on the repo it might be incorrect due to missing tags when executing the `yarn release` command. ## Troubleshooting | Problem | Issue | Solution | Description | From 995abc53be46aaaa8e281a213d69090a0cbbe0f3 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Thu, 25 Nov 2021 11:00:03 +0100 Subject: [PATCH 02/86] missing newline --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a5060ffef..ce8e84df0 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,7 @@ The first command `git fetch --all` will make sure you have all tags previously After generating a new version you should commit the changes. This will be the CHANGELOG.md and several package.json files. This commit will be omitted in the changelog. Note: The Changelog will be regenerated with all tags on release on the external builder tool, but will not be checked in there. The Changelog on the github release will therefore always be correct, on the repo it might be incorrect due to missing tags when executing the `yarn release` command. + ## Troubleshooting | Problem | Issue | Solution | Description | From 030c94acedd9db1054d534b646ce3d3cff9f5ac3 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Thu, 25 Nov 2021 11:03:25 +0100 Subject: [PATCH 03/86] add admin to the release script --- scripts/release.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/release.sh b/scripts/release.sh index d18c4948c..0b70e76ad 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -6,6 +6,7 @@ PROJECT_DIR="${SCRIPT_DIR}/../" FRONTEND_DIR="${PROJECT_DIR}/frontend/" BACKEND_DIR="${PROJECT_DIR}/backend/" DATABASE_DIR="${PROJECT_DIR}/database/" +ADMIN_DIR="${PROJECT_DIR}/admin/" # navigate to project directory cd ${PROJECT_DIR} @@ -23,6 +24,8 @@ cd ${BACKEND_DIR} yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version ${VERSION} cd ${DATABASE_DIR} yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version ${VERSION} +cd ${ADMIN_DIR} +yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version ${VERSION} # generate changelog cd ${PROJECT_DIR} From a618ac678e3685c26a83c68a31ab710286368bbb Mon Sep 17 00:00:00 2001 From: ogerly Date: Fri, 26 Nov 2021 15:35:21 +0100 Subject: [PATCH 04/86] Created delete query. --- admin/src/graphql/getPendingCreations.js | 1 + backend/src/graphql/resolver/AdminResolver.ts | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/admin/src/graphql/getPendingCreations.js b/admin/src/graphql/getPendingCreations.js index f359c79db..add9efc29 100644 --- a/admin/src/graphql/getPendingCreations.js +++ b/admin/src/graphql/getPendingCreations.js @@ -3,6 +3,7 @@ import gql from 'graphql-tag' export const getPendingCreations = gql` query { getPendingCreations { + id firstName lastName email diff --git a/backend/src/graphql/resolver/AdminResolver.ts b/backend/src/graphql/resolver/AdminResolver.ts index a93696814..70f6c35ec 100644 --- a/backend/src/graphql/resolver/AdminResolver.ts +++ b/backend/src/graphql/resolver/AdminResolver.ts @@ -8,6 +8,7 @@ import { PendingCreationRepository } from '../../typeorm/repository/PendingCreat import { UserRepository } from '../../typeorm/repository/User' import CreatePendingCreationArgs from '../arg/CreatePendingCreationArgs' import moment from 'moment' +import { LoginPendingTasksAdmin } from '@entity/LoginPendingTasksAdmin' @Resolver() export class AdminResolver { @@ -76,6 +77,15 @@ export class AdminResolver { ) return pendingCreationsPromise } + + @Query(() => Boolean) + async deletePendingCreation(@Arg('id') id: number): Promise { + const pendingCreationRepository = getCustomRepository(PendingCreationRepository) + const entity = await pendingCreationRepository.findOne(id) + if (!entity) throw new Error('Not pending creation with this id.') + const res = await pendingCreationRepository.manager.remove(entity) + return res ? true : false + } } async function getUserCreations(id: number): Promise { From 2f6a1a06300c58bbfa567352bdf632de84a9d367 Mon Sep 17 00:00:00 2001 From: ogerly Date: Fri, 26 Nov 2021 17:43:24 +0100 Subject: [PATCH 05/86] In CreationConfirm.vue number of all open creations and transferred to the store --- admin/src/pages/CreationConfirm.vue | 3 ++- admin/src/pages/Overview.vue | 16 +++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/admin/src/pages/CreationConfirm.vue b/admin/src/pages/CreationConfirm.vue index 660436d6c..c44402a1e 100644 --- a/admin/src/pages/CreationConfirm.vue +++ b/admin/src/pages/CreationConfirm.vue @@ -75,6 +75,8 @@ export default { }) .then((result) => { this.confirmResult = result.data.getPendingCreations + this.$store.commit('resetOpenCreations') + this.$store.commit('openCreationsPlus', Object.keys(this.confirmResult).length) }) .catch((error) => { this.$toasted.error(error.message) @@ -83,7 +85,6 @@ export default { }, async created() { await this.getPendingCreations() - this.$store.commit('openCreationsPlus', Object.keys(this.confirmResult).length) }, } diff --git a/admin/src/pages/Overview.vue b/admin/src/pages/Overview.vue index d63c46199..329843cad 100644 --- a/admin/src/pages/Overview.vue +++ b/admin/src/pages/Overview.vue @@ -76,21 +76,27 @@ From f2c31b7d6837ef22e9c79a65d1d4f60323c3a724 Mon Sep 17 00:00:00 2001 From: ogerly Date: Fri, 26 Nov 2021 17:49:29 +0100 Subject: [PATCH 07/86] pendingCreationRepository.manager.remove res - fix prettier --- 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 70f6c35ec..5d2ed47a2 100644 --- a/backend/src/graphql/resolver/AdminResolver.ts +++ b/backend/src/graphql/resolver/AdminResolver.ts @@ -84,7 +84,7 @@ export class AdminResolver { const entity = await pendingCreationRepository.findOne(id) if (!entity) throw new Error('Not pending creation with this id.') const res = await pendingCreationRepository.manager.remove(entity) - return res ? true : false + return !!res } } From 30ba6e473b176d02614a6360e93cd8cc854b7f7a Mon Sep 17 00:00:00 2001 From: ogerly Date: Fri, 26 Nov 2021 18:02:18 +0100 Subject: [PATCH 08/86] chnaged simpler counting, number of open creations --- admin/src/pages/CreationConfirm.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/src/pages/CreationConfirm.vue b/admin/src/pages/CreationConfirm.vue index c44402a1e..1b53dc85b 100644 --- a/admin/src/pages/CreationConfirm.vue +++ b/admin/src/pages/CreationConfirm.vue @@ -76,7 +76,7 @@ export default { .then((result) => { this.confirmResult = result.data.getPendingCreations this.$store.commit('resetOpenCreations') - this.$store.commit('openCreationsPlus', Object.keys(this.confirmResult).length) + this.$store.commit('openCreationsPlus', result.data.getPendingCreations.length) }) .catch((error) => { this.$toasted.error(error.message) From 38da2dcdfd34d7b4331a4593849dffdeee2cbdaa Mon Sep 17 00:00:00 2001 From: ogerly Date: Fri, 26 Nov 2021 18:09:10 +0100 Subject: [PATCH 09/86] Remove hint text for test creations on CreationConfirm Table. --- admin/src/pages/CreationConfirm.vue | 4 ---- 1 file changed, 4 deletions(-) diff --git a/admin/src/pages/CreationConfirm.vue b/admin/src/pages/CreationConfirm.vue index 1b53dc85b..ec0e6e7af 100644 --- a/admin/src/pages/CreationConfirm.vue +++ b/admin/src/pages/CreationConfirm.vue @@ -1,9 +1,5 @@