From 196515daa8895a029e9eb4653cc028a875efef52 Mon Sep 17 00:00:00 2001 From: Thomas Reitz Date: Sat, 14 Mar 2026 09:35:45 +0100 Subject: [PATCH] =?UTF-8?q?fix(core):=20PDF-Export=20=E2=80=94=20Titel=20a?= =?UTF-8?q?us=20jobTitle-Feld=20statt=20erster=20Erfahrung?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - getExportData(): jobTitle zu den selektierten User-Feldern hinzugefuegt - ExportData-Interface: jobTitle: string | null ergaenzt - PDF: Unter dem Namen wird jetzt data.jobTitle angezeigt statt profile.experiences[0].area Co-Authored-By: Claude Sonnet 4.6 --- .../src/core/expert-profile/expert-profile.service.ts | 1 + .../src/core/expert-profile/profile-export.service.ts | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/core-service/src/core/expert-profile/expert-profile.service.ts b/packages/core-service/src/core/expert-profile/expert-profile.service.ts index 91d223a..edcc1ec 100644 --- a/packages/core-service/src/core/expert-profile/expert-profile.service.ts +++ b/packages/core-service/src/core/expert-profile/expert-profile.service.ts @@ -310,6 +310,7 @@ export class ExpertProfileService { postalCode: true, city: true, avatar: true, + jobTitle: true, expertProfile: { include: { experiences: { orderBy: { createdAt: 'desc' } }, diff --git a/packages/core-service/src/core/expert-profile/profile-export.service.ts b/packages/core-service/src/core/expert-profile/profile-export.service.ts index a2589b9..45aa944 100644 --- a/packages/core-service/src/core/expert-profile/profile-export.service.ts +++ b/packages/core-service/src/core/expert-profile/profile-export.service.ts @@ -74,6 +74,7 @@ interface ExportData { postalCode: string | null; city: string | null; avatar: string | null; + jobTitle: string | null; expertProfile: { skills: string[]; experiences: ExportExperience[]; @@ -293,12 +294,11 @@ export class ProfileExportService { doc.text(fullName, leftColX, yLeft, { width: leftColWidth, align: 'center' }); yLeft += doc.heightOfString(fullName, { width: leftColWidth }) + 5; - // Rolle (erste Erfahrung als Titel) - if (profile && profile.experiences.length > 0) { - const mainRole = profile.experiences[0].area; + // Titel aus dem Profil + if (data.jobTitle) { doc.font('Helvetica').fontSize(10).fillColor(accentColor); - doc.text(mainRole, leftColX, yLeft, { width: leftColWidth, align: 'center' }); - yLeft += doc.heightOfString(mainRole, { width: leftColWidth }) + 8; + doc.text(data.jobTitle, leftColX, yLeft, { width: leftColWidth, align: 'center' }); + yLeft += doc.heightOfString(data.jobTitle, { width: leftColWidth }) + 8; } // Akzentlinie