From 8664836a202945bb420b79896e5a223cb54a9334 Mon Sep 17 00:00:00 2001 From: Julian Krauser Date: Fri, 11 Oct 2024 14:43:56 +0200 Subject: [PATCH] Pagination central --- src/components/Pagination.vue | 246 ++++++++++++++++++ src/router/index.ts | 12 +- src/viewmodels/admin/protocolAgenda.models.ts | 6 + .../admin/protocolDecision.models.ts | 6 + .../admin/protocolPresence.models.ts | 7 + src/viewmodels/admin/protocolVoting.models.ts | 9 + src/views/admin/club/protocol/Protocol.vue | 113 +------- ...rotocolProtocol.vue => ProtocolAgenda.vue} | 10 +- ...tocolPrecense.vue => ProtocolPresence.vue} | 0 .../admin/club/protocol/ProtocolRouting.vue | 4 +- src/views/admin/members/Member.vue | 51 +--- 11 files changed, 313 insertions(+), 151 deletions(-) create mode 100644 src/components/Pagination.vue create mode 100644 src/viewmodels/admin/protocolAgenda.models.ts create mode 100644 src/viewmodels/admin/protocolDecision.models.ts create mode 100644 src/viewmodels/admin/protocolPresence.models.ts create mode 100644 src/viewmodels/admin/protocolVoting.models.ts rename src/views/admin/club/protocol/{ProtocolProtocol.vue => ProtocolAgenda.vue} (90%) rename src/views/admin/club/protocol/{ProtocolPrecense.vue => ProtocolPresence.vue} (100%) diff --git a/src/components/Pagination.vue b/src/components/Pagination.vue new file mode 100644 index 0000000..a0f198c --- /dev/null +++ b/src/components/Pagination.vue @@ -0,0 +1,246 @@ + + + + + diff --git a/src/router/index.ts b/src/router/index.ts index d956e4f..704a63a 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -174,9 +174,9 @@ const router = createRouter({ props: true, }, { - path: "precense", - name: "admin-club-protocol-precense", - component: () => import("@/views/admin/club/protocol/ProtocolPrecense.vue"), + path: "presence", + name: "admin-club-protocol-presence", + component: () => import("@/views/admin/club/protocol/ProtocolPresence.vue"), props: true, }, { @@ -192,9 +192,9 @@ const router = createRouter({ props: true, }, { - path: "protocol", - name: "admin-club-protocol-protocol", - component: () => import("@/views/admin/club/protocol/ProtocolProtocol.vue"), + path: "agenda", + name: "admin-club-protocol-agenda", + component: () => import("@/views/admin/club/protocol/ProtocolAgenda.vue"), props: true, }, ], diff --git a/src/viewmodels/admin/protocolAgenda.models.ts b/src/viewmodels/admin/protocolAgenda.models.ts new file mode 100644 index 0000000..3a59327 --- /dev/null +++ b/src/viewmodels/admin/protocolAgenda.models.ts @@ -0,0 +1,6 @@ +export interface ProtocolAgendaViewModel { + id: number; + topic: string; + context: string; + protocolId: number; +} diff --git a/src/viewmodels/admin/protocolDecision.models.ts b/src/viewmodels/admin/protocolDecision.models.ts new file mode 100644 index 0000000..4a7212c --- /dev/null +++ b/src/viewmodels/admin/protocolDecision.models.ts @@ -0,0 +1,6 @@ +export interface ProtocolDecisionViewModel { + id: number; + topic: string; + context: string; + protocolId: number; +} diff --git a/src/viewmodels/admin/protocolPresence.models.ts b/src/viewmodels/admin/protocolPresence.models.ts new file mode 100644 index 0000000..9c10f59 --- /dev/null +++ b/src/viewmodels/admin/protocolPresence.models.ts @@ -0,0 +1,7 @@ +import { MemberViewModel } from "./member.models"; + +export interface ProtocolPresenceViewModel { + memberId: number; + member: MemberViewModel; + protocolId: number; +} diff --git a/src/viewmodels/admin/protocolVoting.models.ts b/src/viewmodels/admin/protocolVoting.models.ts new file mode 100644 index 0000000..686f423 --- /dev/null +++ b/src/viewmodels/admin/protocolVoting.models.ts @@ -0,0 +1,9 @@ +export interface ProtocolVotingViewModel { + id: number; + topic: string; + context: string; + favour: number; + abstain: number; + against: number; + protocolId: number; +} diff --git a/src/views/admin/club/protocol/Protocol.vue b/src/views/admin/club/protocol/Protocol.vue index c21d9a2..dc9a17f 100644 --- a/src/views/admin/club/protocol/Protocol.vue +++ b/src/views/admin/club/protocol/Protocol.vue @@ -7,42 +7,17 @@