enhance: display process logs

This commit is contained in:
Julian Krauser 2025-01-12 14:05:08 +01:00
parent a8e2b05d8e
commit 3da0f4cd49
5 changed files with 145 additions and 13 deletions

View file

@ -61,6 +61,12 @@
<SuccessCheckmark v-else-if="sendingPreview == 'success'" />
<FailureXMark v-else-if="sendingPreview == 'failed'" />
</button>
<button v-if="pdfSourceMessages.length != 0" primary-outline class="!w-fit" @click="openPdfLogs">
Druck Logs
</button>
<button v-if="mailSourceMessages.length != 0" primary-outline class="!w-fit" @click="openMailLogs">
Versand Logs
</button>
</div>
</div>
</template>
@ -84,7 +90,15 @@ export default defineComponent({
newsletterId: String,
},
computed: {
...mapState(useNewsletterPrintoutStore, ["printout", "loading", "printing", "sending", "sendingPreview"]),
...mapState(useNewsletterPrintoutStore, [
"printout",
"loading",
"printing",
"sending",
"sendingPreview",
"mailSourceMessages",
"pdfSourceMessages",
]),
...mapState(useAbilityStore, ["can"]),
},
mounted() {
@ -118,6 +132,20 @@ export default defineComponent({
})
.catch(() => {});
},
openPdfLogs() {
this.openModal(
markRaw(
defineAsyncComponent(() => import("@/components/admin/club/newsletter/NewsletterPrintingProgressModal.vue"))
)
);
},
openMailLogs() {
this.openModal(
markRaw(
defineAsyncComponent(() => import("@/components/admin/club/newsletter/NewsletterMailProgressModal.vue"))
)
);
},
},
});
</script>