From 883559d8a5df070fc6499248cd30b4569d5ccb43 Mon Sep 17 00:00:00 2001 From: Julian Krauser Date: Tue, 21 Jan 2025 08:58:30 +0100 Subject: [PATCH 1/2] fix: get all members for newletter recipients query --- src/stores/admin/club/member/member.ts | 5 +++++ .../admin/club/newsletter/NewsletterRecipients.vue | 12 +++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/stores/admin/club/member/member.ts b/src/stores/admin/club/member/member.ts index 1e1a30e..c7892c2 100644 --- a/src/stores/admin/club/member/member.ts +++ b/src/stores/admin/club/member/member.ts @@ -40,6 +40,11 @@ export const useMemberStore = defineStore("member", { this.loading = "failed"; }); }, + async getAllMembers(): Promise> { + return await http.get(`/admin/member?noLimit=true`).then((res) => { + return { ...res, data: res.data.members }; + }); + }, async getMembersByIds(ids: Array): Promise> { return await http.get(`/admin/member?ids=${ids.join(",")}&noLimit=true`).then((res) => { return { ...res, data: res.data.members }; diff --git a/src/views/admin/club/newsletter/NewsletterRecipients.vue b/src/views/admin/club/newsletter/NewsletterRecipients.vue index 0271704..0a18c1a 100644 --- a/src/views/admin/club/newsletter/NewsletterRecipients.vue +++ b/src/views/admin/club/newsletter/NewsletterRecipients.vue @@ -27,8 +27,6 @@ title="weitere Empfänger suchen" v-model="recipients" :disabled="!can('create', 'club', 'newsletter')" - @add:member="(s) => members.push(s)" - @add:member-by-array="(s) => members.push(...s)" />

Ausgewählte Empfänger

@@ -149,9 +147,10 @@ export default defineComponent({ // this.fetchNewsletterRecipients(); this.fetchQueries(); this.loadQuery(); + this.loadMembers(); }, methods: { - ...mapActions(useMemberStore, ["fetchMembers"]), + ...mapActions(useMemberStore, ["getAllMembers"]), ...mapActions(useNewsletterRecipientsStore, ["fetchNewsletterRecipients"]), ...mapActions(useQueryStoreStore, ["fetchQueries"]), ...mapActions(useQueryBuilderStore, ["sendQuery"]), @@ -161,6 +160,13 @@ export default defineComponent({ this.recipients.splice(index, 1); } }, + loadMembers() { + this.getAllMembers() + .then((res) => { + this.members = res.data; + }) + .catch(() => {}); + }, loadQuery() { if (this.recipientsByQuery) { this.sendQuery(0, 1000, this.recipientsByQuery.query); -- 2.45.2 From 131b3747de4ae177e193fe69d7476eb10dec189d Mon Sep 17 00:00:00 2001 From: Julian Krauser Date: Tue, 21 Jan 2025 08:58:47 +0100 Subject: [PATCH 2/2] enhance: status displayed by member search --- src/components/admin/MemberSearchSelect.vue | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/components/admin/MemberSearchSelect.vue b/src/components/admin/MemberSearchSelect.vue index e9013f2..cf67fa9 100644 --- a/src/components/admin/MemberSearchSelect.vue +++ b/src/components/admin/MemberSearchSelect.vue @@ -19,13 +19,25 @@ - + +
  • + + suche +
  • +
    +
  • - Keine Auswahl + tippe, um zu suchen... +
  • +
    + +
  • + Keine Auswahl gefunden.