diff --git a/service/src/main/inse/works/logic.py b/service/src/main/inse/works/logic.py index 3b1f61fe..40e2c9f1 100644 --- a/service/src/main/inse/works/logic.py +++ b/service/src/main/inse/works/logic.py @@ -391,6 +391,19 @@ async def get_topics_by_time_by_author( years[year]["primary_topics"][primary_topic_name]["count"] += 1 + topic_ids = set() + + for year_data in years.values(): + for topic in year_data["topics"].values(): + if topic["id"]: + topic_ids.add(topic["id"]) + + for topic in year_data["primary_topics"].values(): + if topic["id"]: + topic_ids.add(topic["id"]) + + topic_details = _get_topic_details(list(topic_ids)) + elements = [] for year in sorted(years.keys()): @@ -400,11 +413,14 @@ async def get_topics_by_time_by_author( topics = [] for topic in topic_items[:max_topics_per_year]: + info = topic_details.get(topic["id"], {}) + topics.append( TopicCount( id=topic["id"], name=topic["name"], count=topic["count"], + description=info.get("description"), ) ) @@ -414,11 +430,14 @@ async def get_topics_by_time_by_author( primary_topics = [] for topic in primary_topic_items[:max_topics_per_year]: + info = topic_details.get(topic["id"], {}) + primary_topics.append( TopicCount( id=topic["id"], name=topic["name"], count=topic["count"], + description=info.get("description"), ) ) diff --git a/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.html b/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.html index 39f4d7e6..5376284b 100644 --- a/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.html +++ b/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.html @@ -49,10 +49,17 @@ (click)="setTimelineViewMode('compact')"> Kompakt + +