trigger protocol render (temporary)

This commit is contained in:
Julian Krauser 2024-10-18 15:23:37 +02:00
parent d62436722a
commit 225b686de6
2 changed files with 9 additions and 1 deletions

View file

@ -100,5 +100,11 @@ export const useProtocolStore = defineStore("protocol", {
}) })
.catch((err) => {}); .catch((err) => {});
}, },
printProtocol() {
return http
.post(`/admin/protocol/${this.activeProtocol}/render`)
.then(() => {})
.catch(() => {});
},
}, },
}); });

View file

@ -6,6 +6,7 @@
<template #topBar> <template #topBar>
<div class="flex flex-row gap-2 items-center justify-between pt-5 pb-3 px-7"> <div class="flex flex-row gap-2 items-center justify-between pt-5 pb-3 px-7">
<h1 class="font-bold text-xl h-8 min-h-fit grow">{{ origin?.title }}, {{ origin?.date }}</h1> <h1 class="font-bold text-xl h-8 min-h-fit grow">{{ origin?.title }}, {{ origin?.date }}</h1>
<PrinterIcon class="w-5 h-5" @click="printProtocol" />
<ProtocolSyncing <ProtocolSyncing
:executeSyncAll="executeSyncAll" :executeSyncAll="executeSyncAll"
@syncState=" @syncState="
@ -53,6 +54,7 @@ import { RouterLink, RouterView } from "vue-router";
import { useProtocolStore } from "@/stores/admin/protocol"; import { useProtocolStore } from "@/stores/admin/protocol";
import { useModalStore } from "@/stores/modal"; import { useModalStore } from "@/stores/modal";
import ProtocolSyncing from "@/components/admin/club/protocol/ProtocolSyncing.vue"; import ProtocolSyncing from "@/components/admin/club/protocol/ProtocolSyncing.vue";
import { PrinterIcon } from "@heroicons/vue/24/outline";
</script> </script>
<script lang="ts"> <script lang="ts">
@ -100,7 +102,7 @@ export default defineComponent({
// } // }
// }, // },
methods: { methods: {
...mapActions(useProtocolStore, ["fetchProtocolByActiveId"]), ...mapActions(useProtocolStore, ["fetchProtocolByActiveId", "printProtocol"]),
...mapActions(useModalStore, ["openModal"]), ...mapActions(useModalStore, ["openModal"]),
openInfoModal() { openInfoModal() {
this.openModal( this.openModal(