[ADF-4471]Reload task header after claim/unclaim (#4875)

* Reload task header
This commit is contained in:
cristinaj
2019-07-13 18:29:51 +03:00
committed by Eugenio Romano
parent 6cedc59fdf
commit 48097c4d2a
2 changed files with 16 additions and 2 deletions

View File

@@ -15,9 +15,10 @@
* limitations under the License.
*/
import { Component } from '@angular/core';
import { Component, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { NotificationService } from '@alfresco/adf-core';
import { TaskHeaderCloudComponent } from '@alfresco/adf-process-services-cloud';
@Component({
templateUrl: './task-details-cloud-demo.component.html',
@@ -25,6 +26,9 @@ import { NotificationService } from '@alfresco/adf-core';
})
export class TaskDetailsCloudDemoComponent {
@ViewChild('taskHeader')
taskHeader: TaskHeaderCloudComponent;
taskId: string;
appName: string;
@@ -54,6 +58,14 @@ export class TaskDetailsCloudDemoComponent {
this.goBack();
}
onTaskClaimed() {
this.taskHeader.ngOnInit();
}
onTaskUnclaimed() {
this.taskHeader.ngOnInit();
}
onFormContentClicked(resourceId) {
this.router.navigate([`/cloud/${this.appName}/task-details/${this.taskId}/files/${resourceId.nodeId}/view`]);
}