diff --git a/webapp/src/app/modules/person-card/person-card.component.html b/webapp/src/app/modules/person-card/person-card.component.html index 59e1fc6b..1ce09684 100644 --- a/webapp/src/app/modules/person-card/person-card.component.html +++ b/webapp/src/app/modules/person-card/person-card.component.html @@ -38,8 +38,9 @@ Career Stage: {{ careerStage }} diff --git a/webapp/src/app/modules/person-card/person-card.component.ts b/webapp/src/app/modules/person-card/person-card.component.ts index c7815275..c9c9fa48 100644 --- a/webapp/src/app/modules/person-card/person-card.component.ts +++ b/webapp/src/app/modules/person-card/person-card.component.ts @@ -111,8 +111,22 @@ export class PersonCardComponent { return stage; } - readonly careerStageTooltip = - 'Dies ist eine Einschätzung zur Karrierephase, die ausschließlich auf OpenAlex-Publikationsdaten basiert. Es ist kein offizieller akademischer Status.'; + getCareerStageTooltip(careerStage: string): string { + const activeYears = this.person.career_metrics?.active_years ?? '-'; + + return [ + `Aktuell: ${careerStage}`, + `Aktive Publikationsjahre: ${activeYears}`, + '', + 'Einteilung:', + 'Early Researcher: 1\u20134 aktive Publikationsjahre', + 'Emerging Researcher: 5\u201310 aktive Publikationsjahre', + 'Established Researcher: 11\u201320 aktive Publikationsjahre', + 'Senior Researcher: 20+ aktive Publikationsjahre', + '', + 'Diese Einschätzung basiert ausschließlich auf OpenAlex-Publikationsdaten und ist kein offizieller akademischer Status.', + ].join('\n'); + } toggleBookmark(): void { this.bookmarkToggle.emit(this.person); diff --git a/webapp/src/app/modules/person/person.component.html b/webapp/src/app/modules/person/person.component.html index e58bd84d..0dea7f11 100644 --- a/webapp/src/app/modules/person/person.component.html +++ b/webapp/src/app/modules/person/person.component.html @@ -34,8 +34,9 @@ Career Stage: {{ displayCareerStage() }} diff --git a/webapp/src/app/modules/person/person.component.ts b/webapp/src/app/modules/person/person.component.ts index 55afbb2a..bd8c5fd2 100644 --- a/webapp/src/app/modules/person/person.component.ts +++ b/webapp/src/app/modules/person/person.component.ts @@ -152,8 +152,27 @@ export class PersonComponent { return stage; }); - readonly careerStageTooltip = - 'Dies ist eine Einschätzung zur Karrierephase, die ausschließlich auf OpenAlex-Publikationsdaten basiert. Es ist kein offizieller akademischer Status.'; + readonly careerStageTooltip = computed(() => { + const stage = this.displayCareerStage(); + if (!stage) { + return ''; + } + + const activeYears = this.person()?.career_metrics?.active_years ?? '-'; + + return [ + `Aktuell: ${stage}`, + `Aktive Publikationsjahre: ${activeYears}`, + '', + 'Einteilung:', + 'Early Researcher: 1\u20134 aktive Publikationsjahre', + 'Emerging Researcher: 5\u201310 aktive Publikationsjahre', + 'Established Researcher: 11\u201320 aktive Publikationsjahre', + 'Senior Researcher: 20+ aktive Publikationsjahre', + '', + 'Diese Einschätzung basiert ausschließlich auf OpenAlex-Publikationsdaten und ist kein offizieller akademischer Status.', + ].join('\n'); + }); readonly orcid = computed(() => { const rawOrcid = this.getId('orcid'); if (!rawOrcid) { diff --git a/webapp/src/styles.scss b/webapp/src/styles.scss index b69df54f..d2edeee7 100644 --- a/webapp/src/styles.scss +++ b/webapp/src/styles.scss @@ -218,4 +218,10 @@ h3 { .cdk-overlay-pane .mat-mdc-option:hover, .cdk-overlay-pane .mat-mdc-option.mdc-list-item--focused { background: rgba(0, 0, 0, 0.04); -} \ No newline at end of file +} + +.career-stage-tooltip, +.career-stage-tooltip .mdc-tooltip__surface { + max-width: 360px; + white-space: pre-line; +}