From bc474e79ff5754ede0ea0c6e2b10d741049555e8 Mon Sep 17 00:00:00 2001 From: ogerly Date: Fri, 16 Sep 2022 12:03:11 +0200 Subject: [PATCH] delete contribution link and update contribution list --- admin/src/components/ContributionLink.vue | 9 +++- admin/src/components/ContributionLinkForm.vue | 3 +- admin/src/components/ContributionLinkList.vue | 46 ++++++++++--------- admin/src/locales/de.json | 2 +- admin/src/locales/en.json | 2 +- admin/src/pages/Overview.vue | 6 ++- 6 files changed, 41 insertions(+), 27 deletions(-) diff --git a/admin/src/components/ContributionLink.vue b/admin/src/components/ContributionLink.vue index 893e202f4..91c8ce95b 100644 --- a/admin/src/components/ContributionLink.vue +++ b/admin/src/components/ContributionLink.vue @@ -15,7 +15,10 @@

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

- +
@@ -24,6 +27,7 @@ v-if="count > 0" :items="items" @editContributionLinkData="editContributionLinkData" + @get-contribution-links="getContributionLinks" />
{{ $t('contributionLink.noContributionLinks') }}
@@ -61,6 +65,9 @@ export default { if (!this.visible) this.$root.$emit('bv::toggle::collapse', 'newContribution') this.contributionLinkData = data }, + getContributionLinks() { + this.$emit('get-contribution-links') + }, }, } diff --git a/admin/src/components/ContributionLinkForm.vue b/admin/src/components/ContributionLinkForm.vue index a159d33d3..6daf1e299 100644 --- a/admin/src/components/ContributionLinkForm.vue +++ b/admin/src/components/ContributionLinkForm.vue @@ -163,7 +163,6 @@ export default { if (this.form.validFrom === null) return this.toastError(this.$t('contributionLink.noStartDate')) if (this.form.validTo === null) return this.toastError(this.$t('contributionLink.noEndDate')) - // alert(JSON.stringify(this.form)) this.$apollo .mutate({ mutation: createContributionLink, @@ -182,6 +181,8 @@ export default { this.link = result.data.createContributionLink.link this.toastSuccess(this.link) this.onReset() + this.$root.$emit('bv::toggle::collapse', 'newContribution') + this.$emit('get-contribution-links') }) .catch((error) => { this.toastError(error.message) diff --git a/admin/src/components/ContributionLinkList.vue b/admin/src/components/ContributionLinkList.vue index 518d7d57e..18c136199 100644 --- a/admin/src/components/ContributionLinkList.vue +++ b/admin/src/components/ContributionLinkList.vue @@ -1,12 +1,12 @@