diff --git a/src/app/app.component.ts b/src/app/app.component.ts index ab09232..66dc3f4 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -200,7 +200,7 @@ export class AppComponent implements OnInit { this.userMenuItems.push(new MenuItem("", "User information", "", "/user-info", false, [], [], {})); } if (this.community) { - this.headerLogoUrl = this.community.logoUrl; + this.headerLogoUrl = this.community.getLogoUrl(); this.headerUrl = 'https://' + ((properties.environment !== 'production')?'beta.':'') + this.community.communityId + '.openaire.eu'; this.menuHeader = { route: "/" + this.community.communityId, diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index 3632510..79e6748 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit 3632510e387b3a83f8d8e0f27cd796912a19c741 +Subproject commit 79e6748d7f4ed7da329ed7d2678a88320a2bf1a5 diff --git a/src/app/pages/community-info/profile/edit-community/edit-community.component.ts b/src/app/pages/community-info/profile/edit-community/edit-community.component.ts index 31e8f50..1cd445e 100644 --- a/src/app/pages/community-info/profile/edit-community/edit-community.component.ts +++ b/src/app/pages/community-info/profile/edit-community/edit-community.component.ts @@ -200,8 +200,8 @@ export class EditCommunityComponent { this.communityFb.get('shortName').enable(); this.subscriptions.push(this.utilsService.uploadPhoto(this.properties.utilsService + "/upload/stakeholder/" + encodeURIComponent(this.communityFb.value.communityId), this.file).subscribe(res => { this.deletePhoto(); - this.removePhoto(); this.communityFb.get('logoUrl').setValue(res.filename); + this.removePhoto(); this.saveCommunity(callback, errorCallback); }, error => { this.uploadError = "An error has been occurred during upload your image. Try again later"; @@ -311,7 +311,7 @@ export class EditCommunityComponent { } public deletePhoto() { - if (this.community.logoUrl) { + if (this.community.logoUrl && this.community.isUpload) { this.subscriptions.push(this.utilsService.deletePhoto(this.properties.utilsService + '/delete/stakeholder/' + this.community.logoUrl).subscribe()); } } diff --git a/src/app/pages/manage-communities/manage-communities.component.ts b/src/app/pages/manage-communities/manage-communities.component.ts index d445255..5ee0388 100644 --- a/src/app/pages/manage-communities/manage-communities.component.ts +++ b/src/app/pages/manage-communities/manage-communities.component.ts @@ -69,7 +69,7 @@ type Tab = 'all' | 'communities' | 'ris'; {{community.shortTitle}}