From c33af181bb46f6c054cc1e115f721cd204a619e1 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Thu, 7 Mar 2024 10:27:30 +0200 Subject: [PATCH 1/4] [develop]: Role-verification: Add relatve to route parameter. --- role-verification/role-verification.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/role-verification/role-verification.component.ts b/role-verification/role-verification.component.ts index 416c2624..1b54fe75 100644 --- a/role-verification/role-verification.component.ts +++ b/role-verification/role-verification.component.ts @@ -93,6 +93,8 @@ export class RoleVerificationComponent extends BaseComponent implements OnInit, public userInfoLinkPrefix = ''; @Input() public userInfoLink = null; + @Input() + public relativeTo: ActivatedRoute = this._route; public user: User; public verification: any; public code: UntypedFormControl; @@ -150,7 +152,7 @@ export class RoleVerificationComponent extends BaseComponent implements OnInit, 'errorCode': LoginErrorCodes.NOT_LOGIN, 'redirectUrl': this._router.url }, - relativeTo: this._route + relativeTo: this.relativeTo }); } } else if(this.isMember) { From b0c69be6ef3e55089d7032f0d1457c874652974f Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Fri, 8 Mar 2024 12:50:55 +0200 Subject: [PATCH 2/4] [develop | DONE | ADDED] irish-monitor: add new BehaviorSubject for enabling/disabling help-pop-up component on admin and non-admin pages --- dashboard/sharedComponents/sidebar/layout.service.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dashboard/sharedComponents/sidebar/layout.service.ts b/dashboard/sharedComponents/sidebar/layout.service.ts index 17657431..dc515f81 100644 --- a/dashboard/sharedComponents/sidebar/layout.service.ts +++ b/dashboard/sharedComponents/sidebar/layout.service.ts @@ -88,6 +88,10 @@ export class LayoutService { * Handle it manually in the component, it doesn't use data * */ private rootClassSubject: BehaviorSubject = new BehaviorSubject(null); + /** + * Display help pop-up on non-admin pages. (default true for the rest of the pages) + * */ + private hasHelpPopUpSubject: BehaviorSubject = new BehaviorSubject(true); private subscriptions: any[] = []; ngOnDestroy() { @@ -343,4 +347,12 @@ export class LayoutService { this.rootClassSubject.next(value); } } + + get hasHelpPopUp(): Observable { + return this.hasHelpPopUpSubject.asObservable(); + } + + setHasHelpPopUp(value: boolean) { + this.hasHelpPopUpSubject.next(value); + } } From 622459c26c5db0c832e9b159d0558b15b86800c8 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Tue, 12 Mar 2024 19:24:50 +0200 Subject: [PATCH 3/4] [develop]: Helper class: Remove group from mapType. --- login/utils/helper.class.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/login/utils/helper.class.ts b/login/utils/helper.class.ts index 6f2a2951..152cda48 100644 --- a/login/utils/helper.class.ts +++ b/login/utils/helper.class.ts @@ -234,6 +234,7 @@ export class Role { } public static mapType(type: string, communityMap: boolean = true): string { + type = type.replace(this.GROUP, ''); if (type == "ri" && communityMap) { type = "community"; } else if (type == "organization") { From 6b907fe97d765773e2865c748a6edf9fe4c2b866 Mon Sep 17 00:00:00 2001 From: argirok Date: Wed, 13 Mar 2024 12:04:23 +0200 Subject: [PATCH 4/4] [develop | DONE | ADDED] add method for grouped count queries that goes through the cache --- services/searchResearchResults.service.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/services/searchResearchResults.service.ts b/services/searchResearchResults.service.ts index 3e49a7cc..aadcd730 100644 --- a/services/searchResearchResults.service.ts +++ b/services/searchResearchResults.service.ts @@ -133,7 +133,14 @@ export class SearchResearchResultsService { return this.http.get((properties.useLongCache && size == 0 && !params && (!refineQuery || !refineQuery.includes("fq="))) ? (properties.cacheUrl + encodeURIComponent(url)) : url) .pipe(map(res => [res['meta'].total, this.parseResults(resultType, res['results'], properties), RefineResultsUtils.parse(res['refineResults'], refineFields, "publication")])); } + countResults(field:string,value:string): any { + let url = properties.utilsService + "/portals/countResults"; + if (field && value) { + url += "?field=" + encodeURIComponent(field) + "&value="+encodeURIComponent(value); + } + return this.http.get((properties.useLongCache ) ? (properties.cacheUrl + encodeURIComponent(url)) : url); + } searchResultForEntity(resultType: string, params: string, page: number, size: number, properties: EnvProperties): any { let link = properties.searchAPIURLLAst; //let url = link+params+"/"+this.getEntityQueryName(resultType,true)+ "?format=json";