diff --git a/src/app/pages/affiliations/affiliations.component.ts b/src/app/pages/affiliations/affiliations.component.ts index abd95a5..a763f24 100644 --- a/src/app/pages/affiliations/affiliations.component.ts +++ b/src/app/pages/affiliations/affiliations.component.ts @@ -85,11 +85,9 @@ export class AffiliationsComponent implements OnInit { initAffiliation(affiliation: Affiliation = null) { this.resetMessages(); - this.affiliation = new Affiliation(); + if (affiliation) { - this.affiliation.name = affiliation.name; - this.affiliation.logo_url = affiliation.logo_url; - this.affiliation.website_url = affiliation.website_url; + this.affiliation = {...affiliation}; if(!this.curatorAffiliations) { this.affiliation.communityId = affiliation.communityId; this.affiliation.id = affiliation.id; @@ -101,9 +99,7 @@ export class AffiliationsComponent implements OnInit { } } else { this.index = -1; - this.affiliation.name = ''; - this.affiliation.logo_url = ''; - this.affiliation.website_url = ''; + this.affiliation = new Affiliation(); if(!this.curatorAffiliations) { this.affiliation.communityId = this.communityId; } diff --git a/src/app/pages/curator/curator.component.ts b/src/app/pages/curator/curator.component.ts index 06de1ae..70355b7 100644 --- a/src/app/pages/curator/curator.component.ts +++ b/src/app/pages/curator/curator.component.ts @@ -6,7 +6,7 @@ import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properti import {Session} from '../../openaireLibrary/login/utils/helper.class'; import {LoginErrorCodes} from '../../openaireLibrary/login/utils/guardHelper.class'; import {CuratorService} from '../../openaireLibrary/connect/curators/curator.service'; -import {Affiliation, Curator} from '../../openaireLibrary/utils/entities/CuratorInfo'; +import {Curator} from '../../openaireLibrary/utils/entities/CuratorInfo'; import {HelperFunctions} from '../../openaireLibrary/utils/HelperFunctions.class'; import {UtilitiesService} from '../../openaireLibrary/services/utilities.service';