protocol data stores
This commit is contained in:
parent
8664836a20
commit
41b300fb72
15 changed files with 259 additions and 31 deletions
|
@ -1,7 +1,9 @@
|
|||
<template>
|
||||
<div class="flex flex-col gap-2 h-full w-full overflow-y-auto">
|
||||
<Spinner v-if="loadingActive == 'loading'" class="mx-auto" />
|
||||
<p v-else-if="loadingActive == 'failed'" @click="" class="cursor-pointer">↺ laden fehlgeschlagen</p>
|
||||
<Spinner v-if="loading == 'loading'" class="mx-auto" />
|
||||
<p v-else-if="loading == 'failed'" @click="fetchProtocolAgenda" class="cursor-pointer">
|
||||
↺ laden fehlgeschlagen
|
||||
</p>
|
||||
|
||||
<details class="flex flex-col gap-2 rounded-lg w-full justify-between border border-primary overflow-hidden">
|
||||
<summary class="flex flex-row gap-2 bg-primary p-2 w-full justify-between items-center cursor-pointer">
|
||||
|
@ -27,10 +29,10 @@
|
|||
import { defineComponent } from "vue";
|
||||
import { mapActions, mapState } from "pinia";
|
||||
import Spinner from "@/components/Spinner.vue";
|
||||
import { useProtocolStore } from "@/stores/admin/protocol";
|
||||
import { QuillEditor } from "@vueup/vue-quill";
|
||||
import "@vueup/vue-quill/dist/vue-quill.snow.css";
|
||||
import { toolbarOptions } from "@/helpers/quillConfig";
|
||||
import { useProtocolAgendaStore } from "@/stores/admin/protocolAgenda";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -39,9 +41,13 @@ export default defineComponent({
|
|||
protocolId: String,
|
||||
},
|
||||
computed: {
|
||||
...mapState(useProtocolStore, ["loadingActive"]),
|
||||
...mapState(useProtocolAgendaStore, ["agenda", "loading"]),
|
||||
},
|
||||
mounted() {
|
||||
this.fetchProtocolAgenda();
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useProtocolAgendaStore, ["fetchProtocolAgenda"]),
|
||||
},
|
||||
mounted() {},
|
||||
methods: {},
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<template>
|
||||
<div class="flex flex-col gap-2 h-full w-full overflow-y-auto">
|
||||
<Spinner v-if="loadingActive == 'loading'" class="mx-auto" />
|
||||
<p v-else-if="loadingActive == 'failed'" @click="" class="cursor-pointer">↺ laden fehlgeschlagen</p>
|
||||
<Spinner v-if="loading == 'loading'" class="mx-auto" />
|
||||
<p v-else-if="loading == 'failed'" @click="fetchProtocolDecision" class="cursor-pointer">
|
||||
↺ laden fehlgeschlagen
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -13,6 +15,7 @@ import { useProtocolStore } from "@/stores/admin/protocol";
|
|||
import { QuillEditor } from "@vueup/vue-quill";
|
||||
import "@vueup/vue-quill/dist/vue-quill.snow.css";
|
||||
import { toolbarOptions } from "@/helpers/quillConfig";
|
||||
import { useProtocolDecisionStore } from "../../../../stores/admin/protocolDecision";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -21,9 +24,13 @@ export default defineComponent({
|
|||
protocolId: String,
|
||||
},
|
||||
computed: {
|
||||
...mapState(useProtocolStore, ["loadingActive"]),
|
||||
...mapState(useProtocolDecisionStore, ["decision", "loading"]),
|
||||
},
|
||||
mounted() {
|
||||
this.fetchProtocolDecision();
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useProtocolDecisionStore, ["fetchProtocolDecision"]),
|
||||
},
|
||||
mounted() {},
|
||||
methods: {},
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<template>
|
||||
<div class="flex flex-col gap-2 h-full w-full overflow-y-auto">
|
||||
<Spinner v-if="loadingActive == 'loading'" class="mx-auto" />
|
||||
<p v-else-if="loadingActive == 'failed'" @click="" class="cursor-pointer">↺ laden fehlgeschlagen</p>
|
||||
<Spinner v-if="loading == 'loading'" class="mx-auto" />
|
||||
<p v-else-if="loading == 'failed'" @click="fetchProtocolPresence" class="cursor-pointer">
|
||||
↺ laden fehlgeschlagen
|
||||
</p>
|
||||
<div class="w-full">
|
||||
<Combobox v-model="selected" multiple>
|
||||
<ComboboxLabel>Anwesende suchen</ComboboxLabel>
|
||||
|
@ -92,6 +94,7 @@ import { TrashIcon } from "@heroicons/vue/24/outline";
|
|||
import { useProtocolStore } from "@/stores/admin/protocol";
|
||||
import { useMemberStore } from "@/stores/admin/member";
|
||||
import type { MemberViewModel } from "@/viewmodels/admin/member.models";
|
||||
import { useProtocolPresenceStore } from "../../../../stores/admin/protocolPresence";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -106,7 +109,7 @@ export default defineComponent({
|
|||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState(useProtocolStore, ["loadingActive"]),
|
||||
...mapState(useProtocolPresenceStore, ["presence", "loading"]),
|
||||
...mapState(useMemberStore, ["members"]),
|
||||
filtered(): Array<MemberViewModel> {
|
||||
return this.query === ""
|
||||
|
@ -130,9 +133,11 @@ export default defineComponent({
|
|||
},
|
||||
mounted() {
|
||||
this.fetchMembers();
|
||||
this.fetchProtocolPresence();
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useMemberStore, ["fetchMembers"]),
|
||||
...mapActions(useProtocolPresenceStore, ["fetchProtocolPresence"]),
|
||||
removeSelected(id: number) {
|
||||
let index = this.selected.findIndex((s) => s.id == id);
|
||||
if (index != -1) {
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<template>
|
||||
<div class="flex flex-col gap-2 h-full w-full overflow-y-auto">
|
||||
<Spinner v-if="loadingActive == 'loading'" class="mx-auto" />
|
||||
<p v-else-if="loadingActive == 'failed'" @click="" class="cursor-pointer">↺ laden fehlgeschlagen</p>
|
||||
<Spinner v-if="loading == 'loading'" class="mx-auto" />
|
||||
<p v-else-if="loading == 'failed'" @click="fetchProtocolVoting" class="cursor-pointer">
|
||||
↺ laden fehlgeschlagen
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -13,6 +15,7 @@ import { useProtocolStore } from "@/stores/admin/protocol";
|
|||
import { QuillEditor } from "@vueup/vue-quill";
|
||||
import "@vueup/vue-quill/dist/vue-quill.snow.css";
|
||||
import { toolbarOptions } from "@/helpers/quillConfig";
|
||||
import { useProtocolVotingStore } from "../../../../stores/admin/protocolVoting";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -21,9 +24,13 @@ export default defineComponent({
|
|||
protocolId: String,
|
||||
},
|
||||
computed: {
|
||||
...mapState(useProtocolStore, ["loadingActive"]),
|
||||
...mapState(useProtocolVotingStore, ["voting", "loading"]),
|
||||
},
|
||||
mounted() {
|
||||
this.fetchProtocolVoting();
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useProtocolVotingStore, ["fetchProtocolVoting"]),
|
||||
},
|
||||
mounted() {},
|
||||
methods: {},
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue