Use new upload methods for edit community profile form. Update library and assets
This commit is contained in:
parent
318e7a2c63
commit
66f9320d9e
|
@ -1 +1 @@
|
||||||
Subproject commit 7ef741c205a3659e28d1f8521a37e2cc0d969de5
|
Subproject commit 1fbb461faa26047e350ab3319684f7ab62154c3e
|
|
@ -198,7 +198,7 @@ export class EditCommunityComponent {
|
||||||
public save(callback: Function, errorCallback: Function = null) {
|
public save(callback: Function, errorCallback: Function = null) {
|
||||||
if (this.file) {
|
if (this.file) {
|
||||||
this.communityFb.get('shortName').enable();
|
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.subscriptions.push(this.utilsService.uploadPhoto(this.properties.utilsService + "/upload/community/" + encodeURIComponent(this.community.communityId), this.file).subscribe(res => {
|
||||||
this.deletePhoto();
|
this.deletePhoto();
|
||||||
this.communityFb.get('logoUrl').setValue(res.filename);
|
this.communityFb.get('logoUrl').setValue(res.filename);
|
||||||
this.removePhoto();
|
this.removePhoto();
|
||||||
|
@ -312,7 +312,8 @@ export class EditCommunityComponent {
|
||||||
|
|
||||||
public deletePhoto() {
|
public deletePhoto() {
|
||||||
if (this.community.logoUrl && this.community.isUpload) {
|
if (this.community.logoUrl && this.community.isUpload) {
|
||||||
this.subscriptions.push(this.utilsService.deletePhoto(this.properties.utilsService + '/delete/stakeholder/' + this.community.logoUrl).subscribe());
|
this.subscriptions.push(this.utilsService.deletePhoto(this.properties.utilsService + '/delete/community/' +
|
||||||
|
encodeURIComponent(this.community.communityId) + '/' + this.community.logoUrl).subscribe());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 999d3833d3805534677aa741a3759e26e09b50f2
|
Subproject commit 28db142aa54b8bea87ada52dbae2da7c7da8f458
|
Loading…
Reference in New Issue