feat(PDFGenerator): center align text in PDF generation
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 55s

This commit is contained in:
Torsten Schulz (local)
2026-09-04 14:38:49 +02:00
parent 138d6fab47
commit bbd89c4190
2 changed files with 2 additions and 2 deletions

View File

@@ -577,7 +577,7 @@ class PDFGenerator {
this.pdf.roundedRect(this.margin, y - 5, 210 - this.margin * 2, boxHeight, 1.5, 1.5, 'FD');
this.pdf.setFont('helvetica', 'bold');
this.pdf.setFontSize(11);
this.pdf.text(lines, this.margin + 3, y + 1);
this.pdf.text(lines, 105, y + 1, { align: 'center' });
y += boxHeight + 4;
}
this.pdf.setFont('helvetica', 'bold');

View File

@@ -1999,7 +1999,7 @@ export default {
parseDateTimeFlexible(s) {
if (!s || typeof s !== 'string') return null;
const t = s.trim();
let m = t.match(/(\d{1,2})\.(\d{1,2})\.(\d{4})(?:\s+(\d{1,2}):(\d{2}))?/);
let m = t.match(/(\d{1,2})\.(\d{1,2})\.(\d{4})(?:\s*,?\s*(\d{1,2}):(\d{2}))?/);
if (m) {
const hours = Number(m[4] || 0);
const minutes = Number(m[5] || 0);