Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme

This commit is contained in:
Konstantinos Triantafyllou 2022-07-01 15:44:18 +03:00
commit 5a58cc01f9
2 changed files with 5 additions and 2 deletions

View File

@ -56,6 +56,7 @@ export class CommunityService {
async getCommunityAsync() {
await this.promise;
this.clearSubscriptions();
return this.community.getValue();
}

View File

@ -1,4 +1,4 @@
import {Component, Input, OnDestroy, OnInit, ViewChild} from '@angular/core';
import {Component, Input, OnDestroy, OnInit} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {Session, User} from '../login/utils/helper.class';
import {ConfigurationService} from '../utils/configuration/configuration.service';
@ -91,10 +91,12 @@ export class NavigationBarComponent implements OnInit, OnDestroy {
};
}
this.isAuthorized = Session.isClaimsCurator(this.user) || Session.isPortalAdministrator(this.user);
if (this.properties.adminToolsAPIURL && this.communityId) {
if ((this.properties.adminToolsAPIURL && this.communityId) || properties.adminToolsPortalType == "community") {
//this.config.getCommunityInformation(this.properties, this.communityId).subscribe(data => {
this.subs.push(this.config.communityInformationState.subscribe(data => {
if (data) {
this.showEntity = {};
this.showPage = {};
if (data['entities']) {
for (let i = 0; i < data['entities'].length; i++) {