[Aggregator & Library | new-theme]: [Bug fix] Set properly "dashboard" and "adminToolsPortalType" properties and show "Check compatible EOSC services" button in eosc portal too.

1. env-properties.ts:
   a. In Dashboard type added "aggregator".
   b. In PortalType added "funder", "ri", "project", "organization", "aggregator", "eosc".
2. environments/: Set "dashboard" property to "aggregator" and only for eosc set "adminToolsPortalType" property to "eosc".
3. entitiesSelection.component.ts: Added check if adminToolsPortalType is "eosc".
4. resultLanding.component.ts: In method "hasRightSidebarInfo()" check if adminToolsPortalType is "eosc" to show "Check compatible EOSC services" button.
5. resultLanding.component.html: Show "Check compatible EOSC services" for adminToolsPortalType "explore" or "eosc".
This commit is contained in:
Konstantina Galouni 2022-05-16 17:14:50 +03:00
parent 4242a65199
commit 64b0e163fa
4 changed files with 7 additions and 6 deletions

View File

@ -369,7 +369,7 @@
<div class="uk-margin-medium-top uk-list uk-list-large uk-padding uk-padding-remove-vertical" [class.uk-list-divider]="!viewAll"> <div class="uk-margin-medium-top uk-list uk-list-large uk-padding uk-padding-remove-vertical" [class.uk-list-divider]="!viewAll">
<!-- EOSC Services--> <!-- EOSC Services-->
<!-- 1 link --> <!-- 1 link -->
<div *ngIf="resultLandingInfo.eoscSubjects?.length == 1 && properties.adminToolsPortalType == 'explore' <div *ngIf="resultLandingInfo.eoscSubjects?.length == 1 && (properties.adminToolsPortalType == 'explore' || properties.adminToolsPortalType == 'eosc')
&& (properties.environment == 'beta' || properties.environment == 'development') && (!viewAll || viewAll=='egiNotebook')"> && (properties.environment == 'beta' || properties.environment == 'development') && (!viewAll || viewAll=='egiNotebook')">
<a class="uk-link-text uk-text-bold custom-external" <a class="uk-link-text uk-text-bold custom-external"
target="_blank" [href]="resultLandingInfo.eoscSubjects[0].link"> target="_blank" [href]="resultLandingInfo.eoscSubjects[0].link">
@ -379,7 +379,7 @@
</a> </a>
</div> </div>
<!-- more than 1 links --> <!-- more than 1 links -->
<div *ngIf="resultLandingInfo.eoscSubjects?.length > 1 && properties.adminToolsPortalType == 'explore' <div *ngIf="resultLandingInfo.eoscSubjects?.length > 1 && (properties.adminToolsPortalType == 'explore' || properties.adminToolsPortalType == 'eosc')
&& (properties.environment == 'beta' || properties.environment == 'development') && (!viewAll || viewAll=='egiNotebook')"> && (properties.environment == 'beta' || properties.environment == 'development') && (!viewAll || viewAll=='egiNotebook')">
<a class="uk-link-text uk-text-bold"> <a class="uk-link-text uk-text-bold">
<img src="assets/common-assets/eosc-logo.png" <img src="assets/common-assets/eosc-logo.png"

View File

@ -548,7 +548,8 @@ export class ResultLandingComponent {
} }
public get hasRightSidebarInfo(): boolean { public get hasRightSidebarInfo(): boolean {
return (this.resultLandingInfo.eoscSubjects && this.resultLandingInfo.eoscSubjects.length && properties.adminToolsPortalType == 'explore' return (this.resultLandingInfo.eoscSubjects && this.resultLandingInfo.eoscSubjects.length
&& (properties.adminToolsPortalType == 'explore' || properties.adminToolsPortalType == 'eosc')
&& (properties.environment == 'beta' || properties.environment == 'development')) && (properties.environment == 'beta' || properties.environment == 'development'))
|| ||
(this.resultLandingInfo.sdg && this.resultLandingInfo.sdg.length > 0) (this.resultLandingInfo.sdg && this.resultLandingInfo.sdg.length > 0)

View File

@ -40,7 +40,7 @@ export class EntitiesSelectionComponent {
/** TODO change conditions base on PortalType instead of customFilter */ /** TODO change conditions base on PortalType instead of customFilter */
ngOnInit() { ngOnInit() {
if ((this.customFilter && this.customFilter.queryFieldName == "communityId") || (['explore', 'aggregator'].includes(this.properties.adminToolsPortalType))) { if ((this.customFilter && this.customFilter.queryFieldName == "communityId") || (['explore', 'aggregator', 'eosc'].includes(this.properties.adminToolsPortalType))) {
this.subscriptions.push(this.config.communityInformationState.subscribe(data => { this.subscriptions.push(this.config.communityInformationState.subscribe(data => {
if (data) { if (data) {
let showEntity = {}; let showEntity = {};

View File

@ -1,6 +1,6 @@
export type Environment = "development" | "test" | "beta" | "production"; export type Environment = "development" | "test" | "beta" | "production";
export type Dashboard = "explore" | "connect" | "monitor"; export type Dashboard = "explore" | "connect" | "monitor" | "aggregator";
export type PortalType = "explore" | "connect" | "community" | "monitor" | "aggregator"; export type PortalType = "explore" | "connect" | "community" | "monitor" | "funder" | "ri" | "project" | "organization" | "aggregator" | "eosc";
export interface EnvProperties { export interface EnvProperties {
environment?: Environment; environment?: Environment;