diff --git a/src/components/admin/MemberSearchSelect.vue b/src/components/admin/MemberSearchSelect.vue new file mode 100644 index 0000000..e9013f2 --- /dev/null +++ b/src/components/admin/MemberSearchSelect.vue @@ -0,0 +1,168 @@ + + + + {{ title }} + + + + + + + + + + Keine Auswahl + + + + + + + {{ member.firstname }} {{ member.lastname }} {{ member.nameaffix }} + + + + + + + + + + + + + + + + diff --git a/src/stores/admin/club/member/member.ts b/src/stores/admin/club/member/member.ts index af803f5..1e1a30e 100644 --- a/src/stores/admin/club/member/member.ts +++ b/src/stores/admin/club/member/member.ts @@ -40,6 +40,16 @@ export const useMemberStore = defineStore("member", { this.loading = "failed"; }); }, + async getMembersByIds(ids: Array): Promise> { + return await http.get(`/admin/member?ids=${ids.join(",")}&noLimit=true`).then((res) => { + return { ...res, data: res.data.members }; + }); + }, + async searchMembers(search: string): Promise> { + return await http.get(`/admin/member?search=${search}&noLimit=true`).then((res) => { + return { ...res, data: res.data.members }; + }); + }, fetchMemberByActiveId() { this.loadingActive = "loading"; http @@ -84,10 +94,10 @@ export const useMemberStore = defineStore("member", { this.fetchMembers(); return result; }, - async printMemberList(){ + async printMemberList() { return http.get(`/admin/member/print/namelist`, { responseType: "blob", }); - } + }, }, }); diff --git a/src/views/admin/club/newsletter/NewsletterRecipients.vue b/src/views/admin/club/newsletter/NewsletterRecipients.vue index 4e55526..0271704 100644 --- a/src/views/admin/club/newsletter/NewsletterRecipients.vue +++ b/src/views/admin/club/newsletter/NewsletterRecipients.vue @@ -23,63 +23,14 @@ - - - weitere Empfänger suchen - - - - - - - - - - Keine Auswahl - - + members.push(s)" + @add:member-by-array="(s) => members.push(...s)" + /> - - - - {{ member.firstname }} {{ member.lastname }} {{ member.nameaffix }} - - - - - - - - - - - Ausgewählte Empfänger
Ausgewählte Empfänger