mirror of
http://172.20.10.11:3000/gitadmin/INSIGHT-MVP.git
synced 2026-06-24 22:46:39 +02:00
fix(core): PDF-Export — Zertifizierungen in linke Spalte verschoben
- ZERTIFIZIERUNGEN von rechter Spalte in linke Spalte verschoben (nach ERFAHRUNG, vor FÄHIGKEITEN) - Textbreite auf leftColWidth (certContentWidth = leftColWidth - 14) angepasst - Timeline-Linie dynamisch (certEntryStartY gespeichert, Linie nach Content) - Alte rechte-Spalte-Sektion entfernt Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
f8aed00645
commit
1d4894b637
1 changed files with 42 additions and 50 deletions
|
|
@ -313,7 +313,48 @@ export class ProfileExportService {
|
|||
}
|
||||
}
|
||||
|
||||
// --- FÄHIGKEITEN (linke Spalte, nach Erfahrungen) ---
|
||||
// --- ZERTIFIZIERUNGEN (linke Spalte, nach Erfahrungen) ---
|
||||
if (profile && profile.certifications.length > 0) {
|
||||
yLeft += 6;
|
||||
yLeft = this.pdfSectionTitle(doc, 'ZERTIFIZIERUNGEN', leftColX, yLeft, leftColWidth, accentColor);
|
||||
|
||||
const certTimelineX = leftColX + 6;
|
||||
const certContentX = leftColX + 14;
|
||||
const certContentWidth = leftColWidth - 14;
|
||||
|
||||
for (let i = 0; i < profile.certifications.length; i++) {
|
||||
const cert = profile.certifications[i];
|
||||
const certEntryStartY = yLeft;
|
||||
|
||||
// Timeline-Punkt
|
||||
doc.circle(certTimelineX, certEntryStartY + 4, 3.5).fill(accentColor);
|
||||
|
||||
// Jahr (fett)
|
||||
doc.font('Helvetica-Bold').fontSize(8).fillColor('#555555');
|
||||
doc.text(String(cert.issueYear), certContentX, yLeft, { width: certContentWidth });
|
||||
yLeft += 11;
|
||||
|
||||
// Titel
|
||||
doc.font('Helvetica-Bold').fontSize(9).fillColor(accentColor);
|
||||
doc.text(cert.title, certContentX, yLeft, { width: certContentWidth });
|
||||
yLeft += doc.heightOfString(cert.title, { width: certContentWidth }) + 2;
|
||||
|
||||
// Zertifizierungsstelle
|
||||
doc.font('Helvetica').fontSize(8).fillColor('#555555');
|
||||
doc.text(cert.issuingBody, certContentX, yLeft, { width: certContentWidth });
|
||||
yLeft += 11;
|
||||
|
||||
yLeft += 4;
|
||||
|
||||
// Timeline-Linie (korrekte Länge)
|
||||
if (i < profile.certifications.length - 1) {
|
||||
doc.moveTo(certTimelineX, certEntryStartY + 8).lineTo(certTimelineX, yLeft - 4)
|
||||
.strokeColor(accentColor).lineWidth(1).stroke();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// --- FÄHIGKEITEN (linke Spalte, nach Zertifizierungen) ---
|
||||
if (profile && profile.skills.length > 0) {
|
||||
yLeft += 6;
|
||||
yLeft = this.pdfSectionTitle(doc, 'FÄHIGKEITEN', leftColX, yLeft, leftColWidth, accentColor);
|
||||
|
|
@ -414,55 +455,6 @@ export class ProfileExportService {
|
|||
}
|
||||
}
|
||||
|
||||
// --- ZERTIFIZIERUNGEN (rechte Spalte) ---
|
||||
if (profile && profile.certifications.length > 0) {
|
||||
if (yRight > pageBottom - 80) {
|
||||
doc.addPage();
|
||||
yRight = 40;
|
||||
} else {
|
||||
yRight += 15;
|
||||
}
|
||||
|
||||
yRight = this.pdfSectionTitle(doc, 'ZERTIFIZIERUNGEN', rightColX, yRight, rightColWidth, accentColor);
|
||||
|
||||
const certTimelineX = rightColX + 6;
|
||||
const certContentX = rightColX + 18;
|
||||
const certContentWidth = rightColWidth - 18;
|
||||
|
||||
for (let i = 0; i < profile.certifications.length; i++) {
|
||||
const cert = profile.certifications[i];
|
||||
|
||||
if (yRight > pageBottom) {
|
||||
doc.addPage();
|
||||
yRight = 40;
|
||||
}
|
||||
|
||||
// Timeline-Punkt
|
||||
doc.circle(certTimelineX, yRight + 4, 3.5).fill(accentColor);
|
||||
if (i < profile.certifications.length - 1) {
|
||||
doc.moveTo(certTimelineX, yRight + 8).lineTo(certTimelineX, yRight + 32)
|
||||
.strokeColor(accentColor).lineWidth(1).stroke();
|
||||
}
|
||||
|
||||
// Jahr (fett)
|
||||
doc.font('Helvetica-Bold').fontSize(8).fillColor('#555555');
|
||||
doc.text(String(cert.issueYear), certContentX, yRight, { width: certContentWidth });
|
||||
yRight += 11;
|
||||
|
||||
// Titel
|
||||
doc.font('Helvetica-Bold').fontSize(9).fillColor(accentColor);
|
||||
doc.text(cert.title, certContentX, yRight, { width: certContentWidth });
|
||||
yRight += doc.heightOfString(cert.title, { width: certContentWidth }) + 2;
|
||||
|
||||
// Zertifizierungsstelle
|
||||
doc.font('Helvetica').fontSize(8).fillColor('#555555');
|
||||
doc.text(cert.issuingBody, certContentX, yRight, { width: certContentWidth });
|
||||
yRight += 11;
|
||||
|
||||
yRight += 4;
|
||||
}
|
||||
}
|
||||
|
||||
// --- ANHÄNGE (Bild-Anhänge als zusätzliche Seiten) ---
|
||||
const attachments = profile?.attachments ?? [];
|
||||
for (const att of attachments) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue