From 7e57c7d155826eba7170383fa444fd122b9fd1bd Mon Sep 17 00:00:00 2001 From: mahula Date: Mon, 7 Nov 2022 14:22:07 +0100 Subject: [PATCH 01/10] move the information about GRadido being free to the auth layout --- frontend/src/components/LinkInformations/RedeemLoggedOut.vue | 1 - frontend/src/layouts/AuthLayout.vue | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/LinkInformations/RedeemLoggedOut.vue b/frontend/src/components/LinkInformations/RedeemLoggedOut.vue index 6673b3c5b..bbad3f9fb 100644 --- a/frontend/src/components/LinkInformations/RedeemLoggedOut.vue +++ b/frontend/src/components/LinkInformations/RedeemLoggedOut.vue @@ -13,7 +13,6 @@ {{ $t('gdd_per_link.to-register') }} -

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

{{ $t('gdd_per_link.has-account') }}

diff --git a/frontend/src/layouts/AuthLayout.vue b/frontend/src/layouts/AuthLayout.vue index 948775952..1ec48079d 100644 --- a/frontend/src/layouts/AuthLayout.vue +++ b/frontend/src/layouts/AuthLayout.vue @@ -70,6 +70,7 @@ +

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

From 106a72dd787419edbae4bf64171cb13f2e45078e Mon Sep 17 00:00:00 2001 From: ogerly Date: Wed, 9 Nov 2022 14:36:11 +0100 Subject: [PATCH 02/10] better behaviour when editing --- .../ContributionLink/ContributionLink.vue | 18 ++++++++++++++++-- .../ContributionLink/ContributionLinkForm.vue | 5 +++++ admin/src/locales/de.json | 1 + admin/src/locales/en.json | 1 + 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/admin/src/components/ContributionLink/ContributionLink.vue b/admin/src/components/ContributionLink/ContributionLink.vue index a2d171d56..7190742f7 100644 --- a/admin/src/components/ContributionLink/ContributionLink.vue +++ b/admin/src/components/ContributionLink/ContributionLink.vue @@ -8,7 +8,11 @@ header-class="text-center" class="mt-5" > - + {{ $t('math.plus') }} {{ $t('contributionLink.newContributionLink') }} @@ -19,6 +23,7 @@ :contributionLinkData="contributionLinkData" :editContributionLink="editContributionLink" @get-contribution-links="$emit('get-contribution-links')" + @closeContributionForm="closeContributionForm" /> @@ -63,9 +68,18 @@ export default { } }, methods: { + closeContributionForm() { + if (this.visible) { + this.$root.$emit('bv::toggle::collapse', 'newContribution') + this.editContributionLink = false + } + }, editContributionLinkData(data) { - if (!this.visible) this.$root.$emit('bv::toggle::collapse', 'newContribution') + if (!this.visible) { + this.$root.$emit('bv::toggle::collapse', 'newContribution') + } this.contributionLinkData = data + console.log('contributionLinkData', this.contributionLinkData) this.editContributionLink = true }, }, diff --git a/admin/src/components/ContributionLink/ContributionLinkForm.vue b/admin/src/components/ContributionLink/ContributionLinkForm.vue index 05f5dac8b..ff7af8f7d 100644 --- a/admin/src/components/ContributionLink/ContributionLinkForm.vue +++ b/admin/src/components/ContributionLink/ContributionLinkForm.vue @@ -6,6 +6,7 @@ {{ $t('contributionLink.clear') }} + + {{ $t('contributionLink.close') }} + diff --git a/admin/src/locales/de.json b/admin/src/locales/de.json index ffe1cab24..c012e3171 100644 --- a/admin/src/locales/de.json +++ b/admin/src/locales/de.json @@ -5,6 +5,7 @@ "amount": "Betrag", "changeSaved": "Änderungen gespeichert", "clear": "Löschen", + "close": "Schließen", "contributionLinks": "Beitragslinks", "create": "Anlegen", "cycle": "Zyklus", diff --git a/admin/src/locales/en.json b/admin/src/locales/en.json index b32efe97e..9bff733c5 100644 --- a/admin/src/locales/en.json +++ b/admin/src/locales/en.json @@ -5,6 +5,7 @@ "amount": "Amount", "changeSaved": "Changes saved", "clear": "Clear", + "close": "Close", "contributionLinks": "Contribution Links", "create": "Create", "cycle": "Cycle", From ae3a8dc5875920cde061e5917b59384fdde547c7 Mon Sep 17 00:00:00 2001 From: ogerly Date: Wed, 9 Nov 2022 14:37:23 +0100 Subject: [PATCH 03/10] fix lint and locales --- admin/src/components/ContributionLink/ContributionLink.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/admin/src/components/ContributionLink/ContributionLink.vue b/admin/src/components/ContributionLink/ContributionLink.vue index 7190742f7..1bff30226 100644 --- a/admin/src/components/ContributionLink/ContributionLink.vue +++ b/admin/src/components/ContributionLink/ContributionLink.vue @@ -79,7 +79,6 @@ export default { this.$root.$emit('bv::toggle::collapse', 'newContribution') } this.contributionLinkData = data - console.log('contributionLinkData', this.contributionLinkData) this.editContributionLink = true }, }, From 8b9b6f1f9ae152aa3d647efb65c28bbc0482d677 Mon Sep 17 00:00:00 2001 From: ogerly Date: Wed, 9 Nov 2022 17:15:29 +0100 Subject: [PATCH 04/10] fix clean display for all functions --- .../components/ContributionLink/ContributionLink.vue | 1 + .../ContributionLink/ContributionLinkForm.vue | 11 ++--------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/admin/src/components/ContributionLink/ContributionLink.vue b/admin/src/components/ContributionLink/ContributionLink.vue index 1bff30226..c8963d3ab 100644 --- a/admin/src/components/ContributionLink/ContributionLink.vue +++ b/admin/src/components/ContributionLink/ContributionLink.vue @@ -72,6 +72,7 @@ export default { if (this.visible) { this.$root.$emit('bv::toggle::collapse', 'newContribution') this.editContributionLink = false + this.contributionLinkData = {} } }, editContributionLinkData(data) { diff --git a/admin/src/components/ContributionLink/ContributionLinkForm.vue b/admin/src/components/ContributionLink/ContributionLinkForm.vue index ff7af8f7d..85b9a3e95 100644 --- a/admin/src/components/ContributionLink/ContributionLinkForm.vue +++ b/admin/src/components/ContributionLink/ContributionLinkForm.vue @@ -112,7 +112,7 @@ {{ $t('contributionLink.clear') }} - + {{ $t('contributionLink.close') }} @@ -208,14 +208,7 @@ export default { }, watch: { contributionLinkData() { - this.form.name = this.contributionLinkData.name - this.form.memo = this.contributionLinkData.memo - this.form.amount = this.contributionLinkData.amount - this.form.validFrom = this.contributionLinkData.validFrom - this.form.validTo = this.contributionLinkData.validTo - this.form.cycle = this.contributionLinkData.cycle - this.form.maxPerCycle = this.contributionLinkData.maxPerCycle - this.form.maxAmountPerMonth = this.contributionLinkData.maxAmountPerMonth + this.form = this.contributionLinkData }, }, } From c8227670a43edd4747ca1dbd0871edda1aa03ad9 Mon Sep 17 00:00:00 2001 From: ogerly Date: Wed, 9 Nov 2022 19:58:47 +0100 Subject: [PATCH 05/10] fix test over 95% --- .../src/components/ContributionLink/ContributionLink.spec.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/admin/src/components/ContributionLink/ContributionLink.spec.js b/admin/src/components/ContributionLink/ContributionLink.spec.js index 9818e8b93..b72a0347c 100644 --- a/admin/src/components/ContributionLink/ContributionLink.spec.js +++ b/admin/src/components/ContributionLink/ContributionLink.spec.js @@ -46,5 +46,10 @@ describe('ContributionLink', () => { wrapper.vm.editContributionLinkData() expect(wrapper.vm.$root.$emit('bv::toggle::collapse', 'newContribution')).toBeTruthy() }) + + it('emits toggle::collapse close Contribution-Form ', async () => { + wrapper.vm.closeContributionForm() + expect(wrapper.vm.$root.$emit('bv::toggle::collapse', 'newContribution')).toBeTruthy() + }) }) }) From 57a98def9476b9be450ff1271e8239b3d733935b Mon Sep 17 00:00:00 2001 From: mahula Date: Thu, 10 Nov 2022 11:28:50 +0100 Subject: [PATCH 06/10] auth pages: move text about GRadido being free to the top of the card --- frontend/src/layouts/AuthLayout.vue | 1 - frontend/src/pages/Login.vue | 2 +- frontend/src/pages/Register.vue | 4 +--- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/frontend/src/layouts/AuthLayout.vue b/frontend/src/layouts/AuthLayout.vue index 1ec48079d..948775952 100644 --- a/frontend/src/layouts/AuthLayout.vue +++ b/frontend/src/layouts/AuthLayout.vue @@ -70,7 +70,6 @@ -

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

diff --git a/frontend/src/pages/Login.vue b/frontend/src/pages/Login.vue index 0b602f74b..6d2dff5fa 100755 --- a/frontend/src/pages/Login.vue +++ b/frontend/src/pages/Login.vue @@ -1,7 +1,7 @@