mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +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:
parent
3d2e764d3d
commit
b8da5bf45b
@ -8,3 +8,10 @@
|
|||||||
overflow: visible;
|
overflow: visible;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.adf-comments-dialog {
|
||||||
|
position: fixed;
|
||||||
|
top: 50%;
|
||||||
|
transform: translate(0, -50%);
|
||||||
|
width: 40%;
|
||||||
|
}
|
||||||
|
@ -5,6 +5,9 @@
|
|||||||
[processInstance]="processInstanceDetails"
|
[processInstance]="processInstanceDetails"
|
||||||
(showProcessDiagram)="onShowProcessDiagram($event)">
|
(showProcessDiagram)="onShowProcessDiagram($event)">
|
||||||
</adf-process-instance-header>
|
</adf-process-instance-header>
|
||||||
|
<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-card mdl-shadow--2dp activiti-process-container">
|
<div class="mdl-card mdl-shadow--2dp activiti-process-container">
|
||||||
<div class="mdl-cell mdl-cell--12-col">
|
<div class="mdl-cell mdl-cell--12-col">
|
||||||
<adf-process-instance-tasks
|
<adf-process-instance-tasks
|
||||||
@ -16,4 +19,14 @@
|
|||||||
<div class="mdl-cell mdl-cell--4-col" data-automation-id="header-status" *ngIf="isRunning()">
|
<div class="mdl-cell mdl-cell--4-col" data-automation-id="header-status" *ngIf="isRunning()">
|
||||||
<button type="button" (click)="cancelProcess()" class="mdl-button">{{ 'DETAILS.BUTTON.CANCEL' | translate }}</button>
|
<button type="button" (click)="cancelProcess()" class="mdl-button">{{ 'DETAILS.BUTTON.CANCEL' | translate }}</button>
|
||||||
</div>
|
</div>
|
||||||
|
<dialog class="mdl-dialog adf-comments-dialog" #dialogComments>
|
||||||
|
<div class="mdl-dialog__content">
|
||||||
|
<adf-process-instance-comments #activiticomments
|
||||||
|
[readOnly]="!isRunning()"
|
||||||
|
[processInstanceId]="processInstanceDetails.id">
|
||||||
|
</adf-process-instance-comments>
|
||||||
|
<br><br>
|
||||||
|
<button type="button" md-button md-raised-button (click)="closeCommentsDialog()">{{ 'DETAILS.BUTTON.CLOSE' | translate }}</button>
|
||||||
|
</div>
|
||||||
|
</dialog>
|
||||||
</div>
|
</div>
|
||||||
|
@ -25,6 +25,8 @@ import { ProcessService } from './../services/process.service';
|
|||||||
import { ProcessInstanceHeaderComponent } from './process-instance-header.component';
|
import { ProcessInstanceHeaderComponent } from './process-instance-header.component';
|
||||||
import { ProcessInstanceTasksComponent } from './process-instance-tasks.component';
|
import { ProcessInstanceTasksComponent } from './process-instance-tasks.component';
|
||||||
|
|
||||||
|
declare let dialogPolyfill: any;
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-process-instance-details, activiti-process-instance-details',
|
selector: 'adf-process-instance-details, activiti-process-instance-details',
|
||||||
templateUrl: './process-instance-details.component.html',
|
templateUrl: './process-instance-details.component.html',
|
||||||
@ -41,6 +43,9 @@ export class ProcessInstanceDetailsComponent implements OnChanges {
|
|||||||
@ViewChild(ProcessInstanceTasksComponent)
|
@ViewChild(ProcessInstanceTasksComponent)
|
||||||
tasksList: ProcessInstanceTasksComponent;
|
tasksList: ProcessInstanceTasksComponent;
|
||||||
|
|
||||||
|
@ViewChild('dialogComments')
|
||||||
|
commentsDialog: any;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
showTitle: boolean = true;
|
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 {
|
isRunning(): boolean {
|
||||||
return this.processInstanceDetails && !this.processInstanceDetails.ended;
|
return this.processInstanceDetails && !this.processInstanceDetails.ended;
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
},
|
},
|
||||||
"BUTTON": {
|
"BUTTON": {
|
||||||
"CANCEL": "Cancel Process",
|
"CANCEL": "Cancel Process",
|
||||||
|
"CLOSE": "Close",
|
||||||
"SHOW_DIAGRAM": "Show Diagram",
|
"SHOW_DIAGRAM": "Show Diagram",
|
||||||
"DRAG-ATTACHMENT": "Drop Files Here...",
|
"DRAG-ATTACHMENT": "Drop Files Here...",
|
||||||
"UPLOAD-ATTACHMENT": "Upload Attachment"
|
"UPLOAD-ATTACHMENT": "Upload Attachment"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user