Commit 0708857c authored by Alexander Philipp Nowosad's avatar Alexander Philipp Nowosad
Browse files

Add show method info

parent 7a03cf47
Pipeline #127904 passed with stages
in 6 minutes and 58 seconds
......@@ -92,6 +92,29 @@
</div>
</ng-template>
<ng-template #methodInfoModal let-d="dismiss">
<div class="modal-header">
<h4 class="modal-title">Overview of Task {{modalElement.businessObject.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">
<tbody>
<tr>
<th scope="row">Method Name</th>
<td>{{modalElement.businessObject.get('method').get('name')}}</td>
</tr>
<tr>
<th scope="row">Method Description</th>
<td>{{modalElement.businessObject.get('method').get('description')}}</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">
......
......@@ -32,6 +32,7 @@ export class BmProcessDiagramComponent implements OnInit, AfterContentInit, OnDe
@ViewChild('canvas', {static: true}) canvas: ElementRef<HTMLDivElement>;
@ViewChild('addProcessPatternModal', {static: true}) addProcessPatternModal: any;
@ViewChild('deleteProcessPatternModal', {static: true}) deleteProcessPatternModal: any;
@ViewChild('methodInfoModal', {static: true}) methodInfoModal: any;
@ViewChild('selectDevelopmentMethodModal', {static: true}) selectDevelopmentMethodModal: any;
@ViewChild('showCategoriesModal', {static: true}) showCategoriesModal: any;
......@@ -51,6 +52,7 @@ export class BmProcessDiagramComponent implements OnInit, AfterContentInit, OnDe
eventBus.on('bmp.processPatterns', (event, businessObject) => this.openAddProcessPatternModal(businessObject));
eventBus.on('bmp.selectMethod', (event, taskElement) => this.openSelectDevelopmentMethodModal(taskElement));
eventBus.on('bmp.showCategories', (event, taskElement) => this.openShowCategoriesModal(taskElement));
eventBus.on('bmp.showMethod', (event, methodElement) => this.openMethodInfoModal(methodElement));
if (this.bmProcess) {
this.loadBmProcess(this.bmProcess);
}
......@@ -135,6 +137,11 @@ export class BmProcessDiagramComponent implements OnInit, AfterContentInit, OnDe
});
}
openMethodInfoModal(methodElement) {
this.modalElement = methodElement;
this.modalReference = this.modalService.open(this.methodInfoModal, {size: 'lg'});
}
save() {
this.modeler.saveXML().then(result => this.saveBmProcess.emit(result.xml));
}
......
......@@ -50,6 +50,16 @@ export default class BmProcessContextPadProvider {
click: () => this.eventBus.fire('bmp.selectMethod', element),
}
};
if (element.businessObject.method) {
controls['bmp.showMethod'] = {
group: 'info',
className: 'bpmn-icon-service',
title: 'Show method details',
action: {
click: () => this.eventBus.fire('bmp.showMethod', element),
}
};
}
}
return controls;
}
......
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