feat(PDFGenerator): center align text in PDF generation
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 55s
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 55s
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user