mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
Merge pull request #1261 from Alfresco/dev-wabson-1140
Check that the process has a start form before attempting to display it
This commit is contained in:
commit
94124c2537
@ -28,7 +28,7 @@
|
||||
{{ 'DETAILS.TASKS.NO_ACTIVE' | translate }}
|
||||
</div>
|
||||
|
||||
<div *ngIf="processInstanceDetails && processInstanceDetails.startFormDefined">
|
||||
<div *ngIf="hasStartFormDefined()">
|
||||
<span class="activiti-label">{{ 'DETAILS.LABELS.START_FORM'|translate }}</span>
|
||||
|
||||
<!--IF START TASK COMPLETED -->
|
||||
@ -78,7 +78,7 @@
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
<dialog class="mdl-dialog task-details-dialog" #startDialog>
|
||||
<dialog *ngIf="hasStartFormDefined()" class="mdl-dialog task-details-dialog" #startDialog>
|
||||
<h4 class="mdl-dialog__title">{{ 'DETAILS.LABELS.START_FORM'|translate }}</h4>
|
||||
<div class="mdl-dialog__content form__size">
|
||||
<activiti-start-form [processId]="processId" [processDefinitionId]="processInstanceDetails?.processDefinitionId"
|
||||
|
@ -134,6 +134,10 @@ export class ActivitiProcessInstanceTasks implements OnInit, OnChanges {
|
||||
}
|
||||
}
|
||||
|
||||
hasStartFormDefined(): boolean {
|
||||
return this.processInstanceDetails && this.processInstanceDetails.startFormDefined === true;
|
||||
}
|
||||
|
||||
getUserFullName(user: any) {
|
||||
if (user) {
|
||||
return (user.firstName && user.firstName !== 'null'
|
||||
|
@ -18,10 +18,10 @@
|
||||
<label class="mdl-textfield__label" for="processName">{{'START_PROCESS.DIALOG.LABEL.NAME'|translate}}</label>
|
||||
</div>
|
||||
<activiti-start-form *ngIf="hasStartForm()" [processDefinitionId]="currentProcessDef.id"
|
||||
(formSaved)='onFormSaved($event)'
|
||||
(formCompleted)='onFormCompleted($event)'
|
||||
(formLoaded)='onFormLoaded($event)'
|
||||
(onError)='onFormError($event)'>
|
||||
(formSaved)="onFormSaved($event)"
|
||||
(formCompleted)="onFormCompleted($event)"
|
||||
(formLoaded)="onFormLoaded($event)"
|
||||
(onError)="onFormError($event)">
|
||||
</activiti-start-form>
|
||||
</div>
|
||||
<div class="mdl-card__actions mdl-card--border" *ngIf="showStartButton">
|
||||
|
Loading…
x
Reference in New Issue
Block a user