mirror of
http://172.20.10.11:3000/gitadmin/INSIGHT-MVP.git
synced 2026-06-25 00:16:41 +02:00
fix(core): PDF-Export — Titel aus jobTitle-Feld statt erster Erfahrung
- 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 <noreply@anthropic.com>
This commit is contained in:
parent
382beab9c3
commit
196515daa8
2 changed files with 6 additions and 5 deletions
|
|
@ -310,6 +310,7 @@ export class ExpertProfileService {
|
|||
postalCode: true,
|
||||
city: true,
|
||||
avatar: true,
|
||||
jobTitle: true,
|
||||
expertProfile: {
|
||||
include: {
|
||||
experiences: { orderBy: { createdAt: 'desc' } },
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue