From f49e1896b93df0bf8b30ca07ca42893d8a9b7242 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Sun, 31 Aug 2025 15:28:46 +0200 Subject: [PATCH] =?UTF-8?q?F=C3=BCgt=20eine=20Funktion=20zur=20PDF-Generie?= =?UTF-8?q?rung=20f=C3=BCr=20ausgew=C3=A4hlte=20Mitglieder=20in=20Official?= =?UTF-8?q?Tournaments.vue=20hinzu.=20Implementiert=20ein=20Dialogfeld=20z?= =?UTF-8?q?ur=20Auswahl=20von=20Mitgliedern=20und=20erm=C3=B6glicht=20die?= =?UTF-8?q?=20Erstellung=20eines=20PDFs=20mit=20Wettbewerbsinformationen.?= =?UTF-8?q?=20Aktualisiert=20das=20Styling=20f=C3=BCr=20die=20Benutzerober?= =?UTF-8?q?fl=C3=A4che=20und=20die=20Modal-Komponenten.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/PDFGenerator.js | 29 ++++++++ frontend/src/views/OfficialTournaments.vue | 87 +++++++++++++++++++++- 2 files changed, 115 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/PDFGenerator.js b/frontend/src/components/PDFGenerator.js index 63e3273..725657e 100644 --- a/frontend/src/components/PDFGenerator.js +++ b/frontend/src/components/PDFGenerator.js @@ -264,6 +264,35 @@ class PDFGenerator { }); } + addMemberCompetitions(tournamentTitle, memberName, rows) { + let y = this.margin; + this.pdf.setFont('helvetica', 'bold'); + this.pdf.setFontSize(14); + this.pdf.text(tournamentTitle || 'Offizielles Turnier', this.margin, y); + y += 9; + this.pdf.setFont('helvetica', 'normal'); + this.pdf.setFontSize(12); + this.pdf.text(`Mitglied: ${memberName}`, this.margin, y); + y += 8; + this.pdf.setFont('helvetica', 'bold'); + this.pdf.text('Wettbewerb', this.margin, y); + this.pdf.text('Datum', this.margin + 110, y); + this.pdf.text('Startzeit', this.margin + 150, y); + y += 7; + this.pdf.setFont('helvetica', 'normal'); + for (const r of rows) { + this.pdf.text(r.name || '', this.margin, y); + this.pdf.text(r.date || '–', this.margin + 110, y); + this.pdf.text(r.time || '–', this.margin + 150, y); + y += 7; + if (y > this.pageHeight) { + this.addNewPage(); + y = this.margin; + } + } + this.cursorY = y + 10; + } + } export default PDFGenerator; diff --git a/frontend/src/views/OfficialTournaments.vue b/frontend/src/views/OfficialTournaments.vue index bdfcb25..ea2bd42 100644 --- a/frontend/src/views/OfficialTournaments.vue +++ b/frontend/src/views/OfficialTournaments.vue @@ -42,6 +42,10 @@ +
+ + +

Konkurrenzen

@@ -101,12 +105,36 @@
+ +