From 4b3e805d311396db3f4ac505fb6b0c93455c8f50 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Tue, 16 Apr 2024 11:36:45 +0300 Subject: [PATCH 1/6] [develop | DONE | REVERTED]: searchProjects.service.ts: Revert parsing funder name if funder shortname is not available. --- services/searchProjects.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/searchProjects.service.ts b/services/searchProjects.service.ts index 6d30b06c..e9c48eaa 100644 --- a/services/searchProjects.service.ts +++ b/services/searchProjects.service.ts @@ -230,7 +230,7 @@ export class SearchProjectsService { for(let z=0; z Date: Tue, 16 Apr 2024 11:47:12 +0300 Subject: [PATCH 2/6] [develop | DONE | CHANGED]: In search projects results, show funder name by default, and if not available, show funder short name. 1. searchResult.ts: Added field funderName: string; in class SearchResult. 2. result-preview.ts: Added field funderName: string; in class ResultPreview & in method "searchResultConvert()" set resultPreview.funderName = result.funderName; 3. searchProjects.service.ts: Added parsing of funderName. 4. result-preview.component.html: Show funderName and if not available, show funderShortname. 5. entity-metadata.component.ts: Added check for funders display. --- landingPages/landing-utils/entity-metadata.component.ts | 2 +- services/searchProjects.service.ts | 1 + utils/entities/searchResult.ts | 1 + utils/result-preview/result-preview.component.html | 8 ++++---- utils/result-preview/result-preview.ts | 2 ++ 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/landingPages/landing-utils/entity-metadata.component.ts b/landingPages/landing-utils/entity-metadata.component.ts index 0378f127..4060446c 100644 --- a/landingPages/landing-utils/entity-metadata.component.ts +++ b/landingPages/landing-utils/entity-metadata.component.ts @@ -295,7 +295,7 @@ export class EntityMetadataComponent { return this.projects.map(project => { let value = project.funderShortname ? project.funderShortname : project.funderName; if (project.acronym || project.title) { - value = value + ' | ' + (project.acronym ? project.acronym : + value = (value ? value + ' | ' : '') + (project.acronym ? project.acronym : (project.title.length > 25 ? (project.title.slice(0, 25) + '...'): project.title)); } // if(project.code) { diff --git a/services/searchProjects.service.ts b/services/searchProjects.service.ts index e9c48eaa..e9e704b9 100644 --- a/services/searchProjects.service.ts +++ b/services/searchProjects.service.ts @@ -231,6 +231,7 @@ export class SearchProjectsService { let fundingData = Array.isArray(resData['fundingtree']) ? resData['fundingtree'][z] : resData['fundingtree']; if(fundingData.hasOwnProperty("funder")) { result['funderShortname'] = fundingData['funder'].shortname; + result['funderName'] = fundingData['funder'].name; result['funderId'] = fundingData['funder'].id; result['jurisdiction'] = (fundingData['funder']['id']['jurisdiction'] )?fundingData['funder']['id']['jurisdiction']:""; diff --git a/utils/entities/searchResult.ts b/utils/entities/searchResult.ts index e59e56f7..ba762833 100644 --- a/utils/entities/searchResult.ts +++ b/utils/entities/searchResult.ts @@ -48,6 +48,7 @@ export class SearchResult { acronym: string; code: string; // callIdentifier?: string; // currently not parsed + funderName: string; funderShortname: string; budget?: string; contribution?: string; diff --git a/utils/result-preview/result-preview.component.html b/utils/result-preview/result-preview.component.html index 046eb7c0..70fa4f30 100644 --- a/utils/result-preview/result-preview.component.html +++ b/utils/result-preview/result-preview.component.html @@ -95,12 +95,12 @@
-
- +
+ Funder: - {{result.funderShortname}} + {{result.funderName ? result.funderName : result.funderShortname}} - + {{openaireEntities.PROJECT}} Code: {{result.code}} diff --git a/utils/result-preview/result-preview.ts b/utils/result-preview/result-preview.ts index 542e34f2..c8a38e1d 100644 --- a/utils/result-preview/result-preview.ts +++ b/utils/result-preview/result-preview.ts @@ -123,6 +123,7 @@ export class ResultPreview { acronym: string; code: string; // callIdentifier: string; // currently not parsed + funderName: string; funderShortname: string; budget: string; contribution: string; @@ -188,6 +189,7 @@ export class ResultPreview { resultPreview.acronym = result.acronym; resultPreview.code = result.code; // resultPreview.callIdentifier = result.callIdentifier; // currently not parsed + resultPreview.funderName = result.funderName; resultPreview.funderShortname = result.funderShortname; resultPreview.budget = result.budget; resultPreview.contribution = result.contribution; From b7293411993fc37a422483b092d7cb3cf5ce5efd Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Tue, 16 Apr 2024 12:21:02 +0300 Subject: [PATCH 3/6] [develop]: Fix visibility condition in Indicaotrs page --- monitor-admin/topic/indicators.component.html | 16 ++++++---------- monitor-admin/topic/topic.component.html | 10 +++++----- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/monitor-admin/topic/indicators.component.html b/monitor-admin/topic/indicators.component.html index 9c7f6ca9..0b5b1aa1 100644 --- a/monitor-admin/topic/indicators.component.html +++ b/monitor-admin/topic/indicators.component.html @@ -33,13 +33,11 @@ - - + + -