From c368ea8f5916a9d413349f30609ec8a41421f245 Mon Sep 17 00:00:00 2001 From: Roman Date: Tue, 21 Jul 2026 03:31:50 +0200 Subject: [PATCH] feat(work-classifications): add research profiles to publication details --- service/src/main/inse/authors/v2/service.py | 173 ++++++- service/src/main/inse/works/v2/service.py | 13 +- .../publication-detail.component.html | 2 + .../publication-detail.component.ts | 4 +- .../research-profile.component.html | 106 +++++ .../research-profile.component.scss | 185 ++++++++ .../research-profile.component.ts | 422 ++++++++++++++++++ .../pipes/work-primary-category.pipe.ts | 2 +- .../ui/topic-chip/topic-chip.component.html | 1 + .../ui/topic-chip/topic-chip.component.scss | 6 +- .../ui/topic-chip/topic-chip.component.ts | 18 + 11 files changed, 915 insertions(+), 17 deletions(-) create mode 100644 webapp/src/app/modules/publication-detail/research-profile/research-profile.component.html create mode 100644 webapp/src/app/modules/publication-detail/research-profile/research-profile.component.scss create mode 100644 webapp/src/app/modules/publication-detail/research-profile/research-profile.component.ts diff --git a/service/src/main/inse/authors/v2/service.py b/service/src/main/inse/authors/v2/service.py index 777daa39..e0347314 100644 --- a/service/src/main/inse/authors/v2/service.py +++ b/service/src/main/inse/authors/v2/service.py @@ -1,9 +1,11 @@ -from typing import Dict, List, Optional +from typing import Dict, List, Optional, Set from inse.authors.v2.model import AuthorPage from inse.integrations import elasticsearch +from inse.institutions.v2 import service as institution_service from inse.model import ESIndex from inse.models.openalex.author import Author +from inse.models.openalex.institution import Institution async def search_authors( @@ -128,18 +130,165 @@ async def author_currently_belongs_to_institution( bool: True if the author belongs to the institution in any of the specified years, False otherwise. """ - author = await get_author_by_id(raw_oa_author_id) - if not author: + if not current_years: return False - for affiliation in author.affiliations or []: - institution = affiliation.institution - if not institution: - continue + matching_author_ids = await _authors_belong_to_institution( + [raw_oa_author_id], + raw_oa_institution_id, + affiliation_year_filter={"terms": {"affiliations.years": current_years}}, + ) + return bool(matching_author_ids) - if institution.id == f"https://openalex.org/{raw_oa_institution_id}" and any( - year in (affiliation.years or []) for year in current_years - ): - return True - return False +def _prefix_openalex_id(raw_id: str) -> str: + if raw_id.startswith("https://openalex.org/"): + return raw_id + return f"https://openalex.org/{raw_id}" + + +async def _get_institution_identity( + raw_oa_institution_id: str, +) -> Optional[Institution]: + page = await institution_service.get_institutions_by_ids( + [_prefix_openalex_id(raw_oa_institution_id)] + ) + return page.elements[0] if page.elements else None + + +def _current_institution_cohort_query( + author_ids: List[str], + institution_id: str, + institution_ror: Optional[str], + institution_display_name: str, + affiliation_year_filter: Dict, +) -> Dict: + """Build the author cohort query used by work classification access.""" + + affiliation_identifiers = [ + {"term": {"affiliations.institution.id": institution_id}}, + ] + if institution_ror: + affiliation_identifiers.append( + {"term": {"affiliations.institution.ror": institution_ror}} + ) + affiliation_identifiers.append( + { + "match_phrase": { + "affiliations.institution.display_name": institution_display_name + } + } + ) + + recent_affiliation = { + "nested": { + "path": "affiliations", + "query": { + "bool": { + "filter": [ + { + "bool": { + "should": affiliation_identifiers, + "minimum_should_match": 1, + } + }, + affiliation_year_filter, + ] + } + }, + } + } + matching_last_known_institution = { + "nested": { + "path": "last_known_institutions", + "query": { + "match_phrase": { + "last_known_institutions.display_name": institution_display_name + } + }, + } + } + missing_last_known_institutions = { + "bool": { + "must_not": [ + { + "nested": { + "path": "last_known_institutions", + "query": { + "exists": { + "field": "last_known_institutions.display_name" + } + }, + } + } + ] + } + } + + return { + "bool": { + "filter": [ + { + "terms": { + "id": [_prefix_openalex_id(author_id) for author_id in author_ids] + } + }, + recent_affiliation, + { + "bool": { + "should": [ + matching_last_known_institution, + missing_last_known_institutions, + ], + "minimum_should_match": 1, + } + }, + ] + } + } + + +async def authors_currently_belong_to_institution( + raw_oa_author_ids: List[str], + raw_oa_institution_id: str, +) -> Set[str]: + """Return current cohort members using one query for all author IDs.""" + + return await _authors_belong_to_institution( + raw_oa_author_ids, + raw_oa_institution_id, + affiliation_year_filter={ + "range": {"affiliations.years": {"gte": 2025}} + }, + ) + + +async def _authors_belong_to_institution( + raw_oa_author_ids: List[str], + raw_oa_institution_id: str, + affiliation_year_filter: Dict, +) -> Set[str]: + """Return matching author IDs for the supplied affiliation-year filter.""" + + author_ids = list(dict.fromkeys(filter(None, raw_oa_author_ids))) + if not author_ids: + return set() + + institution = await _get_institution_identity(raw_oa_institution_id) + if not institution or not institution.display_name: + return set() + + authors = await search_authors( + page=0, + size=len(author_ids), + query=_current_institution_cohort_query( + author_ids=author_ids, + institution_id=institution.id + or _prefix_openalex_id(raw_oa_institution_id), + institution_ror=institution.ror, + institution_display_name=institution.display_name, + affiliation_year_filter=affiliation_year_filter, + ), + source=["id"], + ) + return {author.id for author in authors.elements if author.id} diff --git a/service/src/main/inse/works/v2/service.py b/service/src/main/inse/works/v2/service.py index b6626478..b7941d11 100644 --- a/service/src/main/inse/works/v2/service.py +++ b/service/src/main/inse/works/v2/service.py @@ -787,12 +787,21 @@ async def get_work_classification_by_work_id( return None work = await get_work( - raw_oa_work_id=raw_oa_work_id, source=["id", "authorships.institutions.id"] + raw_oa_work_id=raw_oa_work_id, source=["id", "authorships.author.id"] ) if not work: return None - if not _work_has_authorship_with_institution_id(work, raw_account_institution_id): + author_ids = list( + dict.fromkeys( + authorship.author.id + for authorship in work.authorships or [] + if authorship.author and authorship.author.id + ) + ) + if not await author_service.authors_currently_belong_to_institution( + author_ids, raw_account_institution_id + ): return None return await _get_work_classification_by_work_id( diff --git a/webapp/src/app/modules/publication-detail/publication-detail.component.html b/webapp/src/app/modules/publication-detail/publication-detail.component.html index a6ec5eff..b86f4990 100644 --- a/webapp/src/app/modules/publication-detail/publication-detail.component.html +++ b/webapp/src/app/modules/publication-detail/publication-detail.component.html @@ -218,6 +218,8 @@ } + + @if (publication.topics?.length) {
diff --git a/webapp/src/app/modules/publication-detail/publication-detail.component.ts b/webapp/src/app/modules/publication-detail/publication-detail.component.ts index bedfbb0e..6028f241 100644 --- a/webapp/src/app/modules/publication-detail/publication-detail.component.ts +++ b/webapp/src/app/modules/publication-detail/publication-detail.component.ts @@ -21,6 +21,7 @@ import { topicHierarchyColor } from '../../resolvers/utils/topic-colors'; import { WorkTypePipe } from '../../shared/pipes/work-type.pipe'; import { LanguageCodePipe } from '../../shared/pipes/language-code.pipe'; import { WorkPrimaryCategoryPipe } from '../../shared/pipes/work-primary-category.pipe'; +import { ResearchProfileComponent } from './research-profile/research-profile.component'; interface DetailLink { label: string; @@ -47,7 +48,8 @@ interface InstitutionDetail { TopicChipComponent, WorkTypePipe, LanguageCodePipe, - WorkPrimaryCategoryPipe + WorkPrimaryCategoryPipe, + ResearchProfileComponent, ], templateUrl: './publication-detail.component.html', styleUrl: './publication-detail.component.scss', diff --git a/webapp/src/app/modules/publication-detail/research-profile/research-profile.component.html b/webapp/src/app/modules/publication-detail/research-profile/research-profile.component.html new file mode 100644 index 00000000..54400cd9 --- /dev/null +++ b/webapp/src/app/modules/publication-detail/research-profile/research-profile.component.html @@ -0,0 +1,106 @@ +@if (details(); as profile) { + + + science +
+ Forschungsprofil + + Einordnung der Forschungsorientierung dieser Publikation + +
+
+ + +
+
+

+ Pasteur-Quadrant +

+
+
+
+
+ + + +
+

+ Orientierungsscore +

+
+
+ + @if (profile.primary_category; as category) { + + } +
+
+
+ + @if ( + profile.confidence === 'medium' || + profile.confidence === 'low' || + profile.insufficient_context + ) { + +
+ @if ( + profile.confidence === 'medium' || profile.confidence === 'low' + ) { + + {{ confidenceLabel(profile.confidence) }} + + info_outline + + + } + + @if (profile.insufficient_context) { + + Begrenzte Informationsgrundlage + + info_outline + + + } +
+ } +
+
+} diff --git a/webapp/src/app/modules/publication-detail/research-profile/research-profile.component.scss b/webapp/src/app/modules/publication-detail/research-profile/research-profile.component.scss new file mode 100644 index 00000000..7c362668 --- /dev/null +++ b/webapp/src/app/modules/publication-detail/research-profile/research-profile.component.scss @@ -0,0 +1,185 @@ +:host { + display: block; +} + +.research-profile-card { + border-color: var(--sg-border); + border-radius: var(--sg-radius-md); + background: var(--sg-surface); + box-shadow: var(--sg-shadow-sm); +} + +.profile-header { + align-items: flex-start; + padding: 22px 24px 12px; +} + +.profile-icon { + flex: 0 0 24px; + width: 24px; + height: 24px; + margin: 1px 12px 0 0; + color: var(--sg-text-muted); + font-size: 24px; + line-height: 24px; +} + +.profile-heading { + min-width: 0; +} + +mat-card-title { + font-size: 20px; + font-weight: 700; + line-height: 1.25; +} + +mat-card-subtitle { + margin-top: 3px; + line-height: 1.4; +} + +mat-card-content { + padding: 8px 24px 24px; +} + +.visualizations { + display: grid; + grid-template-columns: minmax(0, 1fr) 1px minmax(240px, 300px); + gap: 20px; + align-items: stretch; + width: 100%; +} + +.visualizations section { + display: flex; + flex-direction: column; + min-width: 0; +} + +.visualizations .visualization-title { + margin: 8px 0 4px; + color: var(--sg-text); + font: + 700 16px/1.3 'Open Sans', + Arial, + sans-serif !important; +} + +.quadrant-chart-frame { + position: relative; + width: 100%; + height: 320px; +} + +.quadrant-chart { + width: 100%; + height: 100%; +} + +.score-section { + align-items: center; + min-width: 0; + overflow: hidden; +} + +.score-section .visualization-title { + align-self: flex-start; +} + +.score-content { + display: flex; + flex: 1; + flex-direction: column; + align-items: center; + justify-content: center; + width: 100%; + padding-bottom: 22px; +} + +.score-chart { + width: 100%; + max-width: 280px; + height: 180px; +} + +.score-labels { + display: flex; + justify-content: space-between; + width: min(100%, 280px); + margin-top: -36px; + color: var(--sg-text-muted); + font-size: 11px; + font-weight: 600; +} + +.score-content app-topic-chip { + margin-top: 24px; + max-width: 100%; +} + +.notices-divider { + margin-top: 6px; +} + +.notices { + display: flex; + flex-wrap: wrap; + gap: 10px; + padding-top: 14px; +} + +.warning-note { + display: flex; + flex-direction: row; + align-items: center; + gap: 10px; + min-height: 42px; + padding: 9px 12px; + border-color: var(--warning-border); + border-radius: 12px; + background: var(--warning-background); + color: var(--warning-text); + box-shadow: none; + font-size: 13px; + line-height: 1.4; +} + +.warning-note .info-icon { + flex: 0 0 auto; + width: 16px; + height: 16px; + color: inherit; + font-size: 16px; + line-height: 16px; + opacity: 0.7; + cursor: default; + + &:hover { + opacity: 1; + } +} + +@media (max-width: 900px) { + .visualizations { + grid-template-columns: 1fr; + } + + .visualizations > mat-divider { + display: none; + } +} + +@media (max-width: 560px) { + .profile-header { + padding-inline: 16px; + } + + mat-card-content { + padding-inline: 16px; + } + + .quadrant-chart-frame { + height: 350px; + } +} diff --git a/webapp/src/app/modules/publication-detail/research-profile/research-profile.component.ts b/webapp/src/app/modules/publication-detail/research-profile/research-profile.component.ts new file mode 100644 index 00000000..1a74b684 --- /dev/null +++ b/webapp/src/app/modules/publication-detail/research-profile/research-profile.component.ts @@ -0,0 +1,422 @@ +import { + Component, + DestroyRef, + computed, + inject, + input, + signal, +} from '@angular/core'; +import { MatCardModule } from '@angular/material/card'; +import { MatDividerModule } from '@angular/material/divider'; +import { MatIconModule } from '@angular/material/icon'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { EChartsOption, EChartsType } from 'echarts'; +import { NgxEchartsDirective } from 'ngx-echarts'; +import { + WorkClassification, + WorkClassificationDetails, + WorkPrimaryCategory, +} from '../../../api'; +import { WorkPrimaryCategoryPipe } from '../../../shared/pipes/work-primary-category.pipe'; +import { + TopicChipComponent, + TopicChipPaletteColor, + topicChipColorTokens, +} from '../../../shared/ui/topic-chip/topic-chip.component'; + +type PasteurQuadrant = + | 'pure_basic' + | 'use_inspired_basic' + | 'pure_applied' + | 'not_applicable'; + +interface QuadrantDefinition { + key: PasteurQuadrant; + coordinate: [string, string]; + title: string; + description: string; + color?: 'blue' | 'purple' | 'green'; +} + +const QUADRANTS: readonly QuadrantDefinition[] = [ + { + key: 'pure_basic', + coordinate: ['Niedrig', 'Hoch'], + title: 'Bohr', + description: 'Reine\nGrundlagenforschung', + color: 'blue', + }, + { + key: 'use_inspired_basic', + coordinate: ['Hoch', 'Hoch'], + title: 'Pasteur', + description: 'Vom Nutzen inspirierte\nGrundlagenforschung', + color: 'purple', + }, + { + key: 'not_applicable', + coordinate: ['Niedrig', 'Niedrig'], + title: 'Weder noch', + description: 'Keine eindeutige\nForschungsorientierung', + }, + { + key: 'pure_applied', + coordinate: ['Hoch', 'Niedrig'], + title: 'Edison', + description: 'Angewandte Forschung\nund Entwicklung', + color: 'green', + }, +]; + +const BLUE_TOKENS = topicChipColorTokens('blue'); +const WARNING_TOKENS = topicChipColorTokens('orange'); +const LOW_CONFIDENCE_TOKENS = topicChipColorTokens('pink'); + +@Component({ + selector: 'app-research-profile', + standalone: true, + imports: [ + MatCardModule, + MatDividerModule, + MatIconModule, + MatTooltipModule, + NgxEchartsDirective, + TopicChipComponent, + WorkPrimaryCategoryPipe, + ], + templateUrl: './research-profile.component.html', + styleUrl: './research-profile.component.scss', +}) +export class ResearchProfileComponent { + private readonly destroyRef = inject(DestroyRef); + private readonly quadrantChartSize = signal({ width: 640, height: 320 }); + private quadrantResizeObserver?: ResizeObserver; + + workClassification = input.required(); + readonly warningTokens = WARNING_TOKENS; + + details = computed(() => { + const details = this.workClassification()?.classification; + if ( + !details || + details.primary_category === WorkPrimaryCategory.NonResearch + ) { + return null; + } + return details; + }); + + quadrantOptions = computed(() => + this.buildQuadrantOptions(this.details()?.pasteur_quadrant), + ); + + scoreOptions = computed(() => + this.buildScoreOptions(this.details()?.applied_orientation_score ?? 0), + ); + + primaryCategoryChipColor = computed(() => { + switch (this.details()?.primary_category) { + case WorkPrimaryCategory.BasicResearch: + return 'green'; + case WorkPrimaryCategory.AppliedResearch: + return 'pink'; + case WorkPrimaryCategory.ExperimentalDevelopment: + return 'purple'; + default: + return 'orange'; + } + }); + + confidenceLabel(confidence: string | null | undefined): string { + return confidence === 'low' ? 'Geringe Konfidenz' : 'Mittlere Konfidenz'; + } + + confidenceTooltip(confidence: string | null | undefined): string { + return confidence === 'low' + ? 'Das Klassifikationsergebnis wurde mit geringer Konfidenz bestimmt.' + : 'Das Klassifikationsergebnis wurde mit mittlerer Konfidenz bestimmt.'; + } + + confidenceWarningTokens(confidence: string | null | undefined) { + return confidence === 'low' ? LOW_CONFIDENCE_TOKENS : WARNING_TOKENS; + } + + onQuadrantChartInit(chart: EChartsType): void { + const updateSize = (width: number, height: number) => { + const current = this.quadrantChartSize(); + if (current.width !== width || current.height !== height) { + this.quadrantChartSize.set({ width, height }); + } + }; + + updateSize(chart.getWidth(), chart.getHeight()); + if (typeof ResizeObserver !== 'function') { + return; + } + + this.quadrantResizeObserver?.disconnect(); + this.quadrantResizeObserver = new ResizeObserver(([entry]) => { + if (entry) { + updateSize(entry.contentRect.width, entry.contentRect.height); + } + }); + this.quadrantResizeObserver.observe(chart.getDom()); + this.destroyRef.onDestroy(() => this.quadrantResizeObserver?.disconnect()); + } + + private buildQuadrantOptions( + activeQuadrant: string | null | undefined, + ): EChartsOption { + const textColor = this.cssColor('--sg-text-muted', BLUE_TOKENS.color); + const inactiveColor = this.cssColor( + '--sg-surface-muted', + BLUE_TOKENS.background, + ); + const neutralActiveColor = this.cssColor('--sg-border', BLUE_TOKENS.border); + const surfaceColor = this.cssColor('--sg-surface', 'white'); + const axisColor = this.cssColor('--sg-text', BLUE_TOKENS.color); + const { width: chartWidth, height: chartHeight } = this.quadrantChartSize(); + const axisLeft = 59; + const axisTop = 12; + const axisRight = 12; + const axisBottom = 39; + const horizontalY = chartHeight - axisBottom; + const horizontalTipX = chartWidth - axisRight; + return { + animation: false, + tooltip: { show: false }, + visualMap: { + type: 'piecewise', + show: false, + dimension: 2, + pieces: [ + { value: 0, color: inactiveColor }, + { value: 1, color: topicChipColorTokens('blue').activeBackground }, + { + value: 2, + color: topicChipColorTokens('purple').activeBackground, + }, + { value: 3, color: topicChipColorTokens('green').activeBackground }, + { value: 4, color: neutralActiveColor }, + ], + }, + matrix: { + left: 68, + right: 12, + top: 12, + bottom: 48, + x: { + show: false, + data: ['Niedrig', 'Hoch'], + dividerLineStyle: { width: 0, opacity: 0 }, + itemStyle: { borderWidth: 0, opacity: 0 }, + }, + y: { + show: false, + data: ['Hoch', 'Niedrig'], + dividerLineStyle: { width: 0, opacity: 0 }, + itemStyle: { borderWidth: 0, opacity: 0 }, + }, + body: { + itemStyle: { borderWidth: 0, opacity: 0 }, + label: { show: false }, + }, + corner: { + itemStyle: { borderWidth: 0, opacity: 0 }, + label: { show: false }, + }, + backgroundStyle: { borderWidth: 0, opacity: 0 }, + }, + graphic: [ + { + type: 'line', + silent: true, + shape: { + x1: axisLeft, + y1: horizontalY, + x2: horizontalTipX - 10, + y2: horizontalY, + }, + style: { stroke: axisColor, lineWidth: 2 }, + }, + { + type: 'polygon', + silent: true, + shape: { + points: [ + [horizontalTipX, horizontalY], + [horizontalTipX - 10, horizontalY - 6], + [horizontalTipX - 10, horizontalY + 6], + ], + }, + style: { fill: axisColor }, + }, + { + type: 'line', + silent: true, + shape: { + x1: axisLeft, + y1: horizontalY, + x2: axisLeft, + y2: axisTop + 10, + }, + style: { stroke: axisColor, lineWidth: 2 }, + }, + { + type: 'polygon', + silent: true, + shape: { + points: [ + [axisLeft, axisTop], + [axisLeft - 6, axisTop + 10], + [axisLeft + 6, axisTop + 10], + ], + }, + style: { fill: axisColor }, + }, + { + type: 'text', + x: axisLeft + (horizontalTipX - axisLeft) / 2, + y: chartHeight - 17, + style: { + text: 'Anwendungsorientierung', + fill: textColor, + fontSize: 12, + fontWeight: 600, + align: 'center', + verticalAlign: 'bottom', + }, + }, + { + type: 'text', + left: 38, + top: 'middle', + rotation: Math.PI / 2, + style: { + text: 'Erkenntnisorientierung', + fill: textColor, + fontSize: 12, + fontWeight: 600, + }, + }, + ], + series: [ + { + type: 'heatmap', + coordinateSystem: 'matrix', + silent: true, + emphasis: { disabled: true }, + data: QUADRANTS.map((quadrant) => { + const active = quadrant.key === activeQuadrant; + const activeTokens = quadrant.color + ? topicChipColorTokens(quadrant.color) + : BLUE_TOKENS; + const activeColorValue = quadrant.color + ? ({ blue: 1, purple: 2, green: 3 } as const)[quadrant.color] + : 4; + return { + value: [...quadrant.coordinate, active ? activeColorValue : 0], + itemStyle: { + borderColor: surfaceColor, + borderWidth: 4, + borderRadius: 10, + }, + label: { + show: true, + color: active ? activeTokens.color : textColor, + fontSize: 11, + lineHeight: 16, + fontWeight: 400, + formatter: [ + `{title|${quadrant.title}}`, + `{description|${quadrant.description}}`, + ...(active ? ['{active|✓ Diese Publikation}'] : []), + ].join('\n'), + rich: { + title: { + color: active ? activeTokens.color : textColor, + fontSize: 13, + fontWeight: 700, + lineHeight: 19, + }, + description: { + color: active ? activeTokens.color : textColor, + fontSize: 11, + fontWeight: 400, + lineHeight: 16, + }, + active: { + color: activeTokens.color, + backgroundColor: surfaceColor, + borderColor: activeTokens.color, + borderWidth: 1, + borderRadius: 11, + padding: [5, 10, 2, 10], + fontSize: 10, + fontWeight: 700, + lineHeight: 18, + align: 'center', + verticalAlign: 'middle', + }, + }, + }, + }; + }), + }, + ], + }; + } + + private buildScoreOptions(score: number): EChartsOption { + const boundedScore = Math.max(0, Math.min(100, score)); + const textColor = this.cssColor('--sg-text', BLUE_TOKENS.color); + return { + animation: false, + series: [ + { + type: 'gauge', + min: 0, + max: 100, + startAngle: 180, + endAngle: 0, + center: ['50%', '70%'], + radius: '92%', + progress: { + show: true, + width: 13, + itemStyle: { color: BLUE_TOKENS.color }, + }, + axisLine: { + lineStyle: { width: 13, color: [[1, BLUE_TOKENS.background]] }, + }, + pointer: { show: false }, + axisTick: { show: false }, + splitLine: { show: false }, + axisLabel: { show: false }, + anchor: { show: false }, + title: { show: false }, + detail: { + valueAnimation: false, + offsetCenter: [0, '-8%'], + color: textColor, + fontSize: 25, + fontWeight: 700, + formatter: '{value}', + }, + data: [{ value: boundedScore }], + }, + ], + }; + } + + private cssColor(variable: string, fallback: string): string { + if (typeof getComputedStyle !== 'function') { + return fallback; + } + return ( + getComputedStyle(document.documentElement) + .getPropertyValue(variable) + .trim() || fallback + ); + } +} diff --git a/webapp/src/app/shared/pipes/work-primary-category.pipe.ts b/webapp/src/app/shared/pipes/work-primary-category.pipe.ts index 7a0f701a..b77d0c8f 100644 --- a/webapp/src/app/shared/pipes/work-primary-category.pipe.ts +++ b/webapp/src/app/shared/pipes/work-primary-category.pipe.ts @@ -25,7 +25,7 @@ export class WorkPrimaryCategoryPipe implements PipeTransform { transform( value: WorkPrimaryCategory | null | undefined, ...args: unknown[] - ): unknown { + ): string { return transformWorkPrimaryCategory(value); } } diff --git a/webapp/src/app/shared/ui/topic-chip/topic-chip.component.html b/webapp/src/app/shared/ui/topic-chip/topic-chip.component.html index 6babd4cc..42275a92 100644 --- a/webapp/src/app/shared/ui/topic-chip/topic-chip.component.html +++ b/webapp/src/app/shared/ui/topic-chip/topic-chip.component.html @@ -1,6 +1,7 @@