diff --git a/src/components/admin/club/protocol/ProtocolPrintoutViewerModal.vue b/src/components/admin/club/protocol/ProtocolPrintoutViewerModal.vue new file mode 100644 index 0000000..1c848ff --- /dev/null +++ b/src/components/admin/club/protocol/ProtocolPrintoutViewerModal.vue @@ -0,0 +1,40 @@ + + + + + + + schließen + + + + + + diff --git a/src/stores/admin/protocolPrintout.ts b/src/stores/admin/protocolPrintout.ts index 4760c1e..53cf4ed 100644 --- a/src/stores/admin/protocolPrintout.ts +++ b/src/stores/admin/protocolPrintout.ts @@ -2,6 +2,7 @@ import { defineStore } from "pinia"; import { http } from "@/serverCom"; import type { ProtocolPrintoutViewModel } from "../../viewmodels/admin/protocolPrintout.models"; import { useProtocolStore } from "./protocol"; +import type { AxiosResponse } from "axios"; export const useProtocolPrintoutStore = defineStore("protocolPrintout", { state: () => { @@ -25,17 +26,11 @@ export const useProtocolPrintoutStore = defineStore("protocolPrintout", { this.loading = "failed"; }); }, - fetchProtocolPrintoutById(printoutId: string) { + fetchProtocolPrintoutById(printoutId: number): Promise> { const protocolId = useProtocolStore().activeProtocol; - this.loading = "loading"; - http - .get(`/admin/protocol/${protocolId}/printout/${printoutId}`) - .then((result) => { - this.loading = "fetched"; - }) - .catch((err) => { - this.loading = "failed"; - }); + return http.get(`/admin/protocol/${protocolId}/printout/${printoutId}`, { + responseType: "blob", + }); }, createProtocolPrintout() { this.printing = "loading"; diff --git a/src/views/admin/club/protocol/ProtocolPrintout.vue b/src/views/admin/club/protocol/ProtocolPrintout.vue index d989bdf..e452021 100644 --- a/src/views/admin/club/protocol/ProtocolPrintout.vue +++ b/src/views/admin/club/protocol/ProtocolPrintout.vue @@ -13,6 +13,14 @@ > {{ print.title }} + + + + + + + + Ausdruck Nummer: {{ print.iteration }} @@ -33,12 +41,14 @@
{{ print.title }}
Ausdruck Nummer: {{ print.iteration }}