From 74c6b529d9c5067062b88345283e954da644346b Mon Sep 17 00:00:00 2001 From: argirok Date: Thu, 24 Mar 2022 12:57:33 +0200 Subject: [PATCH 1/3] update the values of fos/sdg vocabulary --- .../ISVocabularies.service.ts | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/utils/staticAutoComplete/ISVocabularies.service.ts b/utils/staticAutoComplete/ISVocabularies.service.ts index 613cf0fd..38dc3bcf 100644 --- a/utils/staticAutoComplete/ISVocabularies.service.ts +++ b/utils/staticAutoComplete/ISVocabularies.service.ts @@ -146,7 +146,7 @@ export class ISVocabulariesService { for (var i = 0; i < data.length; i++) { var value: AutoCompleteValue = new AutoCompleteValue(); value.id = data[i].id;//data[i].code; - value.label = data[i].label; + value.label = data[i].id; array.push(value); } return array; @@ -159,16 +159,20 @@ export class ISVocabulariesService { value.id = fos.id;//data[i].code; value.label = fos.label; array.push(value); - for (let fos2 of fos.children) { - let value: AutoCompleteValue = new AutoCompleteValue(); - value.id = fos2.id;//data[i].code; - value.label = fos2.label; - array.push(value); - for (let fos3 of fos2.children) { + if(fos.children) { + for (let fos2 of fos.children) { let value: AutoCompleteValue = new AutoCompleteValue(); - value.id = fos3.id;//data[i].code; - value.label = fos3.label; + value.id = fos2.id;//data[i].code; + value.label = fos2.label; array.push(value); + if(fos2.children) { + for (let fos3 of fos2.children) { + let value: AutoCompleteValue = new AutoCompleteValue(); + value.id = fos3.id;//data[i].code; + value.label = fos3.label; + array.push(value); + } + } } } } From 8002bce6f5e6a11c2f9cf96f65b7096e8250bae2 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Tue, 29 Mar 2022 16:55:04 +0300 Subject: [PATCH 2/3] [Library | Trunk]: resultLanding.component.html: Add links to advanced search foreach FOS and SDG subject. --- landingPages/result/resultLanding.component.html | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index 2d9612b6..b5f3614a 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -188,7 +188,11 @@
- {{resultLandingInfo.fos.join(', ')}} + + {{fos}} + , +
@@ -198,7 +202,11 @@
- {{resultLandingInfo.sdg.join(', ')}} + + {{sdg}} + , +
From 5b732fea7b33ce4f39fd158d836c93fecfbd8c17 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Tue, 29 Mar 2022 17:14:00 +0300 Subject: [PATCH 3/3] [Library | Trunk]: ISVocabularies.service.ts: Make url to vocabularies sdg.json and fos.json absolute with domain prefix. --- utils/staticAutoComplete/ISVocabularies.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/staticAutoComplete/ISVocabularies.service.ts b/utils/staticAutoComplete/ISVocabularies.service.ts index 38dc3bcf..664bffb0 100644 --- a/utils/staticAutoComplete/ISVocabularies.service.ts +++ b/utils/staticAutoComplete/ISVocabularies.service.ts @@ -125,14 +125,14 @@ export class ISVocabulariesService { getLocalVocabularyFromService(vocabularyName: string, properties: EnvProperties): Observable { if(vocabularyName == "sdg"){ - let url = "/assets/vocabulary/sdg.json"; + let url = properties.domain+"/assets/vocabulary/sdg.json"; return this.http.get((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url) //.map(res => res.json()) .pipe(map(res => res['sdg'])) .pipe(map(res => this.parseSDGs(res))) .pipe(catchError(this.handleError)); }else if( vocabularyName == "fos"){ - let url = "/assets/vocabulary/fos.json"; + let url = properties.domain+"/assets/vocabulary/fos.json"; return this.http.get((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url) //.map(res => res.json()) .pipe(map(res => res['fos']))