diff --git a/admin/Dockerfile b/admin/Dockerfile index 41f986f87..ed0623a63 100644 --- a/admin/Dockerfile +++ b/admin/Dockerfile @@ -20,10 +20,10 @@ ENV PORT="8080" # Labels LABEL org.label-schema.build-date="${BUILD_DATE}" LABEL org.label-schema.name="gradido:admin" -LABEL org.label-schema.description="Gradido Vue Admin Interface" -LABEL org.label-schema.usage="https://github.com/gradido/gradido/admin/README.md" +LABEL org.label-schema.description="Gradido Admin Interface" +LABEL org.label-schema.usage="https://github.com/gradido/gradido/blob/master/README.md" LABEL org.label-schema.url="https://gradido.net" -LABEL org.label-schema.vcs-url="https://github.com/gradido/gradido/backend" +LABEL org.label-schema.vcs-url="https://github.com/gradido/gradido/tree/master/admin" LABEL org.label-schema.vcs-ref="${BUILD_COMMIT}" LABEL org.label-schema.vendor="gradido Community" LABEL org.label-schema.version="${BUILD_VERSION}" 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() + }) }) }) diff --git a/admin/src/components/ContributionLink/ContributionLink.vue b/admin/src/components/ContributionLink/ContributionLink.vue index b21d82b55..c8963d3ab 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') }} @@ -17,7 +21,9 @@

{{ $t('contributionLink.contributionLinks') }}

@@ -58,12 +64,23 @@ export default { return { visible: false, contributionLinkData: {}, + editContributionLink: false, } }, methods: { + closeContributionForm() { + if (this.visible) { + this.$root.$emit('bv::toggle::collapse', 'newContribution') + this.editContributionLink = false + this.contributionLinkData = {} + } + }, 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 + this.editContributionLink = true }, }, } diff --git a/admin/src/components/ContributionLink/ContributionLinkForm.spec.js b/admin/src/components/ContributionLink/ContributionLinkForm.spec.js index 92d40c7ad..089ef90ad 100644 --- a/admin/src/components/ContributionLink/ContributionLinkForm.spec.js +++ b/admin/src/components/ContributionLink/ContributionLinkForm.spec.js @@ -9,6 +9,7 @@ global.alert = jest.fn() const propsData = { contributionLinkData: {}, + editContributionLink: false, } const apolloMutateMock = jest.fn().mockResolvedValue() @@ -108,6 +109,7 @@ describe('ContributionLinkForm', () => { cycle: 'ONCE', maxPerCycle: 1, maxAmountPerMonth: '0', + id: null, }, }) }) diff --git a/admin/src/components/ContributionLink/ContributionLinkForm.vue b/admin/src/components/ContributionLink/ContributionLinkForm.vue index c21a7f17c..85b9a3e95 100644 --- a/admin/src/components/ContributionLink/ContributionLinkForm.vue +++ b/admin/src/components/ContributionLink/ContributionLinkForm.vue @@ -6,6 +6,7 @@ -->
- {{ $t('contributionLink.create') }} + + {{ + editContributionLink ? $t('contributionLink.saveChange') : $t('contributionLink.create') + }} + {{ $t('contributionLink.clear') }} + + {{ $t('contributionLink.close') }} +