2024-10-03 13:43:13 +02:00
|
|
|
<template>
|
|
|
|
<div class="flex flex-col gap-2 h-full w-full overflow-y-auto">
|
2024-10-04 12:47:04 +02:00
|
|
|
<div v-if="activeProtocolObj != null" class="flex flex-col gap-2 w-full">
|
|
|
|
<div class="w-full">
|
|
|
|
<label for="title">Titel</label>
|
|
|
|
<input type="text" id="title" v-model="activeProtocolObj.title" />
|
|
|
|
</div>
|
|
|
|
<div class="w-full">
|
|
|
|
<label for="date">Datum</label>
|
|
|
|
<input type="date" id="date" v-model="activeProtocolObj.date" />
|
|
|
|
</div>
|
|
|
|
<div class="flex flex-row gap-2 w-full">
|
|
|
|
<div class="w-full">
|
|
|
|
<label for="starttime">Startzeit</label>
|
2024-10-29 15:23:35 +01:00
|
|
|
<input type="time" id="starttime" step="1" v-model="activeProtocolObj.starttime" />
|
2024-10-04 12:47:04 +02:00
|
|
|
</div>
|
|
|
|
<div class="w-full">
|
|
|
|
<label for="endtime">Endzeit</label>
|
2024-10-29 15:23:35 +01:00
|
|
|
<input type="time" id="endtime" step="1" v-model="activeProtocolObj.endtime" />
|
2024-10-04 12:47:04 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="flex flex-col h-1/2">
|
|
|
|
<label for="summary">Zusammenfassung</label>
|
|
|
|
<QuillEditor
|
|
|
|
id="summary"
|
|
|
|
theme="snow"
|
|
|
|
placeholder="Zusammenfassung zur Sitzung..."
|
|
|
|
style="height: 250px; max-height: 250px; min-height: 250px"
|
|
|
|
contentType="html"
|
|
|
|
:toolbar="toolbarOptions"
|
|
|
|
v-model:content="activeProtocolObj.summary"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-10-03 13:43:13 +02:00
|
|
|
|
|
|
|
<Spinner v-if="loadingActive == 'loading'" class="mx-auto" />
|
|
|
|
<p v-else-if="loadingActive == 'failed'" @click="fetchProtocolByActiveId" class="cursor-pointer">
|
|
|
|
↺ laden fehlgeschlagen
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
import { defineComponent } from "vue";
|
2024-10-15 16:24:29 +02:00
|
|
|
import { mapActions, mapState, mapWritableState } from "pinia";
|
2024-10-03 13:43:13 +02:00
|
|
|
import Spinner from "@/components/Spinner.vue";
|
|
|
|
import { useProtocolStore } from "@/stores/admin/protocol";
|
2024-10-04 12:47:04 +02:00
|
|
|
import { QuillEditor } from "@vueup/vue-quill";
|
|
|
|
import "@vueup/vue-quill/dist/vue-quill.snow.css";
|
|
|
|
import { toolbarOptions } from "@/helpers/quillConfig";
|
2024-10-03 13:43:13 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
export default defineComponent({
|
|
|
|
props: {
|
|
|
|
protocolId: String,
|
|
|
|
},
|
|
|
|
computed: {
|
2024-10-15 16:24:29 +02:00
|
|
|
...mapWritableState(useProtocolStore, ["loadingActive", "activeProtocolObj"]),
|
2024-10-03 13:43:13 +02:00
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
this.fetchProtocolByActiveId();
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
...mapActions(useProtocolStore, ["fetchProtocolByActiveId"]),
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|