diff --git a/webapp/src/app/modules/compare-authors/compare-authors.component.html b/webapp/src/app/modules/compare-authors/compare-authors.component.html index 1ddf076c..b14155e1 100644 --- a/webapp/src/app/modules/compare-authors/compare-authors.component.html +++ b/webapp/src/app/modules/compare-authors/compare-authors.component.html @@ -168,7 +168,16 @@ @for (row of rows; track row.label) { - {{ row.label }} + + {{ row.label }} + @if (row.nameMatched) { + + } + {{ row.hint }} @if (row.kind === 'group') { @@ -222,4 +231,12 @@ + @if (hasNameMatchedRow(rows)) { +

+ star + Diese Kennzahlen basieren auf einem automatischen Namensabgleich mit + externen Quellen, wodurch es in Einzelfällen zu Fehlzuordnungen kommen + kann. +

+ } diff --git a/webapp/src/app/modules/compare-authors/compare-authors.component.scss b/webapp/src/app/modules/compare-authors/compare-authors.component.scss index f34f907b..64595afd 100644 --- a/webapp/src/app/modules/compare-authors/compare-authors.component.scss +++ b/webapp/src/app/modules/compare-authors/compare-authors.component.scss @@ -122,7 +122,10 @@ app-chip mat-icon { } .metric-label { - display: block; + display: flex; + align-items: center; + justify-content: center; + gap: 4px; font-weight: 600; color: var(--sg-text); } @@ -135,6 +138,31 @@ app-chip mat-icon { color: var(--sg-text-soft); } +.icon-small { + font-size: 14px; + width: 14px; + height: 14px; + vertical-align: text-bottom; +} + +.name-match-star { + color: var(--sg-warning, #b8860b); +} + +.name-match-note { + display: flex; + align-items: center; + gap: 6px; + margin: 10px 0 0; + font-size: 12px; + color: var(--sg-text-muted); + + mat-icon { + flex: 0 0 auto; + color: var(--sg-warning, #b8860b); + } +} + .value-cell { text-align: center; font-variant-numeric: tabular-nums; diff --git a/webapp/src/app/modules/compare-authors/compare-authors.component.ts b/webapp/src/app/modules/compare-authors/compare-authors.component.ts index d1a38945..cafdc91a 100644 --- a/webapp/src/app/modules/compare-authors/compare-authors.component.ts +++ b/webapp/src/app/modules/compare-authors/compare-authors.component.ts @@ -98,6 +98,7 @@ interface MetricRow { cells: MetricCell[]; segments: GroupSegment[]; groupCells: GroupCell[]; + nameMatched: boolean; } interface RowDef { @@ -105,6 +106,7 @@ interface RowDef { hint: string; select: (a: AuthorSummary) => number | null; decimals?: boolean; + nameMatched?: boolean; } interface SegmentDef { @@ -385,15 +387,18 @@ export class CompareAuthorsComponent implements OnInit { label: 'Unternehmensgründungen', hint: 'Handelsregister-Verbindungen über den Namen', select: (a) => a.companies, + nameMatched: true, }, { label: 'News-Artikel', hint: 'Nachrichtenartikel, die die Person namentlich nennen', select: (a) => a.news, + nameMatched: true, }, { label: 'Patente', hint: 'Der Person zugeordnete Patente', + nameMatched: true, select: (a) => a.patents, }, ]), @@ -707,6 +712,7 @@ export class CompareAuthorsComponent implements OnInit { })), segments: [], groupCells: [], + nameMatched: def.nameMatched ?? false, }; }); } @@ -731,9 +737,14 @@ export class CompareAuthorsComponent implements OnInit { groupCells: this.summary().map((a) => ({ values: segs.map((s) => s.select(a)), })), + nameMatched: false, }; } + hasNameMatchedRow(rows: MetricRow[]): boolean { + return rows.some((row) => row.nameMatched); + } + ngOnInit(): void { // everything is read from the URL so a shared link lands on the same view const rawAuthors = this.route.snapshot.queryParamMap.get('authors') ?? ''; diff --git a/webapp/src/app/shared/ui/weights-sliders/weights-sliders.component.scss b/webapp/src/app/shared/ui/weights-sliders/weights-sliders.component.scss index 236e4ed4..bb6de978 100644 --- a/webapp/src/app/shared/ui/weights-sliders/weights-sliders.component.scss +++ b/webapp/src/app/shared/ui/weights-sliders/weights-sliders.component.scss @@ -117,7 +117,7 @@ $touch-target: 44px; ============================================================ */ .name-match-note { display: flex; - align-items: flex-start; + align-items: center; gap: 0.3rem; margin: 0.3rem 0 0; padding: 0.2rem 0.3rem;