From 9c34604804377c99dd1d2f923f297faacaf1ede7 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Wed, 12 Jun 2024 12:39:33 +0300 Subject: [PATCH] [umbrella]: Fix browse stakeholders error and monitorAPI property. Update library --- .../browse-stakeholders.component.ts | 32 ++++++++++--------- src/app/openaireLibrary | 2 +- src/environments/environment.ts | 3 +- 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/app/browse-stakeholders/browse-stakeholders.component.ts b/src/app/browse-stakeholders/browse-stakeholders.component.ts index 39bb0ed..55d346a 100644 --- a/src/app/browse-stakeholders/browse-stakeholders.component.ts +++ b/src/app/browse-stakeholders/browse-stakeholders.component.ts @@ -46,23 +46,25 @@ export class BrowseStakeholdersComponent extends BrowseStakeholderBaseComponent< this.user = user; } })); - this.subscriptions.push(this.stakeholderService.getStakeholderAsObservable().subscribe(data => { + this.subscriptions.push(this.stakeholderService.getStakeholderAsObservable().subscribe(stakeholder => { this.subscriptions.push(this._route.params.subscribe(params => { - this.stakeholderType = params['type']; - this.reset(); - this.title = "Monitor Dashboard | " + data.name + " | " + "Browse " + this.entities[this.stakeholderType + 's']; - this.description = "Monitor Dashboard | " + data.name + " | " + "Browse " + this.entities[this.stakeholderType + 's']; - this.setMetadata(); - if (data.umbrella.children[this._route.snapshot.params['type']] == null) { - this.navigateToError(); + if(stakeholder?.umbrella) { + this.stakeholderType = params['type']; + this.reset(); + this.title = "Monitor Dashboard | " + stakeholder.name + " | " + "Browse " + this.entities[this.stakeholderType + 's']; + this.description = "Monitor Dashboard | " + stakeholder.name + " | " + "Browse " + this.entities[this.stakeholderType + 's']; + this.setMetadata(); + if (stakeholder.umbrella.children[this._route.snapshot.params['type']] == null) { + this.navigateToError(); + } + this.stakeholders = stakeholder.umbrella.children[this._route.snapshot.params['type']]; + this.stakeholders.forEach(stakeholder => { + stakeholder.isManager = this.isManager(stakeholder); + stakeholder.isMember = this.isMember(stakeholder) + }); + this.filteredStakeholders = this.stakeholders; + this.showLoading = false; } - this.stakeholders = data.umbrella.children[this._route.snapshot.params['type']]; - this.stakeholders.forEach(stakeholder => { - stakeholder.isManager = this.isManager(stakeholder); - stakeholder.isMember = this.isMember(stakeholder) - }); - this.filteredStakeholders = this.stakeholders; - this.showLoading = false; })); })); } diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index 179f0c4..e1cc4f8 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit 179f0c4cd2b1d9b8d57ab51cbad99cb94d7fe268 +Subproject commit e1cc4f87aa9490d799732400e6842834aabb74c2 diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 67f58b1..2b99245 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -20,8 +20,7 @@ let props: EnvProperties = { useHelpTexts: true, baseLink: "/", domain: "http://mpagasas.di.uoa.gr:4600", - myClaimsLink: "../../users/links", - monitorServiceAPIURL: "http://mpagasas.di.uoa.gr:8888" + myClaimsLink: "../../users/links" }; export let properties: EnvProperties = {