From ff032801f17700bdee5c46a582eda9c1d5441d99 Mon Sep 17 00:00:00 2001 From: ogerly Date: Mon, 22 Aug 2022 19:04:36 +0200 Subject: [PATCH 1/7] remove statistics data from frontend --- frontend/src/locales/de.json | 5 +---- frontend/src/locales/en.json | 5 +---- frontend/src/locales/es.json | 5 +---- frontend/src/locales/fr.json | 5 +---- frontend/src/locales/nl.json | 5 +---- frontend/src/pages/InfoStatistic.spec.js | 6 +++--- frontend/src/pages/InfoStatistic.vue | 19 ------------------- 7 files changed, 8 insertions(+), 42 deletions(-) diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 9d63efdc6..4b500521b 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -308,12 +308,9 @@ } }, "statistic": { - "activeUsers": "Aktive Mitglieder", - "deletedUsers": "Gelöschte Mitglieder", "totalGradidoAvailable": "GDD insgesamt im Umlauf", "totalGradidoCreated": "GDD insgesamt geschöpft", - "totalGradidoDecayed": "GDD insgesamt verfallen", - "totalGradidoUnbookedDecayed": "Gesamter ungebuchter GDD Verfall" + "totalGradidoDecayed": "GDD insgesamt verfallen" }, "success": "Erfolg", "time": { diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index 7d90c9683..bf656e813 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -308,12 +308,9 @@ } }, "statistic": { - "activeUsers": "Active members", - "deletedUsers": "Deleted members", "totalGradidoAvailable": "Total GDD in circulation", "totalGradidoCreated": "Total created GDD", - "totalGradidoDecayed": "Total GDD decay", - "totalGradidoUnbookedDecayed": "Total unbooked GDD decay" + "totalGradidoDecayed": "Total GDD decay" }, "success": "Success", "time": { diff --git a/frontend/src/locales/es.json b/frontend/src/locales/es.json index 77a564589..e034eff9f 100644 --- a/frontend/src/locales/es.json +++ b/frontend/src/locales/es.json @@ -308,12 +308,9 @@ } }, "statistic": { - "activeUsers": "miembros activos", - "deletedUsers": "miembros eliminados", "totalGradidoAvailable": "GDD total en circulación", "totalGradidoCreated": "GDD total creado", - "totalGradidoDecayed": "GDD total decaído", - "totalGradidoUnbookedDecayed": "GDD no contabilizado decaído" + "totalGradidoDecayed": "GDD total decaído" }, "success": "Lo lograste", "time": { diff --git a/frontend/src/locales/fr.json b/frontend/src/locales/fr.json index 81426ffe4..77f09a13e 100644 --- a/frontend/src/locales/fr.json +++ b/frontend/src/locales/fr.json @@ -308,12 +308,9 @@ } }, "statistic": { - "activeUsers": "Membres actifs", - "deletedUsers": "Membres supprimés", "totalGradidoAvailable": "GDD total en circulation", "totalGradidoCreated": "GDD total puisé", - "totalGradidoDecayed": "Total de GDD écoulé", - "totalGradidoUnbookedDecayed": "Total GDD non comptabilisé écoulé" + "totalGradidoDecayed": "Total de GDD écoulé" }, "success": "Avec succès", "time": { diff --git a/frontend/src/locales/nl.json b/frontend/src/locales/nl.json index 480f3f55d..ad18a75f4 100644 --- a/frontend/src/locales/nl.json +++ b/frontend/src/locales/nl.json @@ -308,12 +308,9 @@ } }, "statistic": { - "activeUsers": "Actieve leden", - "deletedUsers": "Verwijderde leden", "totalGradidoAvailable": "Totaal GDD in omloop", "totalGradidoCreated": "Totaal GDD geschept", - "totalGradidoDecayed": "Totaal GDD vervallen", - "totalGradidoUnbookedDecayed": "Totaal niet geboekte GDD vervallen" + "totalGradidoDecayed": "Totaal GDD vervallen" }, "success": "Succes", "time": { diff --git a/frontend/src/pages/InfoStatistic.spec.js b/frontend/src/pages/InfoStatistic.spec.js index 6adcf77d4..0126e5733 100644 --- a/frontend/src/pages/InfoStatistic.spec.js +++ b/frontend/src/pages/InfoStatistic.spec.js @@ -45,12 +45,12 @@ const apolloQueryMock = jest data: { communityStatistics: { totalUsers: 3113, - activeUsers: 1057, - deletedUsers: 35, + // activeUsers: 1057, + // deletedUsers: 35, totalGradidoCreated: '4083774.05000000000000000000', totalGradidoDecayed: '-1062639.13634129622923372197', totalGradidoAvailable: '2513565.869444365732411569', - totalGradidoUnbookedDecayed: '-500474.6738366222166261272', + // totalGradidoUnbookedDecayed: '-500474.6738366222166261272', }, }, }) diff --git a/frontend/src/pages/InfoStatistic.vue b/frontend/src/pages/InfoStatistic.vue index 3d38e730a..3fdd7d064 100644 --- a/frontend/src/pages/InfoStatistic.vue +++ b/frontend/src/pages/InfoStatistic.vue @@ -51,14 +51,6 @@ {{ $t('community.members') }} {{ totalUsers }} -
- {{ $t('statistic.activeUsers') }} - {{ activeUsers }} -
-
- {{ $t('statistic.deletedUsers') }} - {{ deletedUsers }} -
{{ $t('statistic.totalGradidoCreated') }} {{ totalGradidoCreated | GDD }} @@ -71,10 +63,6 @@ {{ $t('statistic.totalGradidoAvailable') }} {{ totalGradidoAvailable | GDD }}
-
- {{ $t('statistic.totalGradidoUnbookedDecayed') }} - {{ totalGradidoUnbookedDecayed | GDD }} -
@@ -95,12 +83,9 @@ export default { supportMail: 'support@supportemail.de', membersCount: '1203', totalUsers: null, - activeUsers: null, - deletedUsers: null, totalGradidoCreated: null, totalGradidoDecayed: null, totalGradidoAvailable: null, - totalGradidoUnbookedDecayed: null, } }, methods: { @@ -140,13 +125,9 @@ export default { }) .then((result) => { this.totalUsers = result.data.communityStatistics.totalUsers - this.activeUsers = result.data.communityStatistics.activeUsers - this.deletedUsers = result.data.communityStatistics.deletedUsers this.totalGradidoCreated = result.data.communityStatistics.totalGradidoCreated this.totalGradidoDecayed = result.data.communityStatistics.totalGradidoDecayed this.totalGradidoAvailable = result.data.communityStatistics.totalGradidoAvailable - this.totalGradidoUnbookedDecayed = - result.data.communityStatistics.totalGradidoUnbookedDecayed }) .catch(() => { this.toastError('communityStatistics has no result, use default data') From 432186385fb85d8d3518c62bcf687639d3dea4f4 Mon Sep 17 00:00:00 2001 From: Alexander Friedland Date: Tue, 23 Aug 2022 11:26:13 +0200 Subject: [PATCH 2/7] Update frontend/src/locales/en.json Co-authored-by: Moriz Wahl --- frontend/src/locales/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index bf656e813..665512880 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -309,7 +309,7 @@ }, "statistic": { "totalGradidoAvailable": "Total GDD in circulation", - "totalGradidoCreated": "Total created GDD", + "totalGradidoCreated": "Total GDD created", "totalGradidoDecayed": "Total GDD decay" }, "success": "Success", From f915b563cb8525c5525ac981711b6c884095f46e Mon Sep 17 00:00:00 2001 From: Alexander Friedland Date: Tue, 23 Aug 2022 11:26:19 +0200 Subject: [PATCH 3/7] Update frontend/src/locales/en.json Co-authored-by: Moriz Wahl --- frontend/src/locales/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index 665512880..45e33dda6 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -310,7 +310,7 @@ "statistic": { "totalGradidoAvailable": "Total GDD in circulation", "totalGradidoCreated": "Total GDD created", - "totalGradidoDecayed": "Total GDD decay" + "totalGradidoDecayed": "Total GDD decayed" }, "success": "Success", "time": { From 9e9ee42dbfdcae445f00c55d4e6dacc2c875cb90 Mon Sep 17 00:00:00 2001 From: ogerly Date: Tue, 23 Aug 2022 11:38:08 +0200 Subject: [PATCH 4/7] deleted fetchPolicy: 'network-only' --- frontend/src/pages/InfoStatistic.vue | 3 --- 1 file changed, 3 deletions(-) diff --git a/frontend/src/pages/InfoStatistic.vue b/frontend/src/pages/InfoStatistic.vue index 3fdd7d064..50263ed6d 100644 --- a/frontend/src/pages/InfoStatistic.vue +++ b/frontend/src/pages/InfoStatistic.vue @@ -93,7 +93,6 @@ export default { this.$apollo .query({ query: listContributionLinks, - fetchPolicy: 'network-only', }) .then((result) => { this.count = result.data.listContributionLinks.count @@ -107,7 +106,6 @@ export default { this.$apollo .query({ query: searchAdminUsers, - fetchPolicy: 'network-only', }) .then((result) => { this.countAdminUser = result.data.searchAdminUsers.userCount @@ -121,7 +119,6 @@ export default { this.$apollo .query({ query: communityStatistics, - fetchPolicy: 'network-only', }) .then((result) => { this.totalUsers = result.data.communityStatistics.totalUsers From f8a67d6a2f18264a2796f3d723f5d9d518cd6e74 Mon Sep 17 00:00:00 2001 From: ogerly Date: Tue, 23 Aug 2022 13:36:38 +0200 Subject: [PATCH 5/7] test fix --- frontend/src/pages/InfoStatistic.spec.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/frontend/src/pages/InfoStatistic.spec.js b/frontend/src/pages/InfoStatistic.spec.js index 0126e5733..b7b7b4a5c 100644 --- a/frontend/src/pages/InfoStatistic.spec.js +++ b/frontend/src/pages/InfoStatistic.spec.js @@ -86,7 +86,6 @@ describe('InfoStatistic', () => { expect(apolloQueryMock).toBeCalledWith( expect.objectContaining({ query: listContributionLinks, - fetchPolicy: 'network-only', }), ) }) @@ -95,7 +94,6 @@ describe('InfoStatistic', () => { expect(apolloQueryMock).toBeCalledWith( expect.objectContaining({ query: searchAdminUsers, - fetchPolicy: 'network-only', }), ) }) @@ -104,7 +102,6 @@ describe('InfoStatistic', () => { expect(apolloQueryMock).toBeCalledWith( expect.objectContaining({ query: communityStatistics, - fetchPolicy: 'network-only', }), ) }) From 9ff3ac99980c793a42e3141359b0be23c343499b Mon Sep 17 00:00:00 2001 From: Alexander Friedland Date: Thu, 25 Aug 2022 09:04:13 +0200 Subject: [PATCH 6/7] Update frontend/src/pages/InfoStatistic.vue Co-authored-by: Moriz Wahl --- frontend/src/pages/InfoStatistic.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/InfoStatistic.vue b/frontend/src/pages/InfoStatistic.vue index 50263ed6d..3ae9d0e77 100644 --- a/frontend/src/pages/InfoStatistic.vue +++ b/frontend/src/pages/InfoStatistic.vue @@ -122,7 +122,7 @@ export default { }) .then((result) => { this.totalUsers = result.data.communityStatistics.totalUsers - this.totalGradidoCreated = result.data.communityStatistics.totalGradidoCreated + this.totalGradidoCreated = Number(result.data.communityStatistics.totalGradidoCreated) - Number(result.data.communityStatistics.totalGradidoUnbookedDecayed) this.totalGradidoDecayed = result.data.communityStatistics.totalGradidoDecayed this.totalGradidoAvailable = result.data.communityStatistics.totalGradidoAvailable }) From e75627ff48f6abe629d1973f1d75984c81f1db7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 25 Aug 2022 09:19:41 +0200 Subject: [PATCH 7/7] Fix linting --- frontend/src/pages/InfoStatistic.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/InfoStatistic.vue b/frontend/src/pages/InfoStatistic.vue index 3ae9d0e77..481e34dd6 100644 --- a/frontend/src/pages/InfoStatistic.vue +++ b/frontend/src/pages/InfoStatistic.vue @@ -122,7 +122,9 @@ export default { }) .then((result) => { this.totalUsers = result.data.communityStatistics.totalUsers - this.totalGradidoCreated = Number(result.data.communityStatistics.totalGradidoCreated) - Number(result.data.communityStatistics.totalGradidoUnbookedDecayed) + this.totalGradidoCreated = + Number(result.data.communityStatistics.totalGradidoCreated) - + Number(result.data.communityStatistics.totalGradidoUnbookedDecayed) this.totalGradidoDecayed = result.data.communityStatistics.totalGradidoDecayed this.totalGradidoAvailable = result.data.communityStatistics.totalGradidoAvailable })