From 3c1623d12c2ae6a9a244ee34b3b22ede23f6680c Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Mon, 3 Oct 2022 20:25:37 +0300 Subject: [PATCH] [Aggregator]: Updates in css | Bug fix in isRouteEnabled check. 1. portal.ts & aggregators.ts: [Bug fix] In method "getMockCommunityInfo()" set also pid for community (isRouteEnabled.guard needs it) | Updates in less files (overrides of colors) 2. styles.less: Updated imports (added linking, landing and canada-custom and removed aggregator-custom). 3. numbers.component.ts: Updated default value of @Input() colorClass to "uk-text-primary". 4. connectHelper.ts: In method "getCommunityFromDomain()" added also "aggregator" and "eosc" portal types to set domain on development. --- connect/connectHelper.ts | 6 ++++-- sharedComponents/numbers/numbers.component.ts | 2 +- utils/entities/adminTool/portal.ts | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/connect/connectHelper.ts b/connect/connectHelper.ts index ed8fb090..252e25c0 100644 --- a/connect/connectHelper.ts +++ b/connect/connectHelper.ts @@ -5,8 +5,10 @@ import {Session} from "../login/utils/helper.class"; export class ConnectHelper { public static getCommunityFromDomain(domain: string): string{ - if(properties.environment == "development" && (properties.adminToolsPortalType == "connect" || properties.adminToolsPortalType == "community")) { - domain = "covid-19.openaire.eu"; //for testing + if(properties.environment == "development" && + (properties.adminToolsPortalType == "connect" || properties.adminToolsPortalType == "community" + || properties.adminToolsPortalType == "aggregator" || properties.adminToolsPortalType == "eosc")) { + domain = "canada.explore.openaire.eu"; //for testing } domain = domain.indexOf("//") != -1? domain.split("//")[1]:domain; //remove https:// prefix if (domain.indexOf('eosc-portal.eu') != -1) { diff --git a/sharedComponents/numbers/numbers.component.ts b/sharedComponents/numbers/numbers.component.ts index a9a83872..c80d116a 100644 --- a/sharedComponents/numbers/numbers.component.ts +++ b/sharedComponents/numbers/numbers.component.ts @@ -143,7 +143,7 @@ interface Link { `, }) export class NumbersComponent implements OnInit, OnDestroy { - @Input() colorClass = 'portal-color'; + @Input() colorClass = 'uk-text-primary'; @Input() backgroundClass = null; /** Add a value if you want to apply refine query*/ @Input() refineValue = null; diff --git a/utils/entities/adminTool/portal.ts b/utils/entities/adminTool/portal.ts index 0c7f62c7..909d8930 100644 --- a/utils/entities/adminTool/portal.ts +++ b/utils/entities/adminTool/portal.ts @@ -184,8 +184,9 @@ export class Portal { };; }; - public static getMockCommunityInfo(disabledEntities:string[],disabledPages:string[]): any { + public static getMockCommunityInfo(pid: string, disabledEntities:string[],disabledPages:string[]): any { let communityInfo = Object.assign({}, Portal.getmockPortalInfo()); + communityInfo.pid = pid; for(let disabledPage of disabledPages) { for (var i = 0; i < communityInfo.pages.length; i++) { if (communityInfo.pages[i].route == disabledPage) {