From 27a4d2187dd68fbe18f4d482f98229510424de0d Mon Sep 17 00:00:00 2001 From: Julian Krauser Date: Fri, 27 Sep 2024 14:55:49 +0200 Subject: [PATCH] create, edit, delete member related Data --- .../admin/club/member/CreateMemberModal.vue | 4 +- .../admin/club/member/DeleteMemberModal.vue | 4 +- .../club/member/MemberAwardCreateModal.vue | 156 ++++++++++++++ .../club/member/MemberAwardDeleteModal.vue | 81 ++++++++ .../club/member/MemberAwardEditModal.vue | 186 +++++++++++++++++ .../admin/club/member/MemberAwardListItem.vue | 29 ++- .../member/MemberCommunicationCreateModal.vue | 181 ++++++++++++++++ .../member/MemberCommunicationDeleteModal.vue | 84 ++++++++ .../member/MemberCommunicationEditModal.vue | 153 ++++++++++++++ .../member/MemberCommunicationListItem.vue | 27 ++- .../MemberExecutivePositionCreateModal.vue | 157 ++++++++++++++ .../MemberExecutivePositionDeleteModal.vue | 81 ++++++++ .../MemberExecutivePositionEditModal.vue | 195 ++++++++++++++++++ .../MemberExecutivePositionListItem.vue | 33 ++- .../member/MemberQualificationCreateModal.vue | 164 +++++++++++++++ .../member/MemberQualificationDeleteModal.vue | 85 ++++++++ .../member/MemberQualificationEditModal.vue | 194 +++++++++++++++++ .../member/MemberQualificationListItem.vue | 33 ++- .../club/member/MembershipCreateModal.vue | 152 ++++++++++++++ .../club/member/MembershipDeleteModal.vue | 83 ++++++++ .../admin/club/member/MembershipEditModal.vue | 194 +++++++++++++++++ .../admin/club/member/MembershipListItem.vue | 32 ++- src/stores/admin/communication.ts | 2 + src/stores/admin/memberQualification.ts | 2 - src/stores/admin/membership.ts | 6 +- src/viewmodels/admin/communication.models.ts | 2 + src/viewmodels/admin/memberAward.models.ts | 1 + .../admin/memberExecutivePosition.models.ts | 1 + .../admin/memberQualification.models.ts | 7 +- src/viewmodels/admin/membership.models.ts | 3 +- src/views/admin/members/MemberAwards.vue | 16 +- .../admin/members/MemberCommunication.vue | 16 +- .../members/MemberExecutivePositions.vue | 18 +- src/views/admin/members/MemberOverview.vue | 31 +-- .../admin/members/MemberQualifications.vue | 16 +- src/views/admin/members/Membership.vue | 16 +- 36 files changed, 2375 insertions(+), 70 deletions(-) create mode 100644 src/components/admin/club/member/MemberAwardCreateModal.vue create mode 100644 src/components/admin/club/member/MemberAwardDeleteModal.vue create mode 100644 src/components/admin/club/member/MemberAwardEditModal.vue create mode 100644 src/components/admin/club/member/MemberCommunicationCreateModal.vue create mode 100644 src/components/admin/club/member/MemberCommunicationDeleteModal.vue create mode 100644 src/components/admin/club/member/MemberCommunicationEditModal.vue create mode 100644 src/components/admin/club/member/MemberExecutivePositionCreateModal.vue create mode 100644 src/components/admin/club/member/MemberExecutivePositionDeleteModal.vue create mode 100644 src/components/admin/club/member/MemberExecutivePositionEditModal.vue create mode 100644 src/components/admin/club/member/MemberQualificationCreateModal.vue create mode 100644 src/components/admin/club/member/MemberQualificationDeleteModal.vue create mode 100644 src/components/admin/club/member/MemberQualificationEditModal.vue create mode 100644 src/components/admin/club/member/MembershipCreateModal.vue create mode 100644 src/components/admin/club/member/MembershipDeleteModal.vue create mode 100644 src/components/admin/club/member/MembershipEditModal.vue diff --git a/src/components/admin/club/member/CreateMemberModal.vue b/src/components/admin/club/member/CreateMemberModal.vue index 1e38933..0addfc7 100644 --- a/src/components/admin/club/member/CreateMemberModal.vue +++ b/src/components/admin/club/member/CreateMemberModal.vue @@ -76,7 +76,9 @@
- +
diff --git a/src/components/admin/club/member/DeleteMemberModal.vue b/src/components/admin/club/member/DeleteMemberModal.vue index 74d38fe..d9be02d 100644 --- a/src/components/admin/club/member/DeleteMemberModal.vue +++ b/src/components/admin/club/member/DeleteMemberModal.vue @@ -26,7 +26,9 @@
- +
diff --git a/src/components/admin/club/member/MemberAwardCreateModal.vue b/src/components/admin/club/member/MemberAwardCreateModal.vue new file mode 100644 index 0000000..1554413 --- /dev/null +++ b/src/components/admin/club/member/MemberAwardCreateModal.vue @@ -0,0 +1,156 @@ + + + + + diff --git a/src/components/admin/club/member/MemberAwardDeleteModal.vue b/src/components/admin/club/member/MemberAwardDeleteModal.vue new file mode 100644 index 0000000..ff4aed0 --- /dev/null +++ b/src/components/admin/club/member/MemberAwardDeleteModal.vue @@ -0,0 +1,81 @@ + + + + + diff --git a/src/components/admin/club/member/MemberAwardEditModal.vue b/src/components/admin/club/member/MemberAwardEditModal.vue new file mode 100644 index 0000000..204e116 --- /dev/null +++ b/src/components/admin/club/member/MemberAwardEditModal.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/components/admin/club/member/MemberAwardListItem.vue b/src/components/admin/club/member/MemberAwardListItem.vue index 5373f94..471d7ef 100644 --- a/src/components/admin/club/member/MemberAwardListItem.vue +++ b/src/components/admin/club/member/MemberAwardListItem.vue @@ -1,22 +1,24 @@ diff --git a/src/components/admin/club/member/MemberCommunicationCreateModal.vue b/src/components/admin/club/member/MemberCommunicationCreateModal.vue new file mode 100644 index 0000000..59375b3 --- /dev/null +++ b/src/components/admin/club/member/MemberCommunicationCreateModal.vue @@ -0,0 +1,181 @@ + + + + + diff --git a/src/components/admin/club/member/MemberCommunicationDeleteModal.vue b/src/components/admin/club/member/MemberCommunicationDeleteModal.vue new file mode 100644 index 0000000..5c0dcd1 --- /dev/null +++ b/src/components/admin/club/member/MemberCommunicationDeleteModal.vue @@ -0,0 +1,84 @@ + + + + + diff --git a/src/components/admin/club/member/MemberCommunicationEditModal.vue b/src/components/admin/club/member/MemberCommunicationEditModal.vue new file mode 100644 index 0000000..9e9c478 --- /dev/null +++ b/src/components/admin/club/member/MemberCommunicationEditModal.vue @@ -0,0 +1,153 @@ + + + + + diff --git a/src/components/admin/club/member/MemberCommunicationListItem.vue b/src/components/admin/club/member/MemberCommunicationListItem.vue index 8fb9ad9..5a7a727 100644 --- a/src/components/admin/club/member/MemberCommunicationListItem.vue +++ b/src/components/admin/club/member/MemberCommunicationListItem.vue @@ -1,9 +1,10 @@ diff --git a/src/components/admin/club/member/MemberExecutivePositionCreateModal.vue b/src/components/admin/club/member/MemberExecutivePositionCreateModal.vue new file mode 100644 index 0000000..b0a868c --- /dev/null +++ b/src/components/admin/club/member/MemberExecutivePositionCreateModal.vue @@ -0,0 +1,157 @@ + + + + + diff --git a/src/components/admin/club/member/MemberExecutivePositionDeleteModal.vue b/src/components/admin/club/member/MemberExecutivePositionDeleteModal.vue new file mode 100644 index 0000000..5e6b3ca --- /dev/null +++ b/src/components/admin/club/member/MemberExecutivePositionDeleteModal.vue @@ -0,0 +1,81 @@ + + + + + diff --git a/src/components/admin/club/member/MemberExecutivePositionEditModal.vue b/src/components/admin/club/member/MemberExecutivePositionEditModal.vue new file mode 100644 index 0000000..17661a2 --- /dev/null +++ b/src/components/admin/club/member/MemberExecutivePositionEditModal.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/src/components/admin/club/member/MemberExecutivePositionListItem.vue b/src/components/admin/club/member/MemberExecutivePositionListItem.vue index e8e2bd0..9bb379f 100644 --- a/src/components/admin/club/member/MemberExecutivePositionListItem.vue +++ b/src/components/admin/club/member/MemberExecutivePositionListItem.vue @@ -1,20 +1,22 @@ diff --git a/src/components/admin/club/member/MemberQualificationCreateModal.vue b/src/components/admin/club/member/MemberQualificationCreateModal.vue new file mode 100644 index 0000000..f814539 --- /dev/null +++ b/src/components/admin/club/member/MemberQualificationCreateModal.vue @@ -0,0 +1,164 @@ + + + + + diff --git a/src/components/admin/club/member/MemberQualificationDeleteModal.vue b/src/components/admin/club/member/MemberQualificationDeleteModal.vue new file mode 100644 index 0000000..d9fd39b --- /dev/null +++ b/src/components/admin/club/member/MemberQualificationDeleteModal.vue @@ -0,0 +1,85 @@ + + + + + diff --git a/src/components/admin/club/member/MemberQualificationEditModal.vue b/src/components/admin/club/member/MemberQualificationEditModal.vue new file mode 100644 index 0000000..5c46371 --- /dev/null +++ b/src/components/admin/club/member/MemberQualificationEditModal.vue @@ -0,0 +1,194 @@ + + + + + diff --git a/src/components/admin/club/member/MemberQualificationListItem.vue b/src/components/admin/club/member/MemberQualificationListItem.vue index f020f2c..0fbb49f 100644 --- a/src/components/admin/club/member/MemberQualificationListItem.vue +++ b/src/components/admin/club/member/MemberQualificationListItem.vue @@ -1,10 +1,13 @@ diff --git a/src/components/admin/club/member/MembershipCreateModal.vue b/src/components/admin/club/member/MembershipCreateModal.vue new file mode 100644 index 0000000..433392f --- /dev/null +++ b/src/components/admin/club/member/MembershipCreateModal.vue @@ -0,0 +1,152 @@ + + + + + diff --git a/src/components/admin/club/member/MembershipDeleteModal.vue b/src/components/admin/club/member/MembershipDeleteModal.vue new file mode 100644 index 0000000..d66e95c --- /dev/null +++ b/src/components/admin/club/member/MembershipDeleteModal.vue @@ -0,0 +1,83 @@ + + + + + diff --git a/src/components/admin/club/member/MembershipEditModal.vue b/src/components/admin/club/member/MembershipEditModal.vue new file mode 100644 index 0000000..6c2dd2f --- /dev/null +++ b/src/components/admin/club/member/MembershipEditModal.vue @@ -0,0 +1,194 @@ + + + + + diff --git a/src/components/admin/club/member/MembershipListItem.vue b/src/components/admin/club/member/MembershipListItem.vue index 513cd53..24a203d 100644 --- a/src/components/admin/club/member/MembershipListItem.vue +++ b/src/components/admin/club/member/MembershipListItem.vue @@ -1,23 +1,26 @@ diff --git a/src/stores/admin/communication.ts b/src/stores/admin/communication.ts index bd11b5a..9816ff7 100644 --- a/src/stores/admin/communication.ts +++ b/src/stores/admin/communication.ts @@ -46,6 +46,7 @@ export const useCommunicationStore = defineStore("communication", { streetNumber: communication.streetNumber, streetNumberAddition: communication.streetNumberAddition, typeId: communication.typeId, + isNewsletterMain: communication.isNewsletterMain, }); this.fetchCommunicationsForMember(); return result; @@ -60,6 +61,7 @@ export const useCommunicationStore = defineStore("communication", { street: communication.street, streetNumber: communication.streetNumber, streetNumberAddition: communication.streetNumberAddition, + isNewsletterMain: communication.isNewsletterMain, }); this.fetchCommunicationsForMember(); return result; diff --git a/src/stores/admin/memberQualification.ts b/src/stores/admin/memberQualification.ts index cfd770f..3c43767 100644 --- a/src/stores/admin/memberQualification.ts +++ b/src/stores/admin/memberQualification.ts @@ -42,8 +42,6 @@ export const useMemberQualificationStore = defineStore("memberQualification", { const result = await http.post(`/admin/member/${memberId}/qualification`, { note: memberQualification.note, start: memberQualification.start, - end: memberQualification.end, - terminationReason: memberQualification.terminationReason, qualificationId: memberQualification.qualificationId, }); this.fetchMemberQualificationsForMember(); diff --git a/src/stores/admin/membership.ts b/src/stores/admin/membership.ts index 8ed771f..e53734e 100644 --- a/src/stores/admin/membership.ts +++ b/src/stores/admin/membership.ts @@ -38,10 +38,8 @@ export const useMembershipStore = defineStore("membership", { async createMembership(membership: CreateMembershipViewModel): Promise> { const memberId = useMemberStore().activeMember; const result = await http.post(`/admin/member/${memberId}/membership`, { - interalId: membership.internalId, + internalId: membership.internalId, start: membership.start, - end: membership.end, - terminationReason: membership.terminationReason, statusId: membership.statusId, }); this.fetchMembershipsForMember(); @@ -50,7 +48,7 @@ export const useMembershipStore = defineStore("membership", { async updateMembership(membership: UpdateMembershipViewModel): Promise> { const memberId = useMemberStore().activeMember; const result = await http.patch(`/admin/member/${memberId}/membership/${membership.id}`, { - interalId: membership.internalId, + internalId: membership.internalId, start: membership.start, end: membership.end, terminationReason: membership.terminationReason, diff --git a/src/viewmodels/admin/communication.models.ts b/src/viewmodels/admin/communication.models.ts index a6df50d..e1b4ed6 100644 --- a/src/viewmodels/admin/communication.models.ts +++ b/src/viewmodels/admin/communication.models.ts @@ -22,6 +22,7 @@ export interface CreateCommunicationViewModel { streetNumber: number; streetNumberAddition: string; typeId: number; + isNewsletterMain: boolean; } export interface UpdateCommunicationViewModel { @@ -33,4 +34,5 @@ export interface UpdateCommunicationViewModel { street: string; streetNumber: number; streetNumberAddition: string; + isNewsletterMain: boolean; } diff --git a/src/viewmodels/admin/memberAward.models.ts b/src/viewmodels/admin/memberAward.models.ts index 9780038..7b9e94b 100644 --- a/src/viewmodels/admin/memberAward.models.ts +++ b/src/viewmodels/admin/memberAward.models.ts @@ -4,6 +4,7 @@ export interface MemberAwardViewModel { note?: string; date: Date; award: string; + awardId: number; } export interface CreateMemberAwardViewModel { diff --git a/src/viewmodels/admin/memberExecutivePosition.models.ts b/src/viewmodels/admin/memberExecutivePosition.models.ts index e78b34e..d54d9f8 100644 --- a/src/viewmodels/admin/memberExecutivePosition.models.ts +++ b/src/viewmodels/admin/memberExecutivePosition.models.ts @@ -4,6 +4,7 @@ export interface MemberExecutivePositionViewModel { start: Date; end?: Date; executivePosition: string; + executivePositionId: number; } export interface CreateMemberExecutivePositionViewModel { diff --git a/src/viewmodels/admin/memberQualification.models.ts b/src/viewmodels/admin/memberQualification.models.ts index 366929b..c723f26 100644 --- a/src/viewmodels/admin/memberQualification.models.ts +++ b/src/viewmodels/admin/memberQualification.models.ts @@ -5,14 +5,13 @@ export interface MemberQualificationViewModel { end?: Date; terminationReason?: string; qualification: string; + qualificationId: number; } export interface CreateMemberQualificationViewModel { note?: string; start: Date; - end?: Date; - terminationReason?: string; - qualificationId: string; + qualificationId: number; } export interface UpdateMemberQualificationViewModel { @@ -21,5 +20,5 @@ export interface UpdateMemberQualificationViewModel { start: Date; end?: Date; terminationReason?: string; - qualificationId: string; + qualificationId: number; } diff --git a/src/viewmodels/admin/membership.models.ts b/src/viewmodels/admin/membership.models.ts index c078dc7..76b804e 100644 --- a/src/viewmodels/admin/membership.models.ts +++ b/src/viewmodels/admin/membership.models.ts @@ -5,13 +5,12 @@ export interface MembershipViewModel { end?: Date; terminationReason?: string; status: string; + statusId: number; } export interface CreateMembershipViewModel { internalId?: string; start: Date; - end?: Date; - terminationReason?: string; statusId: number; } diff --git a/src/views/admin/members/MemberAwards.vue b/src/views/admin/members/MemberAwards.vue index cbaa8d6..0993c5a 100644 --- a/src/views/admin/members/MemberAwards.vue +++ b/src/views/admin/members/MemberAwards.vue @@ -4,23 +4,27 @@ -

laden fehlgeschlagen

+

↺ laden fehlgeschlagen

- +
diff --git a/src/views/admin/members/MemberCommunication.vue b/src/views/admin/members/MemberCommunication.vue index 663d4f4..0861d6e 100644 --- a/src/views/admin/members/MemberCommunication.vue +++ b/src/views/admin/members/MemberCommunication.vue @@ -8,15 +8,15 @@ /> -

laden fehlgeschlagen

+

↺ laden fehlgeschlagen

- +
diff --git a/src/views/admin/members/MemberExecutivePositions.vue b/src/views/admin/members/MemberExecutivePositions.vue index 6831afc..99efd14 100644 --- a/src/views/admin/members/MemberExecutivePositions.vue +++ b/src/views/admin/members/MemberExecutivePositions.vue @@ -8,23 +8,27 @@ /> -

laden fehlgeschlagen

+

↺ laden fehlgeschlagen

- +
diff --git a/src/views/admin/members/MemberOverview.vue b/src/views/admin/members/MemberOverview.vue index 9f3f13c..f4e7195 100644 --- a/src/views/admin/members/MemberOverview.vue +++ b/src/views/admin/members/MemberOverview.vue @@ -58,17 +58,19 @@

bevorzugte Kommunikationswege

-
-
-

- {{ com.type.type }} -

-
-
-

{{ field }}: {{ com[field] || "--" }}

+
+
+
+

+ {{ com.type.type }} +

+
+
+

{{ field }}: {{ com[field] || "--" }}

+
@@ -90,7 +92,9 @@
-

laden fehlgeschlagen

+

+ ↺ laden fehlgeschlagen +

@@ -103,6 +107,9 @@ import { useMemberStore } from "@/stores/admin/member"; diff --git a/src/views/admin/members/Membership.vue b/src/views/admin/members/Membership.vue index fc90df6..2bbb1a1 100644 --- a/src/views/admin/members/Membership.vue +++ b/src/views/admin/members/Membership.vue @@ -4,23 +4,27 @@ -

laden fehlgeschlagen

+

↺ laden fehlgeschlagen

- +