[Admin]: init Affiliation: copy object
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@56069 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
43e1274b2a
commit
e165caf478
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
Loading…
Reference in New Issue