();
getInitials(name: string | null | undefined): string {
if (!name) return 'U';
@@ -41,13 +43,22 @@ export class PersonCardComponent {
);
}
- topics(person: CustomAuthor): string[] {
+ topics(person: CustomAuthor): WorkTopic[] {
return (person.topics ?? [])
- .map((t) => t.display_name)
- .filter((name): name is string => !!name)
+ .filter((t): t is WorkTopic => !!t.display_name)
.slice(0, 3);
}
+ getTopicTooltip(topic: WorkTopic): string {
+ const parts: string[] = [];
+ if (topic.domain?.display_name) parts.push(topic.domain.display_name);
+ if (topic.field?.display_name) parts.push(topic.field.display_name);
+ if (topic.subfield?.display_name) parts.push(topic.subfield.display_name);
+
+ if (parts.length === 0) return topic.display_name || '';
+ return parts.join(' - ');
+ }
+
getDistinguishingId(person: CustomAuthor): string {
if (!person) return '';
if (person.orcid) {
diff --git a/webapp/src/app/modules/person-list/person-list.component.html b/webapp/src/app/modules/person-list/person-list.component.html
index 5edf266b..345994e1 100644
--- a/webapp/src/app/modules/person-list/person-list.component.html
+++ b/webapp/src/app/modules/person-list/person-list.component.html
@@ -77,7 +77,8 @@
[person]="person"
[isBookmarked]="isBookmarked(person)"
(bookmarkToggle)="toggleBookmark($event)"
- (topicClick)="onCardTopicClick($event)">
+ (topicClick)="onCardTopicClick($event)"
+ (institutionClick)="onCardInstitutionClick($event)">
}
diff --git a/webapp/src/app/modules/person-list/person-list.component.ts b/webapp/src/app/modules/person-list/person-list.component.ts
index b731e302..555197bb 100644
--- a/webapp/src/app/modules/person-list/person-list.component.ts
+++ b/webapp/src/app/modules/person-list/person-list.component.ts
@@ -21,6 +21,7 @@ import { SharedStateService } from '../../shared/services/shared-state.service';
import { PaginationService } from '../../shared/services/pagination.service';
import { finalize } from 'rxjs';
import { MatSnackBar } from '@angular/material/snack-bar';
+import { createLoadError } from '../../shared/utils/errorHandler';
@Component({
selector: 'app-person-list',
@@ -187,9 +188,21 @@ export class PersonListComponent {
this.persons = (response.results ?? []) as CustomAuthor[];
this.total = response.meta?.count ?? 0;
},
- error: (err) => {
- console.error('Error loading persons:', err);
- },
+ error: createLoadError(
+ this.snackBar,
+ () =>
+ this.load(
+ query,
+ page,
+ pageSize,
+ topics,
+ institutionName,
+ yearFilterEnabled,
+ filterMode,
+ filterYear,
+ ),
+ 'Beim Laden der Personen ist ein Fehler aufgetreten',
+ ),
});
}
@@ -339,6 +352,11 @@ export class PersonListComponent {
this.topicSearchControl.setValue(topic);
}
+ onCardInstitutionClick(institutionName: string): void {
+ this.institutionControl.setValue(institutionName);
+ this.applySidebarFilters();
+ }
+
isBookmarked(person: CustomAuthor): boolean {
return !!person.id && this.bookmarkedIds.has(person.id);
}
From 4701f294d08d178a76c7fd5b42fc44e1e4f3ecd0 Mon Sep 17 00:00:00 2001
From: Kazgatari <56477241+Kazgatari@users.noreply.github.com>
Date: Mon, 8 Jun 2026 12:43:29 +0200
Subject: [PATCH 3/4] removed old Institution, changes default sort to
Publications
---
.../app/modules/person-card/person-card.component.html | 8 --------
.../src/app/modules/person-list/person-list.component.ts | 4 ++--
2 files changed, 2 insertions(+), 10 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 fb162777..31fd3885 100644
--- a/webapp/src/app/modules/person-card/person-card.component.html
+++ b/webapp/src/app/modules/person-card/person-card.component.html
@@ -17,14 +17,6 @@
{{ person.display_name }}
-
- {{ (institution(person)?.display_name ?? '') | truncate: 30 }}
- @if (institution(person)?.country_code) {
-
- {{institution(person)?.country_code?.toUpperCase()}}
- }
-
{{ getDistinguishingId(person) }}
Publikationen: {{ person.works_count }} ·
diff --git a/webapp/src/app/modules/person-list/person-list.component.ts b/webapp/src/app/modules/person-list/person-list.component.ts
index 555197bb..fef6aab5 100644
--- a/webapp/src/app/modules/person-list/person-list.component.ts
+++ b/webapp/src/app/modules/person-list/person-list.component.ts
@@ -66,7 +66,7 @@ export class PersonListComponent {
selectedTopics = new Set();
// Forms
- sortControl = new FormControl('relevance', { nonNullable: true });
+ sortControl = new FormControl('works', { nonNullable: true });
topicSearchControl = new FormControl('', { nonNullable: true });
institutionControl = new FormControl('', { nonNullable: true });
yearFilterEnabledControl = new FormControl(false, { nonNullable: true });
@@ -246,7 +246,7 @@ export class PersonListComponent {
}> {
const list: Array<{ category: string; value: string; label: string }> = [];
this.selectedTopics.forEach((t) => {
- list.push({ category: 'topic', value: t, label: t });
+ list.push({ category: 'topic', value: t, label: `Thema: ${t}` });
});
if (this.institutionControl.value) {
let label = `Institution: ${this.institutionControl.value}`;
From 351f43aca667e338bb0275ae10fe8842dd521050 Mon Sep 17 00:00:00 2001
From: Kazgatari <56477241+Kazgatari@users.noreply.github.com>
Date: Mon, 8 Jun 2026 14:39:52 +0200
Subject: [PATCH 4/4] Changed icon to match the one in Network. Added
autocomplete to institution
---
.../person-card/person-card.component.html | 2 +-
.../person-list/person-list.component.html | 39 +++---
.../person-list/person-list.component.scss | 7 ++
.../person-list/person-list.component.ts | 115 ++++++++++++++----
.../person-publications.component.ts | 2 +-
5 files changed, 126 insertions(+), 39 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 31fd3885..7c89ad6e 100644
--- a/webapp/src/app/modules/person-card/person-card.component.html
+++ b/webapp/src/app/modules/person-card/person-card.component.html
@@ -31,7 +31,7 @@
business
+ style="font-size: 12px; width: 12px; height: 12px; margin-right: 4px; vertical-align: middle;">apartment
{{ (inst.display_name ?? '') | truncate: 30 }}
@if (inst.country_code) {
{{ total | number: "1.0-0" }} Personen gefunden
- Sortiert nach Publikationen und Zitierungen
+ Sortiert nach Publikationen und Zitierungen-->
@if (loading) {
@@ -73,11 +73,8 @@
} @else if (sortedPersons.length) {
@for (person of sortedPersons; track person.id) {
-
}
@@ -91,12 +88,8 @@
}
-
@@ -132,11 +125,25 @@
Institution
-
business
-
+
apartment
+
+
+ @for (institution of institutionOptions(); track institution.id) {
+
+ {{ institution.display_name }}
+ @if (institution.hint) {
+ {{ institution.hint }}
+ }
+
+ }
+ @if (!institutionLookupLoading() && institutionOptions().length === 0 && institutionControl.value &&
+ institutionControl.value.trim().length >= 2) {
+ Keine Institution gefunden
+ }
+
@if (institutionControl.value) {
-