Moved addAddress to PDFGenerator class

This commit is contained in:
Torsten Schulz
2025-07-15 15:56:45 +02:00
parent 9ba39f9f47
commit 9f17f2399a
2 changed files with 19 additions and 18 deletions

View File

@@ -175,6 +175,25 @@ class PDFGenerator {
this.pdf.text(phoneNumber, this.margin + 120, this.yPos);
this.yPos += this.LINE_HEIGHT;
}
addAddress(clubName, addressLines) {
if (!this.addressY) {
this.addressY = 30;
}
this.doc.setFontSize(14);
this.doc.setFont(undefined, 'bold');
this.doc.text(clubName, 20, this.addressY);
this.doc.setFontSize(12);
this.doc.setFont(undefined, 'normal');
addressLines.forEach(line => {
this.addressY += 7;
this.doc.text(line, 20, this.addressY);
});
this.addressY += 10; // Abstand zur nächsten Adresse
},
}
export default PDFGenerator;

View File

@@ -179,24 +179,6 @@ export default {
return uniqueLocations;
},
addAddress(clubName, addressLines) {
if (!this.addressY) {
this.addressY = 30;
}
this.doc.setFontSize(14);
this.doc.setFont(undefined, 'bold');
this.doc.text(clubName, 20, this.addressY);
this.doc.setFontSize(12);
this.doc.setFont(undefined, 'normal');
addressLines.forEach(line => {
this.addressY += 7;
this.doc.text(line, 20, this.addressY);
});
this.addressY += 10; // Abstand zur nächsten Adresse
},
},
async created() {
await this.loadLeagues();