-
Notifications
You must be signed in to change notification settings - Fork 261
/
task-form-cloud.component.html
71 lines (69 loc) · 3.4 KB
/
task-form-cloud.component.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<div *ngIf="!loading; else loadingTemplate">
<adf-cloud-form *ngIf="hasForm(); else withoutForm"
[appName]="appName"
[appVersion]="taskDetails.appVersion"
[taskId]="taskId"
[showTitle]="showTitle"
[processInstanceId]="taskDetails.processInstanceId"
[readOnly]="isReadOnly()"
[showRefreshButton]="showRefreshButton"
[showValidationIcon]="showValidationIcon"
[showCompleteButton]="canCompleteTask()"
[showSaveButton]="canCompleteTask()"
(formSaved)="onFormSaved($event)"
(formCompleted)="onFormCompleted($event)"
(formError)="onError($event)"
(error)="onError($event)"
(formContentClicked)="onFormContentClicked($event)">
<adf-cloud-form-custom-outcomes>
<ng-template [ngTemplateOutlet]="taskFormCloudButtons">
</ng-template>
</adf-cloud-form-custom-outcomes>
</adf-cloud-form>
<ng-template #withoutForm>
<mat-card class="adf-task-form-container">
<mat-card-header *ngIf="showTitle">
<mat-card-title>
<h4>
<span class="adf-form-title">
{{ taskDetails?.name || 'FORM.FORM_RENDERER.NAMELESS_TASK' | translate }}
</span>
</h4>
</mat-card-title>
</mat-card-header>
<mat-card-content>
<adf-empty-content
[icon]="'description'"
[title]="'ADF_CLOUD_TASK_FORM.EMPTY_FORM.TITLE'"
[subtitle]="'ADF_CLOUD_TASK_FORM.EMPTY_FORM.SUBTITLE'">
</adf-empty-content>
</mat-card-content>
<mat-card-actions class="adf-task-form-actions">
<ng-template [ngTemplateOutlet]="taskFormCloudButtons">
</ng-template>
<button mat-button *ngIf="canCompleteTask()" adf-cloud-complete-task [appName]="appName"
[taskId]="taskId" (success)="onCompleteTask()" (error)="onError($event)" color="primary" id="adf-form-complete">
{{'ADF_CLOUD_TASK_FORM.EMPTY_FORM.BUTTONS.COMPLETE' | translate}}
</button>
</mat-card-actions>
</mat-card>
</ng-template>
<ng-template #taskFormCloudButtons>
<button mat-button *ngIf="showCancelButton" id="adf-cloud-cancel-task" (click)="onCancelClick()">
{{'ADF_CLOUD_TASK_FORM.EMPTY_FORM.BUTTONS.CANCEL' | translate}}
</button>
<button mat-button *ngIf="canClaimTask()" adf-cloud-claim-task [appName]="appName" [taskId]="taskId"
(success)="onClaimTask()" (error)="onError($event)">
{{'ADF_CLOUD_TASK_FORM.EMPTY_FORM.BUTTONS.CLAIM' | translate}}
</button>
<button mat-button *ngIf="hasCandidateUsersOrGroups()" adf-cloud-unclaim-task [appName]="appName" [taskId]="taskId"
(success)="onUnclaimTask()" (error)="onError($event)">
{{'ADF_CLOUD_TASK_FORM.EMPTY_FORM.BUTTONS.UNCLAIM' | translate}}
</button>
</ng-template>
</div>
<ng-template #loadingTemplate>
<div fxLayout="row" fxLayoutAlign="center stretch">
<mat-spinner></mat-spinner>
</div>
</ng-template>