From c2312e297e32df2925e60641d755494c900abdc5 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Thu, 11 Jan 2024 12:49:57 +0200 Subject: [PATCH 1/8] [develop | DONE | FIXED] remove b2note (annotation component) and all its references --- .../annotation/annotation.component.ts | 225 ------------------ landingPages/annotation/annotation.css | 41 ---- landingPages/annotation/annotation.module.ts | 13 - landingPages/annotation/annotation.service.ts | 95 -------- .../result/resultLanding.component.ts | 1 - landingPages/result/resultLanding.module.ts | 3 +- 6 files changed, 1 insertion(+), 377 deletions(-) delete mode 100644 landingPages/annotation/annotation.component.ts delete mode 100644 landingPages/annotation/annotation.css delete mode 100644 landingPages/annotation/annotation.module.ts delete mode 100644 landingPages/annotation/annotation.service.ts diff --git a/landingPages/annotation/annotation.component.ts b/landingPages/annotation/annotation.component.ts deleted file mode 100644 index 90a26f9c..00000000 --- a/landingPages/annotation/annotation.component.ts +++ /dev/null @@ -1,225 +0,0 @@ -import { - Component, - ElementRef, - EventEmitter, - HostListener, - Input, - OnDestroy, - OnInit, - Output, - ViewChild -} from "@angular/core"; -import {Annotation, AnnotationService} from "./annotation.service"; -import {ResultLandingInfo} from "../../utils/entities/resultLandingInfo"; -import {EnvProperties} from "../../utils/properties/env-properties"; -import {properties} from "../../../../environments/environment"; -import {UserManagementService} from "../../services/user-management.service"; -import {COOKIE, Session, User} from "../../login/utils/helper.class"; -import {Subscriber} from "rxjs"; - -@Component({ - selector: 'b2note', - template: ` -
Annotations
-
-
- - - - -
- - -
- -
-
-
-
- - -
-
`, - styleUrls: ['annotation.css'] -}) -export class AnnotationComponent implements OnInit, OnDestroy { - - @Input() - public landingInfo: ResultLandingInfo = null; - @Input() - public id: string = null; - public properties: EnvProperties = properties; - public url: string = null; - public pid: string = null; - public keywords: string[] = []; - public visible: boolean = false; - public annotations: Annotation[] = []; - public annotationSize: number = 10; - public isLoggedIn: boolean = Session.isLoggedIn(); - public visibleAnnotations: number; - public loading: boolean = false; - public submitted: boolean = false; - @Output() - public pidEmitter: EventEmitter = new EventEmitter(); - @ViewChild('iframe') iframe: ElementRef; - @ViewChild('form') form: ElementRef; - private subscriptions: any[] = []; - - constructor(private annotationService: AnnotationService) { - } - - @HostListener('window:message', ['$event']) - public onChange(event) { - if (this.properties.b2noteAPIURL.includes(event.origin)) { - if (event.data === "B2NOTE loaded") { - let token = COOKIE.getCookie('AccessToken'); - this.iframe.nativeElement.contentWindow.postMessage({token: token}, this.properties.b2noteAPIURL); - } else { - this.getAnnotations(); - } - } - } - - ngOnInit(): void { - this.visibleAnnotations = this.annotationSize; - if (typeof window !== "undefined") { - let id = this.id; - this.url = window.location.href; - if (this.landingInfo.deletedByInferenceIds) { - id = this.landingInfo.deletedByInferenceIds[0]; - this.url = this.url.replace(this.id, id); - } - if (this.landingInfo.identifiers && this.landingInfo.identifiers.size > 0) { - if (this.landingInfo.identifiers.get('doi')) { - this.pid = this.landingInfo.identifiers.get('doi')[0]; - } else { - const key: string = this.landingInfo.identifiers.keys().next().value; - if (key) { - this.pid = this.landingInfo.identifiers.get(key)[0]; - } - } - } - if (this.pid) { - this.getAnnotations(); - } - this.pidEmitter.emit(this.pid); - } - } - - public get enabled(): boolean { - return this.pid && this.isLoggedIn; - } - - private clearSubscriptions() { - this.subscriptions.forEach(subscription => { - if (subscription instanceof Subscriber) { - subscription.unsubscribe(); - } - }); - this.subscriptions = []; - } - - private getAnnotations() { - if (!this.annotations || this.annotations.length === 0) { - this.loading = true; - } - this.subscriptions.push(this.annotationService.getAllAnnotations(this.pid).subscribe(annotations => { - this.annotations.forEach((annotation, index) => { - if (!annotations.find(element => element.type === annotation.type && element.text === annotation.text)) { - this.annotations.splice(index, 1); - } - }); - annotations.forEach(annotation => { - if (!this.annotations.find(element => element.type === annotation.type && element.text === annotation.text)) { - annotation.targetSize = 3; - this.annotationService.getAnnotationTargets(annotation.text, annotation.type).subscribe(targets => { - annotation.targets = targets.filter(target => target.id !== this.pid); - }); - this.annotations.push(annotation); - } - }); - this.annotations = this.sort(this.annotations); - this.loading = false; - }, error => { - this.loading = false; - })); - } - - public sort(annotations: Annotation[]): Annotation[] { - return annotations.sort((a, b) => { - if (a.type === b.type) { - return 1; - } else if (a.type === 'semantic') { - return -1; - } else if (b.type === 'semantic') { - return 1; - } else if (a.type === 'keyword') { - return -1; - } else if (b.type === 'keyword') { - return 1; - } - }); - } - - public searchPid(pid: string): { [k: string]: any; } { - return { - pid: pid - } - } - - ngOnDestroy() { - this.clearSubscriptions(); - } - - toggleAnnotation(event) { - if (this.visible) { - event.preventDefault(); - } else if(!this.submitted) { - this.form.nativeElement.submit(); - this.submitted = true; - } - this.visible = !this.visible; - } - - open(i: number) { - this.annotations.forEach((annotation, index) => { - if (index != i) { - annotation.targetSize = 3; - } else { - annotation.targetSize = annotation.targets.length - } - }); - } -} diff --git a/landingPages/annotation/annotation.css b/landingPages/annotation/annotation.css deleted file mode 100644 index 4a2961d3..00000000 --- a/landingPages/annotation/annotation.css +++ /dev/null @@ -1,41 +0,0 @@ -.widget-container { - position: fixed; - left: 50%; - top: 50%; - z-index: 1000; - padding: 19px; - margin-left: -167px; - margin-top: -311px; - box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), - 0 2px 2px 0 rgba(0, 0, 0, 0.14), - 0 1px 5px 0 rgba(0, 0, 0, 0.12); - border: 1px solid #e3e3e3; - border-radius: 4px; - outline: 0; - min-height: 20px; - background-color: #f5f5f5; - cursor: move; -} - -.widget-container:hover, .widget-container:active{ - box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), - 0 8px 10px 1px rgba(0, 0, 0, 0.14), - 0 3px 14px 2px rgba(0, 0, 0, 0.12); -} - -.close { - float: right; - padding: 0; - cursor: pointer; - background: transparent; - border: 0; - font-size: 21px; - font-weight: bold; - opacity: 0.2; -} - -.b2note-iframe { - width: 100%; - height: 600px; - border: 1px solid #dddddd; -} diff --git a/landingPages/annotation/annotation.module.ts b/landingPages/annotation/annotation.module.ts deleted file mode 100644 index cca05c28..00000000 --- a/landingPages/annotation/annotation.module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import {NgModule} from "@angular/core"; -import {AnnotationComponent} from "./annotation.component"; -import {CommonModule} from "@angular/common"; -import {DragDropModule} from "@angular/cdk/drag-drop"; -import {RouterModule} from "@angular/router"; -import {LoadingModule} from "../../utils/loading/loading.module"; - -@NgModule({ - imports: [CommonModule, DragDropModule, RouterModule, LoadingModule], - declarations: [AnnotationComponent], - exports: [AnnotationComponent] -}) -export class AnnotationModule {} diff --git a/landingPages/annotation/annotation.service.ts b/landingPages/annotation/annotation.service.ts deleted file mode 100644 index 992f9044..00000000 --- a/landingPages/annotation/annotation.service.ts +++ /dev/null @@ -1,95 +0,0 @@ -import {Injectable} from "@angular/core"; -import {HttpClient} from "@angular/common/http"; -import {Observable} from "rxjs"; -import {EnvProperties} from "../../utils/properties/env-properties"; -import {map} from "rxjs/operators"; -import {properties} from "../../../../environments/environment"; - -export interface AnnotationTarget { - id: string; - url: string; -} - -export interface Annotation { - text: string; - type: 'semantic' | 'keyword' | 'comment'; - targets?: AnnotationTarget[]; - targetSize?: number; -} - -@Injectable({ - providedIn: "root" -}) -export class AnnotationService { - - api = 'api/'; - - constructor(private http: HttpClient) { - } - - getAllAnnotations(source: string): Observable { - let url = properties.b2noteAPIURL + this.api + 'annotations?target-id[]=' + encodeURIComponent(source); - return this.http.get(url).pipe(map((response: any[]) => { - return this.parseAnnotations(response); - })); - } - - getAnnotationTargets(value: string, type: 'semantic' | 'keyword' | 'comment'): Observable { - let url = properties.b2noteAPIURL + this.api + 'annotations?value=' + encodeURIComponent(value) + '&type[]=' + type; - return this.http.get(url).pipe(map((response: any[]) => { - return this.parseAnnotationTargets(response); - })); - } - - private parseAnnotations(response: any[]): Annotation[] { - let annotations: Annotation[] = []; - if (response && response.length > 0) { - response.forEach(value => { - if (value.visibility === 'public') { - let body = value.body; - if (body.type === 'TextualBody') { - if (body.purpose === 'tagging') { - annotations.push({ - text: body.value, - type: "keyword" - }); - } else { - annotations.push({ - text: body.value, - type: "comment" - }); - } - } else { - let items = body.items; - let text: string = null; - items.forEach(item => { - if (item.type === 'TextualBody') { - text = item.value; - } - }); - annotations.push({ - text: text, - type: "semantic" - }); - } - } - }); - } - return annotations; - } - - private parseAnnotationTargets(response: any[]): AnnotationTarget[] { - let targets: AnnotationTarget[] = []; - if (response && response.length > 0) { - response.forEach(value => { - if (value.visibility === 'public') { - targets.push({ - id: value.target.id, - url: value.target.source - }); - } - }); - } - return targets; - } -} diff --git a/landingPages/result/resultLanding.component.ts b/landingPages/result/resultLanding.component.ts index bc25c014..ad3d0311 100644 --- a/landingPages/result/resultLanding.component.ts +++ b/landingPages/result/resultLanding.component.ts @@ -134,7 +134,6 @@ export class ResultLandingComponent { public isLoggedIn: boolean = false; public pid: string; - // @ViewChild("annotation") annotation: AnnotationComponent; public contextsWithLink: any; public relatedClassFilters: Option[]=[{"label": "All relations", "value": ""}]; diff --git a/landingPages/result/resultLanding.module.ts b/landingPages/result/resultLanding.module.ts index 3803a598..247c8a99 100644 --- a/landingPages/result/resultLanding.module.ts +++ b/landingPages/result/resultLanding.module.ts @@ -20,7 +20,6 @@ import {ShowAuthorsModule} from "../../utils/authors/showAuthors.module"; import {HelperModule} from "../../utils/helper/helper.module"; import {ResultLandingUtilsModule} from "../landing-utils/resultLandingUtils.module"; import {AlertModalModule} from "../../utils/modal/alertModal.module"; -import {AnnotationModule} from "../annotation/annotation.module"; import {LandingHeaderModule} from "../landing-utils/landing-header/landing-header.module"; import {NoLoadPaging} from "../../searchPages/searchUtils/no-load-paging.module"; import {ResultPreviewModule} from "../../utils/result-preview/result-preview.module"; @@ -45,7 +44,7 @@ import {EntityActionsModule} from "../../utils/entity-actions/entity-actions.mod CiteThisModule, PagingModule, IFrameModule, AltMetricsModule, Schema2jsonldModule, SEOServiceModule, DeletedByInferenceModule, ShowAuthorsModule, HelperModule, ResultLandingUtilsModule, AlertModalModule, - AnnotationModule, LandingHeaderModule, NoLoadPaging, ResultPreviewModule, FeedbackModule, TabsModule, LoadingModule, + LandingHeaderModule, NoLoadPaging, ResultPreviewModule, FeedbackModule, TabsModule, LoadingModule, OrcidModule, IconsModule, InputModule, EGIDataTransferModule, RecaptchaModule, SdgFosSuggestModule, FullScreenModalModule, SafeHtmlPipeModule, EntityActionsModule ], From c06d020cdcebbaeeb6130e163d37864e3d73a00e Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Fri, 12 Jan 2024 13:59:58 +0200 Subject: [PATCH 2/8] [develop | DONE | CHANGED]: ISVocabularies.service.ts: Updated method "parseFOS()" to parse all Fields of Science by visiting hierarchy from fos.json using an iterative DFS (Depth First Search), instead of looping each level - this does not depend on the number of levels specified in the vocabulary file. --- .../ISVocabularies.service.ts | 51 +++++++++++++------ 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/utils/staticAutoComplete/ISVocabularies.service.ts b/utils/staticAutoComplete/ISVocabularies.service.ts index 074afa4e..7a880f44 100644 --- a/utils/staticAutoComplete/ISVocabularies.service.ts +++ b/utils/staticAutoComplete/ISVocabularies.service.ts @@ -143,28 +143,49 @@ export class ISVocabulariesService { parseFOS(data: any): AutoCompleteValue[] { let array: AutoCompleteValue[] = [] - for (let fos of data) { + let children = data.reverse(); + while(children && children.length > 0) { + let fos = children.pop(); let value: AutoCompleteValue = new AutoCompleteValue(); value.id = fos.id;//data[i].code; value.label = fos.label; array.push(value); - if(fos.children) { - 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); - 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); - } - } + if(fos.children && fos.children.length > 0) { + for (let i=fos.children.length-1; i>=0; i--) { + children.push(fos.children[i]); } } } + // for (let fos of data) { + // let value: AutoCompleteValue = new AutoCompleteValue(); + // value.id = fos.id;//data[i].code; + // value.label = fos.label; + // array.push(value); + // if(fos.children) { + // 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); + // 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); + // // if(fos3.children) { + // // for (let fos4 of fos3.children) { + // // let value: AutoCompleteValue = new AutoCompleteValue(); + // // value.id = fos4.id;//data[i].code; + // // value.label = fos4.label; + // // array.push(value); + // // } + // // } + // } + // } + // } + // } + // } return array; } From 5699aed59942a94e0d004023a09bc7994458cfe9 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Wed, 17 Jan 2024 11:16:06 +0200 Subject: [PATCH 3/8] [develop | DONE | FIXED] linking: stack elements on mobile to avoid page breaking --- .../claimResultSearchForm.component.html | 24 ++++++++++--------- claims/linking/linkingGeneric.component.html | 14 +++++------ 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/claims/claim-utils/claimResultSearchForm.component.html b/claims/claim-utils/claimResultSearchForm.component.html index b2e66b11..fe0ab300 100644 --- a/claims/claim-utils/claimResultSearchForm.component.html +++ b/claims/claim-utils/claimResultSearchForm.component.html @@ -1,14 +1,16 @@ -
- -
-
-
-
-
-
+
+
+ +
+
+
+
+
+
+
diff --git a/claims/linking/linkingGeneric.component.html b/claims/linking/linkingGeneric.component.html index 7f394dd2..16cb04bf 100644 --- a/claims/linking/linkingGeneric.component.html +++ b/claims/linking/linkingGeneric.component.html @@ -73,11 +73,11 @@
-
+
-
+
-
+

Link source to

-
+
-
+
Source
@@ -145,7 +145,7 @@
-
+
-
+
From b83101fd740bc6dfdb3271526772083f8236a014 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Wed, 24 Jan 2024 10:36:40 +0200 Subject: [PATCH 4/8] [angular-16-irish-monitor | FIXED]: Manage stakeholders less fix border if color is none. --- .../manageStakeholders/manageStakeholders.component.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor-admin/manageStakeholders/manageStakeholders.component.less b/monitor-admin/manageStakeholders/manageStakeholders.component.less index df782d1d..ee7a7aaa 100644 --- a/monitor-admin/manageStakeholders/manageStakeholders.component.less +++ b/monitor-admin/manageStakeholders/manageStakeholders.component.less @@ -2,7 +2,7 @@ @import (optional) "~src/assets/extend-theme/less/color.less"; .setType(@color) { - border-bottom: 4px solid fade(@color, 30%); + border-bottom: 4px solid if(@color = none, none, fade(@color, 30%)); & .type { color: @color; From 43ceb9f266bfb538c003e8dc760c6bbe0188cce3 Mon Sep 17 00:00:00 2001 From: argirok Date: Wed, 24 Jan 2024 12:14:40 +0200 Subject: [PATCH 5/8] [develop | DONE | CHANGED] claims: disable result link when status is pending --- .../claim-utils/displayClaims/displayClaims.component.html | 2 +- .../entityFormatter/claimEntityFormatter.component.ts | 3 ++- .../entityFormatter/publicationTitleFormatter.component.ts | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/claims/claim-utils/displayClaims/displayClaims.component.html b/claims/claim-utils/displayClaims/displayClaims.component.html index 2c5dd4eb..bdcc74b3 100644 --- a/claims/claim-utils/displayClaims/displayClaims.component.html +++ b/claims/claim-utils/displayClaims/displayClaims.component.html @@ -63,7 +63,7 @@
+ [externalPortalUrl]=externalPortalUrl [source]="true" [linkAvailable]="isClaimAvailable(claim)">
Link to: + path="/search/result" [externalPortalUrl]=externalPortalUrl [linkAvailable]="linkAvailable">

{{entity.title?entity.title:"[No title available]"}} - {{entity.title?entity.title:"[No title available]"}} + [routerLink]="path" class="uk-link uk-link-heading" [class.uk-disabled]="!linkAvailable">{{entity.title?entity.title:"[No title available]"}} + {{entity.title?entity.title:"[No title available]"}}

@@ -23,5 +23,6 @@ export class PublicationTitleFormatter { @Input() path: string; @Input() entity: any; @Input() externalPortalUrl: string = null; + @Input() linkAvailable: boolean = true; public routerHelper: RouterHelper = new RouterHelper(); } From e176169afd25ce613631a5c7ca7a45eb7cfbb4e7 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Wed, 24 Jan 2024 14:36:12 +0200 Subject: [PATCH 6/8] [develop]: Fix some properties values --- utils/properties/environments/environment.ts | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/utils/properties/environments/environment.ts b/utils/properties/environments/environment.ts index 1bef13a0..32510803 100644 --- a/utils/properties/environments/environment.ts +++ b/utils/properties/environments/environment.ts @@ -10,7 +10,7 @@ export let common: EnvProperties = { searchOrcidURL: "https://pub.orcid.org/v2.1/", orcidURL: "https://orcid.org/", orcidAPIURL: "https://services.openaire.eu/uoa-orcid-service/", - orcidTokenURL : "https://orcid.org/oauth/authorize?", + orcidTokenURL: "https://orcid.org/oauth/authorize?", orcidClientId: "APP-IN0O56SBVVTB7NN4", doiURL: "https://doi.org/", pmcURL: "http://europepmc.org/articles/", @@ -33,7 +33,7 @@ export let common: EnvProperties = { csvLimit: 2000, pagingLimit: 20, resultsPerPage: 10, - baseLink : "", + baseLink: "", searchLinkToResult: "/search/result?id=", searchLinkToPublication: "/search/publication?articleId=", searchLinkToProject: "/search/project?projectId=", @@ -79,22 +79,19 @@ export let common: EnvProperties = { footerGrantText: "OpenAIRE has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreements No. 777541 and 101017452", //connect - enermapsURL:"https://lab.idiap.ch/enermaps", + enermapsURL: "https://lab.idiap.ch/enermaps", zenodoCommunities: 'https://zenodo.org/api/communities', shareInZenodoPage: '/participate/deposit/zenodo', afterLoginRedirectLink: '/myCommunities', searchLinkToCommunities: '/search/find/communities', - - - } export let commonDev: EnvProperties = { environment: "development", pdfStatisticsAPIURL: "https://beta.services.openaire.eu/pdf-stats", - statisticsAPIURL: "http://vatopedi.di.uoa.gr:8080/stats/", + statisticsAPIURL: "https://beta.services.openaire.eu/stats-api/", statisticsFrameAPIURL: "https://beta.openaire.eu/stats/", - statisticsFrameNewAPIURL: "https://stats.madgik.di.uoa.gr/stats-api/", + statisticsFrameNewAPIURL: "https://beta.services.openaire.eu/stats-tool/", claimsAPIURL: "http://scoobydoo.di.uoa.gr:8880/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/", searchAPIURLLAst: "http://beta.services.openaire.eu/search/v2/api/", searchResourcesAPIURL: "https://beta.services.openaire.eu/search/v2/api/resources", @@ -102,7 +99,7 @@ export let commonDev: EnvProperties = { openCitationsAPIURL: "https://services.openaire.eu/opencitations/getCitations?id=", csvAPIURL: "https://beta.services.openaire.eu/search/v2/api/reports", orcidAPIURL: "http://duffy.di.uoa.gr:19480/uoa-orcid-service/", - orcidTokenURL : "https://sandbox.orcid.org/oauth/authorize?", + orcidTokenURL: "https://sandbox.orcid.org/oauth/authorize?", orcidClientId: "APP-A5M3KTX6NCN67L91", utilsService: "http://dl170.madgik.di.uoa.gr:8000", vocabulariesAPI: "https://dev-openaire.d4science.org/provision/mvc/vocabularies/", @@ -117,7 +114,7 @@ export let commonDev: EnvProperties = { datasourcesAPI: "https://beta.services.openaire.eu/openaire/ds/api/", contextsAPI: "https://dev-openaire.d4science.org/openaire/context", communityAPI: "https://dev-openaire.d4science.org/openaire/community/", - lastIndexInformationLink: "https://www.openaire.eu/aggregation-and-content-provision-workflows", + lastIndexInformationLink: "https://www.openaire.eu/aggregation-and-content-provision-workflows", widgetLink: "https://beta.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=", claimsInformationLink: "https://www.openaire.eu/linking-beta", indexInfoAPI: "https://beta.services.openaire.eu/openaire/info/", @@ -208,7 +205,7 @@ export let commonBeta: EnvProperties = { export let commonProd: EnvProperties = { environment: "production", pdfStatisticsAPIURL: "https://services.openaire.eu/pdf-stats", - statisticsAPIURL: "https://beta.services.openaire.eu/stats-api/", + statisticsAPIURL: "https://services.openaire.eu/stats-api/", statisticsFrameAPIURL: "https://www.openaire.eu/stats/", statisticsFrameNewAPIURL: "https://services.openaire.eu/stats-tool/", claimsAPIURL: "https://services.openaire.eu/claims-new/rest/claimsService/", From 0a47193bf3f63d0660dbe1e88048bce0de0d5a63 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Wed, 24 Jan 2024 17:03:15 +0200 Subject: [PATCH 7/8] [develop | DONE | FIXED]: searchResearchResults.service.ts & resultLanding.service.ts & deletedByInference.service.ts: #9425 - When an author (same name & rank) has 2 instances on the same record, keep orcid information if exists in at least one instance. --- .../deletedByInference/deletedByInference.service.ts | 9 +++++++++ landingPages/result/resultLanding.service.ts | 9 +++++++++ services/searchResearchResults.service.ts | 9 +++++++++ 3 files changed, 27 insertions(+) diff --git a/landingPages/result/deletedByInference/deletedByInference.service.ts b/landingPages/result/deletedByInference/deletedByInference.service.ts index 41d6e312..5b812e8f 100644 --- a/landingPages/result/deletedByInference/deletedByInference.service.ts +++ b/landingPages/result/deletedByInference/deletedByInference.service.ts @@ -145,6 +145,15 @@ export class DeletedByInferenceService { if(author.orcid_pending) { author.orcid_pending = author.orcid_pending.toUpperCase(); } + + if(result['authors'][author.rank] && results['authors'][author.rank].fullName == author.content) { + if(!author.orcid && result['authors'][author.rank].orcid) { + author.orcid = result['authors'][author.rank].orcid; + } else if(!author.orcid_pending && result['authors'][author.rank].orcid_pending) { + author.orcid_pending = result['authors'][author.rank].orcid_pending; + } + } + result['authors'][author.rank] = {"fullName": author.content, "orcid": author.orcid, "orcid_pending": author.orcid_pending}; } } diff --git a/landingPages/result/resultLanding.service.ts b/landingPages/result/resultLanding.service.ts index df6e8745..d0f7060c 100644 --- a/landingPages/result/resultLanding.service.ts +++ b/landingPages/result/resultLanding.service.ts @@ -381,6 +381,15 @@ export class ResultLandingService { if (author.orcid_pending) { author.orcid_pending = author.orcid_pending.toUpperCase(); } + + if(this.resultLandingInfo['authors'][author.rank] && this.resultLandingInfo['authors'][author.rank].fullName == author.content) { + if(!author.orcid && this.resultLandingInfo['authors'][author.rank].orcid) { + author.orcid = this.resultLandingInfo['authors'][author.rank].orcid; + } else if(!author.orcid_pending && this.resultLandingInfo['authors'][author.rank].orcid_pending) { + author.orcid_pending = this.resultLandingInfo['authors'][author.rank].orcid_pending; + } + } + this.resultLandingInfo['authors'][author.rank] = { "fullName": author.content, "orcid": author.orcid, diff --git a/services/searchResearchResults.service.ts b/services/searchResearchResults.service.ts index 4c76bf90..62329217 100644 --- a/services/searchResearchResults.service.ts +++ b/services/searchResearchResults.service.ts @@ -348,6 +348,15 @@ export class SearchResearchResultsService { if (author.orcid_pending) { author.orcid_pending = author.orcid_pending.toUpperCase(); } + + if(result['authors'][author.rank] && result['authors'][author.rank].fullName == author.content) { + if(!author.orcid && result['authors'][author.rank].orcid) { + author.orcid = result['authors'][author.rank].orcid; + } else if(!author.orcid_pending && result['authors'][author.rank].orcid_pending) { + author.orcid_pending = result['authors'][author.rank].orcid_pending; + } + } + result['authors'][author.rank] = { "fullName": author.content, "orcid": author.orcid, From e3fe71a6233f2c5f7fe5f731463f7cb37e3c9604 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Wed, 24 Jan 2024 17:10:45 +0200 Subject: [PATCH 8/8] [angular-16-irish-monitor | DONE | CHANGED]: resultLanding.component.html & result-preview.component.html: Renamed OA Routes to Access Routes. --- landingPages/result/resultLanding.component.html | 2 +- utils/result-preview/result-preview.component.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index 3d64e748..64174526 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -567,7 +567,7 @@
- OA Routes + Access Routes
diff --git a/utils/result-preview/result-preview.component.html b/utils/result-preview/result-preview.component.html index 016ca66e..306d2128 100644 --- a/utils/result-preview/result-preview.component.html +++ b/utils/result-preview/result-preview.component.html @@ -222,7 +222,7 @@ - OA Routes + Access Routes