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