From de1ff24e35d8185b8273cee7683bfe7e35d4bdb5 Mon Sep 17 00:00:00 2001
From: Kazgatari <56477241+Kazgatari@users.noreply.github.com>
Date: Wed, 3 Jun 2026 22:52:56 +0200
Subject: [PATCH] changes to conflict
---
.../person-list/person-list.component.html | 2 +-
.../person-list/person-list.component.ts | 19 +++++++++++++------
.../app/shared/services/persons.service.ts | 10 +++++-----
3 files changed, 19 insertions(+), 12 deletions(-)
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 4da97b66..9654b752 100644
--- a/webapp/src/app/modules/person-list/person-list.component.html
+++ b/webapp/src/app/modules/person-list/person-list.component.html
@@ -33,7 +33,7 @@
>
-
{{ person.name }}
+
{{ person.display_name }}
{{ institution(person) }}
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 0395f48a..69a2a5ee 100644
--- a/webapp/src/app/modules/person-list/person-list.component.ts
+++ b/webapp/src/app/modules/person-list/person-list.component.ts
@@ -12,7 +12,7 @@ import { MatPaginatorModule, PageEvent } from '@angular/material/paginator';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { MatSnackBar, MatSnackBarModule } from '@angular/material/snack-bar';
-import { Person } from '../../api';
+import { Author, WorkTopic } from '../../api';
import { PaginationService } from '../../shared/services/pagination.service';
import { PersonsService } from '../../shared/services/persons.service';
import { createLoadError } from '../../shared/utils/errorHandler';
@@ -42,7 +42,7 @@ export class PersonListComponent implements OnInit, OnDestroy {
public paginationService = inject(PaginationService);
- persons: Person[] = [];
+ persons: Author[] = [];
loading = false;
total = 0;
pageIndex = 0;
@@ -88,12 +88,19 @@ export class PersonListComponent implements OnInit, OnDestroy {
this.load(event.pageIndex, event.pageSize);
}
- institution(person: Person): string {
- return person.affiliations?.[0]?.institution || 'Keine Institution angegeben';
+ institution(person: Author): string {
+ return (
+ person.last_known_institutions?.[0]?.display_name ??
+ person.affiliations?.[0]?.institution?.display_name ??
+ 'Keine Institution angegeben'
+ );
}
- topics(person: Person): string[] {
- return (person.topics ?? []).slice(0, 3);
+ topics(person: Author): string[] {
+ return (person.topics ?? [])
+ .map((topic: WorkTopic) => topic.display_name ?? '')
+ .filter((topic): topic is string => Boolean(topic))
+ .slice(0, 3);
}
resultRange(): string {
diff --git a/webapp/src/app/shared/services/persons.service.ts b/webapp/src/app/shared/services/persons.service.ts
index d35dc12d..feb5490b 100644
--- a/webapp/src/app/shared/services/persons.service.ts
+++ b/webapp/src/app/shared/services/persons.service.ts
@@ -2,11 +2,11 @@ import { HttpClient, HttpParams } from '@angular/common/http';
import { Inject, Injectable, Optional } from '@angular/core';
import { Observable } from 'rxjs';
-import { Person } from '../../api';
+import { Author } from '../../api';
import { BASE_PATH } from '../../api/variables';
-export interface PersonPage {
- elements?: Person[];
+export interface AuthorPage {
+ elements?: Author[];
offset?: number;
total?: number;
size?: number;
@@ -29,7 +29,7 @@ export class PersonsService {
pageOffset: number = 0,
pageSize: number = 24,
query?: string,
- ): Observable
{
+ ): Observable {
let params = new HttpParams()
.set('pageOffset', pageOffset)
.set('pageSize', pageSize);
@@ -38,6 +38,6 @@ export class PersonsService {
params = params.set('query', query.trim());
}
- return this.http.get(`${this.basePath}/persons`, { params });
+ return this.http.get(`${this.basePath}/persons`, { params });
}
}