addet topicFilterEnabled flag
This commit is contained in:
@@ -50,6 +50,7 @@ export class PublicationTableComponent implements OnInit {
|
||||
page = input.required<InseWorksV2ModelWorkPage>();
|
||||
authorFilterEnabled = input<boolean>(false);
|
||||
institutionFilterEnabled = input<boolean>(false);
|
||||
topicFilterEnabled = input<boolean>(false);
|
||||
|
||||
elements = computed(() => this.page().elements ?? []);
|
||||
|
||||
@@ -362,7 +363,7 @@ export class PublicationTableComponent implements OnInit {
|
||||
}
|
||||
|
||||
filterByTopic(topic: WorkTopic): void {
|
||||
if (!topic.id) return;
|
||||
if (!topic.id || !this.topicFilterEnabled()) return;
|
||||
const selectedTopicIds = this.selectedTopicIdsQueryParams();
|
||||
if (selectedTopicIds.includes(topic.id)) {
|
||||
this.router.navigate([], {
|
||||
@@ -414,7 +415,7 @@ export class PublicationTableComponent implements OnInit {
|
||||
}
|
||||
|
||||
getAuthorTooltipText(author: DehydratedAuthor): string {
|
||||
if (this.authorFilterEnabled()) {
|
||||
if (this.authorFilterEnabled() && author.id) {
|
||||
return `Nach Autor filtern: ${author.display_name}`;
|
||||
}
|
||||
return `Autor: ${author.display_name}`;
|
||||
|
||||
Reference in New Issue
Block a user