use career-stage-chip component in person profile

This commit is contained in:
2026-08-03 22:57:29 +02:00
parent 1f09f0cf68
commit 90149ddb4e
3 changed files with 5 additions and 61 deletions
@@ -93,19 +93,9 @@
}
@if (displayCareerStage() || orcid()) {
<div class="meta-line">
@if (displayCareerStage()) {
<div class="career-stage-line">
<span class="career-stage-label">Career Stage:</span>
<span
class="career-stage-chip"
[matTooltip]="careerStageTooltip()"
matTooltipPosition="right"
matTooltipClass="career-stage-tooltip"
[matTooltipShowDelay]="250">
{{ displayCareerStage() }}
</span>
</div>
}
<app-career-stage-chip
[careerStage]="displayCareerStage()"
[activeYears]="person()?.career_metrics?.active_years" />
@if (orcid(); as orcidId) {
<a
class="orcid-chip"
@@ -170,33 +170,6 @@
margin-top: 4px;
}
.career-stage-line {
display: flex;
align-items: center;
gap: 8px;
color: var(--sg-text-muted);
font-size: 13px;
}
.career-stage-label {
color: var(--sg-text-muted);
}
.career-stage-chip {
display: inline-flex;
align-items: center;
min-height: 24px;
padding: 2px 10px;
border: 1px solid var(--sg-border);
border-radius: 999px;
background: var(--sg-surface-muted);
color: var(--sg-primary);
font-size: 13px;
font-weight: 600;
line-height: 1.2;
cursor: help;
}
.orcid-chip {
display: inline-flex;
align-items: center;
@@ -18,6 +18,7 @@ import { of, switchMap, finalize, map, catchError, combineLatest } from 'rxjs';
import { PersonInterestingComponent } from '../person-interesting/person-interesting.component';
import { CountryFlagComponent } from '../../shared/ui/country-flag/country-flag.component';
import { CareerStageChipComponent } from '../../shared/ui/career-stage-chip/career-stage-chip.component';
import { WorksService } from '../../api';
import { LoadingComponent } from '../../shared/ui/loading/loading.component';
import { PersonBioResolved } from '../../resolvers/person-bio.resolver';
@@ -46,6 +47,7 @@ type PersonLink = {
RouterModule,
LoadingComponent,
CountryFlagComponent,
CareerStageChipComponent,
],
templateUrl: './person.component.html',
styleUrl: './person.component.scss',
@@ -190,27 +192,6 @@ export class PersonComponent {
return stage;
});
readonly careerStageTooltip = computed(() => {
const stage = this.displayCareerStage();
if (!stage) {
return '';
}
const activeYears = this.person()?.career_metrics?.active_years ?? '-';
return [
`Aktuell: ${stage.replace(' Researcher', '')}`,
`Aktive Publikationsjahre: ${activeYears}`,
'',
'Einteilung:',
'Early: 1\u20134 aktive Publikationsjahre',
'Emerging: 5\u20139 aktive Publikationsjahre',
'Established: 10\u201314 aktive Publikationsjahre',
'Senior: ab 15 aktiven Publikationsjahren',
'',
'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) {