From 1f09f0cf68c03e7b84386f4320691a5da16decfe Mon Sep 17 00:00:00 2001 From: louis-19041904 Date: Mon, 3 Aug 2026 22:55:07 +0200 Subject: [PATCH] use career-stage-chip component in person card --- .../person-card/person-card.component.html | 17 +++------- .../person-card/person-card.component.scss | 33 ------------------- .../person-card/person-card.component.ts | 29 ++-------------- 3 files changed, 6 insertions(+), 73 deletions(-) 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 e5e1d0b2..67cf3832 100644 --- a/webapp/src/app/modules/person-card/person-card.component.html +++ b/webapp/src/app/modules/person-card/person-card.component.html @@ -40,19 +40,10 @@ {{ hIndexString() }}

@if (!loading()) { - @if (careerStage(); as careerStage) { -
- Career Stage: - - {{ careerStage }} - -
- } + } diff --git a/webapp/src/app/modules/person-card/person-card.component.scss b/webapp/src/app/modules/person-card/person-card.component.scss index 1b8b015a..fb46ab44 100644 --- a/webapp/src/app/modules/person-card/person-card.component.scss +++ b/webapp/src/app/modules/person-card/person-card.component.scss @@ -264,39 +264,6 @@ white-space: nowrap; } -.career-stage-line { - display: flex; - align-items: center; - gap: 6px; - margin-top: 6px; - color: var(--sg-text-muted); - font-size: 10px; - min-height: 18px; -} - -.career-stage-label { - flex-shrink: 0; -} - -.career-stage-chip { - display: inline-flex; - align-items: center; - min-width: 0; - max-width: 100%; - padding: 2px 8px; - border: 1px solid var(--sg-border); - border-radius: 999px; - background: var(--sg-surface-muted); - color: var(--sg-primary); - font-size: 10px; - font-weight: 600; - line-height: 1.2; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - cursor: help; -} - .card-body { padding: 16px; flex-grow: 1; 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 89cc4362..eea6f571 100644 --- a/webapp/src/app/modules/person-card/person-card.component.ts +++ b/webapp/src/app/modules/person-card/person-card.component.ts @@ -7,6 +7,7 @@ import { CustomAuthor, DehydratedInstitution, WorkTopic } from '../../api'; import { SkTextDirective } from '../../custom-directives/sk-text.directive'; import { TopicChipComponent } from '../../shared/ui/topic-chip/topic-chip.component'; import { CountryFlagComponent } from '../../shared/ui/country-flag/country-flag.component'; +import { CareerStageChipComponent } from '../../shared/ui/career-stage-chip/career-stage-chip.component'; import { topicHierarchyColor } from '../../resolvers/utils/topic-colors'; @Component({ @@ -20,6 +21,7 @@ import { topicHierarchyColor } from '../../resolvers/utils/topic-colors'; MatTooltipModule, TopicChipComponent, CountryFlagComponent, + CareerStageChipComponent, ], templateUrl: './person-card.component.html', styleUrl: './person-card.component.scss', @@ -128,16 +130,6 @@ export class PersonCardComponent { return ''; }); - careerStage = computed(() => { - const stage = this.person().career_metrics?.career_stage; - - if (!stage || stage === 'unknown') { - return null; - } - - return stage; - }); - getRatingClass(rating: string | null | undefined): string { const r = (rating || '').toLowerCase(); if (r === 'sehr geeignet') return 'very-suitable'; @@ -174,23 +166,6 @@ export class PersonCardComponent { return id.replace('https://openalex.org/', '').trim().toUpperCase(); } - getCareerStageTooltip(careerStage: string): string { - const activeYears = this.person().career_metrics?.active_years ?? '-'; - - return [ - `Aktuell: ${careerStage.replace(' Researcher', '')}`, - `Aktive Publikationsjahre: ${activeYears}`, - '', - 'Einteilung:', - 'Early: 1-4 aktive Publikationsjahre', - 'Emerging: 5-9 aktive Publikationsjahre', - 'Established: 10-14 aktive Publikationsjahre', - 'Senior: ab 15 aktiven Publikationsjahren', - '', - 'Diese Einschätzung basiert ausschließlich auf OpenAlex-Publikationsdaten und ist kein offizieller akademischer Status.', - ].join('\n'); - } - toggleBookmark(): void { this.bookmarkToggle.emit(this.person()); }