Commit 85b7d118 authored by Alexander Philipp Nowosad's avatar Alexander Philipp Nowosad
Browse files

Add process pattern info modal

parent bbb22380
Pipeline #132977 failed with stages
in 10 seconds
......@@ -153,6 +153,30 @@
</div>
</ng-template>
<ng-template #patternInfoModal let-d="dismiss">
<div class="modal-header">
<h4 *ngIf="modalElement.businessObject.taskName" class="modal-title">
Overview of Task {{modalElement.businessObject.taskName}}
</h4>
<h4 *ngIf="!modalElement.businessObject.taskName" class="modal-title">
Overview of Pattern {{modalProcessPattern.name}}
</h4>
<button type="button" class="close" aria-label="Close" (click)="d()">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<table class="table mb-0">
<tbody>
<tr>
<th scope="row">Pattern Name</th>
<td>{{modalProcessPattern.name}}</td>
</tr>
</tbody>
</table>
</div>
</ng-template>
<div #canvas class="border" style="height: 500px"></div>
<div class="container">
<div class="my-3 p-3 bg-white rounded shadow-sm">
......
......@@ -47,6 +47,7 @@ export class BmProcessDiagramComponent implements DiagramComponentInterface, OnI
modalElement;
modalDevelopmentMethod: DevelopmentMethod;
modalProcessPattern: ProcessPattern;
modalProcessPatterns: ProcessPattern[];
private modalReference: NgbModalRef;
......@@ -54,6 +55,7 @@ export class BmProcessDiagramComponent implements DiagramComponentInterface, OnI
@ViewChild('addProcessPatternModal', {static: true}) addProcessPatternModal: any;
@ViewChild('deleteProcessPatternModal', {static: true}) deleteProcessPatternModal: any;
@ViewChild('methodInfoModal', {static: true}) methodInfoModal: any;
@ViewChild('patternInfoModal', {static: true}) patternInfoModal: any;
@ViewChild('selectDevelopmentMethodModal', {static: true}) selectDevelopmentMethodModal: any;
@ViewChild('selectProcessPatternModal', {static: true}) selectProcessPatternModal: any;
@ViewChild('showTypesModal', {static: true}) showTypesModal: any;
......@@ -77,6 +79,7 @@ export class BmProcessDiagramComponent implements DiagramComponentInterface, OnI
eventBus.on('bmp.selectPattern', (event, callActivityElement) => this.openSelectProcessPatternModal(callActivityElement));
eventBus.on('bmp.showTypes', (event, taskElement) => this.openShowTypesModal(taskElement));
eventBus.on('bmp.showMethod', (event, methodElement) => this.openMethodInfoModal(methodElement));
eventBus.on('bmp.showPattern', (event, processPatternElement) => this.openProcessPatternInfoModal(processPatternElement));
if (this.bmProcess) {
this.loadBmProcess(this.bmProcess, true);
}
......@@ -190,6 +193,16 @@ export class BmProcessDiagramComponent implements DiagramComponentInterface, OnI
);
}
openProcessPatternInfoModal(processPatternElement) {
this.modalElement = processPatternElement;
this.processPatternService.getProcessPattern(processPatternElement.businessObject.get('processPatternId')).then(
(pattern) => {
this.modalProcessPattern = pattern;
this.modalReference = this.modalService.open(this.patternInfoModal, {size: 'lg'});
}
);
}
openSelectProcessPatternModal(callActivityElement) {
const businessObject = callActivityElement.businessObject;
this.processPatternService.getValidProcessPatterns(
......
......@@ -14,6 +14,14 @@ export default class BmProcessContextPadProvider {
getContextPadEntries(element) {
const controls = {};
if (is(element, 'bpmn:SubProcess')) {
controls['bmp.showPattern'] = {
group: 'info',
className: 'fas fa-info-circle font-bpmn-adaption',
title: 'Show pattern details',
action: {
click: () => this.eventBus.fire('bmp.showPattern', element),
}
};
controls['bmp.deletePattern'] = {
group: 'edit',
className: 'far fa-trash-alt font-bpmn-adaption',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment