From 12914208cdffd5f0de0ffeb4c6c9db5360d8dff1 Mon Sep 17 00:00:00 2001 From: genja Date: Sat, 15 Aug 2026 22:18:52 +0200 Subject: [PATCH] regenerated dfg Project model + added keyword to topic id computed property to search results service --- webapp/src/app/api/model/dfgProjectSummary.ts | 10 ++++++++-- .../search-results/search-results-state.service.ts | 12 +++++++++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/webapp/src/app/api/model/dfgProjectSummary.ts b/webapp/src/app/api/model/dfgProjectSummary.ts index add7f54c..5a04cdb7 100644 --- a/webapp/src/app/api/model/dfgProjectSummary.ts +++ b/webapp/src/app/api/model/dfgProjectSummary.ts @@ -20,8 +20,14 @@ export interface DfgProjectSummary { */ id: string; link?: string | null; - title?: string | null; - professional_classification?: string | null; + title_de?: string | null; + title_en?: string | null; + /** + * The subject classifications of the DFG project. + */ + subject_classifications_raw?: Array; + abstract_de?: string | null; + abstract_en?: string | null; funding_start?: string | null; funding_end?: string | null; /** diff --git a/webapp/src/app/modules/keywords-search/search-results/search-results-state.service.ts b/webapp/src/app/modules/keywords-search/search-results/search-results-state.service.ts index 3791c58c..179a17c6 100644 --- a/webapp/src/app/modules/keywords-search/search-results/search-results-state.service.ts +++ b/webapp/src/app/modules/keywords-search/search-results/search-results-state.service.ts @@ -127,7 +127,17 @@ export class SearchResultsStateService { }); readonly keywordsList = this.keywords; - + readonly keywordTopicMap = computed(() => { + const map = new Map(); + for (const entry of this.selectedKeywordEntries()) { + const keyword = entry.llm_keyword?.keyword?.trim().toLowerCase(); + const topic = entry.topic_mapping?.topic; + if (keyword && topic) { + map.set(keyword, topic); + } + } + return map; + }); // Parallel topic-name list for trend dashboard strategies. Entries // without a resolvable keyword are skipped when building the lookup map // so they can never collide on an `undefined` key and shadow a real one.