mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
[ADF-4979] TaskHeaderCloudComponent Add error emit when appName or taskId is not provided (#5236)
* [ADF-4979] Add error emit when appName or taskId are not provided in TaskHeaderCloudComponent * [ADF-4979] Modify @Output description * [ADF-4979] Remove unused onObservable complete code
This commit is contained in:
committed by
Maurizio Vitale
parent
63d640425e
commit
878b49fea1
@@ -57,9 +57,9 @@ export class TaskHeaderCloudComponent implements OnInit, OnDestroy, OnChanges {
|
||||
@Output()
|
||||
unclaim: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
/** Emitted when the task has not been found. */
|
||||
/** Emitted when the given task has errors. */
|
||||
@Output()
|
||||
taskError: EventEmitter<any> = new EventEmitter<any>();
|
||||
error: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
taskDetails: TaskDetailsCloudModel = new TaskDetailsCloudModel();
|
||||
properties: CardViewItem[];
|
||||
@@ -99,6 +99,8 @@ export class TaskHeaderCloudComponent implements OnInit, OnDestroy, OnChanges {
|
||||
this.taskDetails = new TaskDetailsCloudModel();
|
||||
if (this.appName && this.taskId) {
|
||||
this.loadTaskDetailsById(this.appName, this.taskId);
|
||||
} else {
|
||||
this.error.emit('App Name and Task Id are mandatory');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +114,7 @@ export class TaskHeaderCloudComponent implements OnInit, OnDestroy, OnChanges {
|
||||
this.refreshData();
|
||||
}
|
||||
},
|
||||
(err) => this.taskError.emit(err), () => {});
|
||||
(err) => this.error.emit(err));
|
||||
}
|
||||
|
||||
private initDefaultProperties() {
|
||||
|
Reference in New Issue
Block a user