From a116578771b7f8aa37c669ad765624e542c14d1b Mon Sep 17 00:00:00 2001 From: Alexander Friedland Date: Tue, 19 Jul 2022 15:43:43 +0200 Subject: [PATCH 1/5] Update frontend/src/components/Contributions/ContributionListItem.vue Co-authored-by: Moriz Wahl --- frontend/src/components/Contributions/ContributionListItem.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/Contributions/ContributionListItem.vue b/frontend/src/components/Contributions/ContributionListItem.vue index c5f9a7058..bdcbe62bd 100644 --- a/frontend/src/components/Contributions/ContributionListItem.vue +++ b/frontend/src/components/Contributions/ContributionListItem.vue @@ -45,7 +45,7 @@ export default { }, firstName: { type: String, - require: false, + required: false, }, lastName: { type: String, From 4222b0aad4616fea9996337297b6b33b3980b7b9 Mon Sep 17 00:00:00 2001 From: Alexander Friedland Date: Tue, 19 Jul 2022 15:43:50 +0200 Subject: [PATCH 2/5] Update frontend/src/components/Contributions/ContributionListItem.vue Co-authored-by: Moriz Wahl --- frontend/src/components/Contributions/ContributionListItem.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/Contributions/ContributionListItem.vue b/frontend/src/components/Contributions/ContributionListItem.vue index bdcbe62bd..8675c0440 100644 --- a/frontend/src/components/Contributions/ContributionListItem.vue +++ b/frontend/src/components/Contributions/ContributionListItem.vue @@ -49,7 +49,7 @@ export default { }, lastName: { type: String, - require: false, + required: false, }, createdAt: { type: String, From 48283d39b6f09f7a416d24cea04ab7e439c390f2 Mon Sep 17 00:00:00 2001 From: ogerly Date: Tue, 19 Jul 2022 16:23:08 +0200 Subject: [PATCH 3/5] test router community --- frontend/src/routes/router.test.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/frontend/src/routes/router.test.js b/frontend/src/routes/router.test.js index 1edc6568b..875905d34 100644 --- a/frontend/src/routes/router.test.js +++ b/frontend/src/routes/router.test.js @@ -75,6 +75,17 @@ describe('router', () => { }) }) + describe('community', () => { + it('requires community', () => { + expect(routes.find((r) => r.path === '/community').meta.requiresAuth).toBeTruthy() + }) + + it('loads the "Community" page', async () => { + const component = await routes.find((r) => r.path === '/community').component() + expect(component.default.name).toBe('Community') + }) + }) + describe('profile', () => { it('requires authorization', () => { expect(routes.find((r) => r.path === '/profile').meta.requiresAuth).toBeTruthy() From acbdc0635ae5e7a660db90730602c2a6db8ae850 Mon Sep 17 00:00:00 2001 From: ogerly Date: Tue, 19 Jul 2022 16:24:01 +0200 Subject: [PATCH 4/5] lastMonth to openAmountForMonth,delete thisMonth --- frontend/src/components/Contributions/ContributionForm.vue | 4 ++-- frontend/src/locales/de.json | 3 +-- frontend/src/locales/en.json | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/Contributions/ContributionForm.vue b/frontend/src/components/Contributions/ContributionForm.vue index 079a0f02b..8a52146a1 100644 --- a/frontend/src/components/Contributions/ContributionForm.vue +++ b/frontend/src/components/Contributions/ContributionForm.vue @@ -139,14 +139,14 @@ export default { monthAndYear: this.$d(new Date(this.minimalDate), 'monthAndYear'), creation: this.$store.state.creation[1], } - return this.$t('contribution.formText.lastMonth', obj) + return this.$t('contribution.formText.openAmountForMonth', obj) }, thisMonthObject() { const obj = { monthAndYear: this.$d(new Date(), 'monthAndYear'), creation: this.$store.state.creation[2], } - return this.$t('contribution.formText.thisMonth', obj) + return this.$t('contribution.formText.openAmountForMonth', obj) }, isThisMonth() { return new Date(this.form.date).getMonth() === new Date().getMonth() diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 8676eba9f..ae787f961 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -35,11 +35,10 @@ "activity": "Tätigkeit", "formText": { "h3": "Dein Beitrag zum Gemeinwohl", - "lastMonth": "Für {monthAndYear} kannst du noch {creation} GDD einreichen.", + "openAmountForMonth": "Für {monthAndYear} kannst du noch {creation} GDD einreichen.", "maxGDDforMonth": "Du kannst für den ausgewählten Monat nur noch maximal {amount} GDD einreichen.", "text1": "Bring dich mit deinen Talenten in die Gemeinschaft ein! Dein freiwilliges Engagement honorieren wir mit 20 GDD pro Stunde bis maximal 1.000 GDD im Monat.", "text2": "Beschreibe deine Gemeinwohl-Tätigkeit mit Angabe der Stunden und trage einen Betrag von 20 GDD pro Stunde ein! Nach Bestätigung durch einen Moderator wird der Betrag deinem Konto gutgeschrieben.", - "thisMonth": "Für {monthAndYear} kannst du noch {creation} GDD einreichen." }, "noDateSelected": "Kein Datum ausgewählt", "submit": "Einreichen" diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index 4282c1086..910b7d17e 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -35,11 +35,10 @@ "activity": "Activity", "formText": { "h3": "Your contribution to the common good", - "lastMonth": "For {monthAndYear}, you can still submit {creation} GDD.", + "openAmountForMonth": "For {monthAndYear}, you can still submit {creation} GDD.", "maxGDDforMonth": "You can only submit a maximum of {amount} GDD for the selected month.", "text1": "Bring your talents to the community! Your voluntary commitment will be rewarded with 20 GDD per hour up to a maximum of 1,000 GDD per month.", "text2": "Describe your community service activity with hours and enter an amount of 20 GDD per hour! After confirmation by a moderator, the amount will be credited to your account.", - "thisMonth": "For {monthAndYear}, you can still submit {creation} GDD." }, "noDateSelected": "No date selected", "submit": "Submit" From 35700d06d3569daab12705965965e767c97fd319 Mon Sep 17 00:00:00 2001 From: ogerly Date: Tue, 19 Jul 2022 16:25:06 +0200 Subject: [PATCH 5/5] fix locales --- frontend/src/locales/de.json | 4 ++-- frontend/src/locales/en.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index ae787f961..9625dc04b 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -35,10 +35,10 @@ "activity": "Tätigkeit", "formText": { "h3": "Dein Beitrag zum Gemeinwohl", - "openAmountForMonth": "Für {monthAndYear} kannst du noch {creation} GDD einreichen.", "maxGDDforMonth": "Du kannst für den ausgewählten Monat nur noch maximal {amount} GDD einreichen.", + "openAmountForMonth": "Für {monthAndYear} kannst du noch {creation} GDD einreichen.", "text1": "Bring dich mit deinen Talenten in die Gemeinschaft ein! Dein freiwilliges Engagement honorieren wir mit 20 GDD pro Stunde bis maximal 1.000 GDD im Monat.", - "text2": "Beschreibe deine Gemeinwohl-Tätigkeit mit Angabe der Stunden und trage einen Betrag von 20 GDD pro Stunde ein! Nach Bestätigung durch einen Moderator wird der Betrag deinem Konto gutgeschrieben.", + "text2": "Beschreibe deine Gemeinwohl-Tätigkeit mit Angabe der Stunden und trage einen Betrag von 20 GDD pro Stunde ein! Nach Bestätigung durch einen Moderator wird der Betrag deinem Konto gutgeschrieben." }, "noDateSelected": "Kein Datum ausgewählt", "submit": "Einreichen" diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index 910b7d17e..7237ab74f 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -35,10 +35,10 @@ "activity": "Activity", "formText": { "h3": "Your contribution to the common good", - "openAmountForMonth": "For {monthAndYear}, you can still submit {creation} GDD.", "maxGDDforMonth": "You can only submit a maximum of {amount} GDD for the selected month.", + "openAmountForMonth": "For {monthAndYear}, you can still submit {creation} GDD.", "text1": "Bring your talents to the community! Your voluntary commitment will be rewarded with 20 GDD per hour up to a maximum of 1,000 GDD per month.", - "text2": "Describe your community service activity with hours and enter an amount of 20 GDD per hour! After confirmation by a moderator, the amount will be credited to your account.", + "text2": "Describe your community service activity with hours and enter an amount of 20 GDD per hour! After confirmation by a moderator, the amount will be credited to your account." }, "noDateSelected": "No date selected", "submit": "Submit"