Revision 60026
Added by Konstantinos Triantafyllou over 3 years ago
edit-stakeholder.component.ts | ||
---|---|---|
242 | 242 |
|
243 | 243 |
public save(callback: Function, errorCallback: Function = null) { |
244 | 244 |
if (this.file) { |
245 |
this.stakeholderFb.get('alias').enable(); |
|
245 | 246 |
this.subscriptions.push(this.utilsService.uploadPhoto(this.properties.utilsService + "/upload/stakeholder/" + encodeURIComponent(this.stakeholderFb.value.alias), this.file).subscribe(res => { |
246 | 247 |
this.deletePhoto(); |
247 | 248 |
this.removePhoto(); |
248 | 249 |
this.stakeholderFb.get('logoUrl').setValue(res.filename); |
250 |
console.debug(this.stakeholderFb.value); |
|
249 | 251 |
this.saveStakeholder(callback, errorCallback); |
250 | 252 |
}, error => { |
251 | 253 |
this.uploadError = "An error has been occurred during upload your image. Try again later"; |
... | ... | |
269 | 271 |
this.removePhoto(); |
270 | 272 |
this.subscriptions.push(this.stakeholderService.buildStakeholder(this.properties.monitorServiceAPIURL, |
271 | 273 |
this.stakeholderFb.value).subscribe(stakeholder => { |
272 |
UIkit.notification(stakeholder.name + '\'s has been <b>successfully created</b>', {
|
|
274 |
UIkit.notification(stakeholder.name + ' has been <b>successfully created</b>', { |
|
273 | 275 |
status: 'success', |
274 | 276 |
timeout: 6000, |
275 | 277 |
pos: 'bottom-right' |
... | ... | |
287 | 289 |
})); |
288 | 290 |
} else { |
289 | 291 |
this.stakeholderFb.get('type').enable(); |
290 |
this.stakeholderFb.get('alias').enable(); |
|
291 | 292 |
this.stakeholderFb.get('index_id').enable(); |
292 | 293 |
this.stakeholderFb.get('index_name').enable(); |
293 | 294 |
this.stakeholderFb.get('index_shortName').enable(); |
294 | 295 |
this.subscriptions.push(this.stakeholderService.saveElement(this.properties.monitorServiceAPIURL, this.stakeholderFb.value).subscribe(stakeholder => { |
295 |
UIkit.notification(stakeholder.name + '\'s has been <b>successfully saved</b>', {
|
|
296 |
UIkit.notification(stakeholder.name + ' has been <b>successfully saved</b>', { |
|
296 | 297 |
status: 'success', |
297 | 298 |
timeout: 6000, |
298 | 299 |
pos: 'bottom-right' |
Also available in: Unified diff
[Monitor Dashboard | Trunk]: Fix a bug when uploading logo from general component