From 8f54381b96a6d0cc483d8ce91d26498aa2c7a12b Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Thu, 10 Dec 2020 16:36:28 +0000 Subject: [PATCH] [Library | Trunk]: Stakeholder remove managers field and make topics any type git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60113 d315682c-612b-4755-9ff5-7f18f6832af3 --- monitor/entities/stakeholder.ts | 15 ++++----------- monitor/services/stakeholder.service.ts | 2 +- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/monitor/entities/stakeholder.ts b/monitor/entities/stakeholder.ts index 3f80e5c2..b06375fe 100644 --- a/monitor/entities/stakeholder.ts +++ b/monitor/entities/stakeholder.ts @@ -24,21 +24,13 @@ export class Stakeholder { visibility: Visibility; creationDate: Date = null; updateDate: Date; - managers: string[]; logoUrl: string; isUpload: boolean = false; - topics: Topic[]; description: string; + topics: any[]; - constructor(id: string, type: StakeholderType, index_id, index_name: string, index_shortName: string, alias: string, visibility: Visibility, logoUrl: string, defaultId: string = null, description: string = null) { - this.initializeFunder(id, type, index_id, index_name, index_shortName, defaultId, alias, visibility, logoUrl, description); - this.topics = []; - this.managers = []; - } - - initializeFunder(id: string, type: StakeholderType, index_id, index_name: string, index_shortName: string, defaultId: string, - alias: string, visibility: Visibility, logoUrl: string, description: string = null) { - this._id = id; + constructor(_id: string, type: StakeholderType, index_id, index_name: string, index_shortName: string, alias: string, visibility: Visibility, logoUrl: string, defaultId: string = null, description: string = null) { + this._id = _id; this.type = type; this.index_id = index_id; this.index_name = index_name; @@ -48,6 +40,7 @@ export class Stakeholder { this.visibility = visibility; this.logoUrl = logoUrl; this.description = description; + this.topics = []; } } diff --git a/monitor/services/stakeholder.service.ts b/monitor/services/stakeholder.service.ts index adf440b3..35541e50 100644 --- a/monitor/services/stakeholder.service.ts +++ b/monitor/services/stakeholder.service.ts @@ -71,7 +71,7 @@ export class StakeholderService { })); } - getMyStakeholders(url: string, type: string = null): Observable<(Stakeholder & StakeholderInfo)[]> { + getMyStakeholders(url: string, type: string = null): Observable { return this.http.get(url + '/my-stakeholder' + ((type)?('?type=' + type):''), CustomOptions.registryOptions()).pipe(map(stakeholders => { return this.formalize(stakeholders); }));