From 548cd9d622628391f12d9d5b190f201be4644ad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Z=C3=BCrcher?= Date: Thu, 19 Feb 2026 18:18:58 +0100 Subject: [PATCH] fix pdf size in phone and on desktop close #52 --- src/pages/ReportPage.vue | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/pages/ReportPage.vue b/src/pages/ReportPage.vue index 9c8b0b3..cf7d8aa 100644 --- a/src/pages/ReportPage.vue +++ b/src/pages/ReportPage.vue @@ -82,8 +82,12 @@ v-if="attendees !== undefined" :class=" nonAttendees !== undefined - ? 'col-12 col-sm-5 col-md-5 q-pa-md' - : 'col-12 col-md-8 col-lg-5' + ? printing + ? 'col-5 q-pa-md' + : 'col-12 col-sm-5 col-md-5 q-pa-md' + : printing + ? 'col-5' + : 'col-12 col-md-8 col-lg-5' " > ([]); const reportExportRef = ref(null); const weekdays = ref([0, 3]); +const printing = ref(false); const columns = computed(() => [ { @@ -268,10 +279,14 @@ function updateReport(dates: string[]) { } function printReport() { + printing.value = true; window.print(); + printing.value = false; } async function downloadPDF() { + printing.value = true; + const element = reportExportRef.value; if (!element) return; // Generate date string (YYYY-MM-DD) @@ -308,7 +323,8 @@ async function downloadPDF() { .save() .catch((error) => { console.error('PDF Generation failed:', error); - }); + }) + .finally(() => (printing.value = false)); }