| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <td-steps mode="'vertical'"> |
| <td-step #detailsStep label="{{'Task details' | translate}}" [state]="detailForm.valid ? 'complete' : detailForm.pristine ? 'none' : 'required'"> |
| <form [formGroup]="detailForm" layout="column"> |
| <fims-id-input flex [form]="detailForm" controlName="identifier" [readonly]="editMode"></fims-id-input> |
| <fims-text-input [form]="detailForm" controlName="name" placeholder="{{'Name' | translate}}"></fims-text-input> |
| <mat-form-field layout-margin flex> |
| <textarea matInput placeholder="{{'Description' | translate}}" formControlName="description"></textarea> |
| </mat-form-field> |
| <mat-checkbox formControlName="mandatory" layout-margin translate> |
| Mandatory |
| </mat-checkbox> |
| <mat-checkbox formControlName="fourEyes" layout-margin translate> |
| Four eyes |
| </mat-checkbox> |
| <div layout-gt-xs="column" layout-margin formArrayName="actions"> |
| <h4 translate>Task needs to be executed, before loan</h4> |
| <div *ngFor="let address of actions; let i=index" layout="row" [formGroupName]="i"> |
| <mat-form-field> |
| <mat-select formControlName="action"> |
| <mat-option *ngFor="let actionOption of actionOptions" [value]="actionOption.type"> |
| {{actionOption.label}} |
| </mat-option> |
| </mat-select> |
| </mat-form-field> |
| <button mat-button (click)="removeAction(i)">{{'Remove' | translate}}</button> |
| </div> |
| <button mat-button (click)="addAction()">{{'Add action' | translate}}</button> |
| </div> |
| </form> |
| <ng-template td-step-actions> |
| <fims-form-final-action |
| [resourceName]="'TASK'" |
| [editMode]="editMode" |
| [disabled]="!detailForm.valid" |
| (onCancel)="cancel()" |
| (onSave)="save()"> |
| </fims-form-final-action> |
| </ng-template> |
| </td-step> |
| </td-steps> |