mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
Add the show diagram button (#2121)
This commit is contained in:
parent
aad7164042
commit
211a7f22b3
@ -8,6 +8,9 @@
|
||||
<div class="mdl-cell mdl-cell--4-col">
|
||||
<button type="button" md-button md-raised-button (click)="showCommentsDialog()">{{'DETAILS.LABELS.COMMENTS'|translate}}</button>
|
||||
</div>
|
||||
<div class="mdl-cell mdl-cell--4-col">
|
||||
<button id="show-diagram-button" type="button" md-button md-raised-button [disabled]="isDiagramDisabled()" (click)="onShowProcessDiagram(processInstanceId)">{{ 'DETAILS.BUTTON.SHOW_DIAGRAM' | translate }}</button>
|
||||
</div>
|
||||
<div class="mdl-card mdl-shadow--2dp activiti-process-container">
|
||||
<div class="mdl-cell mdl-cell--12-col">
|
||||
<adf-process-instance-tasks
|
||||
|
@ -126,6 +126,10 @@ export class ProcessInstanceDetailsComponent implements OnChanges {
|
||||
return this.processInstanceDetails && !this.processInstanceDetails.ended;
|
||||
}
|
||||
|
||||
isDiagramDisabled(): boolean {
|
||||
return !this.isRunning() ? true : undefined;
|
||||
}
|
||||
|
||||
cancelProcess() {
|
||||
this.activitiProcess.cancelProcess(this.processInstanceId).subscribe(
|
||||
(data) => {
|
||||
@ -158,8 +162,8 @@ export class ProcessInstanceDetailsComponent implements OnChanges {
|
||||
}
|
||||
}
|
||||
|
||||
onShowProcessDiagram(event: any) {
|
||||
this.showProcessDiagram.emit(event);
|
||||
onShowProcessDiagram(processInstanceId: any) {
|
||||
this.showProcessDiagram.emit({value: this.processInstanceId});
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user