mirror of
http://172.20.10.11:3000/gitadmin/INSIGHT-MVP.git
synced 2026-06-25 01:56:39 +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,
|
postalCode: true,
|
||||||
city: true,
|
city: true,
|
||||||
avatar: true,
|
avatar: true,
|
||||||
|
jobTitle: true,
|
||||||
expertProfile: {
|
expertProfile: {
|
||||||
include: {
|
include: {
|
||||||
experiences: { orderBy: { createdAt: 'desc' } },
|
experiences: { orderBy: { createdAt: 'desc' } },
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,7 @@ interface ExportData {
|
||||||
postalCode: string | null;
|
postalCode: string | null;
|
||||||
city: string | null;
|
city: string | null;
|
||||||
avatar: string | null;
|
avatar: string | null;
|
||||||
|
jobTitle: string | null;
|
||||||
expertProfile: {
|
expertProfile: {
|
||||||
skills: string[];
|
skills: string[];
|
||||||
experiences: ExportExperience[];
|
experiences: ExportExperience[];
|
||||||
|
|
@ -293,12 +294,11 @@ export class ProfileExportService {
|
||||||
doc.text(fullName, leftColX, yLeft, { width: leftColWidth, align: 'center' });
|
doc.text(fullName, leftColX, yLeft, { width: leftColWidth, align: 'center' });
|
||||||
yLeft += doc.heightOfString(fullName, { width: leftColWidth }) + 5;
|
yLeft += doc.heightOfString(fullName, { width: leftColWidth }) + 5;
|
||||||
|
|
||||||
// Rolle (erste Erfahrung als Titel)
|
// Titel aus dem Profil
|
||||||
if (profile && profile.experiences.length > 0) {
|
if (data.jobTitle) {
|
||||||
const mainRole = profile.experiences[0].area;
|
|
||||||
doc.font('Helvetica').fontSize(10).fillColor(accentColor);
|
doc.font('Helvetica').fontSize(10).fillColor(accentColor);
|
||||||
doc.text(mainRole, leftColX, yLeft, { width: leftColWidth, align: 'center' });
|
doc.text(data.jobTitle, leftColX, yLeft, { width: leftColWidth, align: 'center' });
|
||||||
yLeft += doc.heightOfString(mainRole, { width: leftColWidth }) + 8;
|
yLeft += doc.heightOfString(data.jobTitle, { width: leftColWidth }) + 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Akzentlinie
|
// Akzentlinie
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue