From c40b53b2009b669ddd62754a9f0bc4594ba99004 Mon Sep 17 00:00:00 2001 From: Julian Krauser Date: Mon, 20 Jan 2025 09:43:48 +0100 Subject: [PATCH] member search component --- src/components/admin/MemberSearchSelect.vue | 168 ++++++++++++++++++ src/stores/admin/club/member/member.ts | 14 +- .../club/newsletter/NewsletterRecipients.vue | 96 ++-------- .../admin/club/protocol/ProtocolPresence.vue | 104 ++--------- 4 files changed, 214 insertions(+), 168 deletions(-) create mode 100644 src/components/admin/MemberSearchSelect.vue 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 @@ + + + + + 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 -
  • -
    + - -
  • - - {{ member.firstname }} {{ member.lastname }} {{ member.nameaffix }} - - - -
  • -
    -
    -
    -
    -
    -

    Ausgewählte Empfänger