mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-1142] Process instance details - should show the comment componen (#2116)
* Add a comment button in the process details component has we have for the task details * Update process-instance-details.component.css * Update process-instance-details.component.html
This commit is contained in:
committed by
Eugenio Romano
parent
5be12c1b7d
commit
19835732a5
@@ -25,6 +25,8 @@ import { ProcessService } from './../services/process.service';
|
||||
import { ProcessInstanceHeaderComponent } from './process-instance-header.component';
|
||||
import { ProcessInstanceTasksComponent } from './process-instance-tasks.component';
|
||||
|
||||
declare let dialogPolyfill: any;
|
||||
|
||||
@Component({
|
||||
selector: 'adf-process-instance-details, activiti-process-instance-details',
|
||||
templateUrl: './process-instance-details.component.html',
|
||||
@@ -41,6 +43,9 @@ export class ProcessInstanceDetailsComponent implements OnChanges {
|
||||
@ViewChild(ProcessInstanceTasksComponent)
|
||||
tasksList: ProcessInstanceTasksComponent;
|
||||
|
||||
@ViewChild('dialogComments')
|
||||
commentsDialog: any;
|
||||
|
||||
@Input()
|
||||
showTitle: boolean = true;
|
||||
|
||||
@@ -104,6 +109,19 @@ export class ProcessInstanceDetailsComponent implements OnChanges {
|
||||
}
|
||||
}
|
||||
|
||||
public showCommentsDialog(): void {
|
||||
if (!this.commentsDialog.nativeElement.showModal) {
|
||||
dialogPolyfill.registerDialog(this.commentsDialog.nativeElement);
|
||||
}
|
||||
this.commentsDialog.nativeElement.showModal();
|
||||
}
|
||||
|
||||
public closeCommentsDialog(): void {
|
||||
if (this.commentsDialog) {
|
||||
this.commentsDialog.nativeElement.close();
|
||||
}
|
||||
}
|
||||
|
||||
isRunning(): boolean {
|
||||
return this.processInstanceDetails && !this.processInstanceDetails.ended;
|
||||
}
|
||||
|
Reference in New Issue
Block a user