| <!-- |
| 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 #transactionStep label="{{'Transaction' | translate}}" |
| [state]="form.valid ? 'complete' : form.pristine ? 'none' : 'required'" [disabled]="transactionCreated"> |
| <form [formGroup]="form" layout="column"> |
| <mat-form-field layout-margin> |
| <mat-select formControlName="caseInstance" placeholder="{{ 'Select account' | translate }}"> |
| <mat-option *ngFor="let instance of caseInstances" [value]="instance"> |
| {{instance.customerLoanAccountIdentifier}}({{instance.productIdentifier}}) |
| </mat-option> |
| </mat-select> |
| </mat-form-field> |
| <fims-text-input type="number" [form]="form" controlName="amount" placeholder="{{'Repayment amount' | translate}}"></fims-text-input> |
| <p>Expected payment: {{paymentHint}}</p> |
| </form> |
| <ng-template td-step-actions> |
| <button mat-raised-button color="primary" (click)="createTransaction()" [disabled]="createTransactionDisabled">{{'CREATE TRANSACTION' | translate}}</button> |
| <span flex></span> |
| <button mat-button (click)="cancel()" [disabled]="transactionCreated">{{'CANCEL' | translate}}</button> |
| </ng-template> |
| </td-step> |
| <td-step #confirmationStep label="{{'Confirmation' | translate}}"> |
| <div layout-gt-xs="row" layout-align="center center"> |
| <div layout-gt-xs="row" flex-gt-xs="90" layout-margin> |
| <div flex-gt-xs="25"></div> |
| <div flex-gt-xs="50"> |
| <h3 translate>Costs</h3> |
| <fims-teller-transaction-cost |
| [transactionAmount]="form.get('amount').value" |
| [transactionCosts]="transactionCosts"> |
| </fims-teller-transaction-cost> |
| <div layout="row" layout-margin> |
| <mat-checkbox [(ngModel)]="chargesIncluded" [disabled]="true" translate>Fees are paid in cash</mat-checkbox> |
| </div> |
| </div> |
| </div> |
| </div> |
| </td-step> |
| <td-step label="{{'Final step' | translate}}" [state]="'complete'"> |
| <ng-template td-step-summary> |
| <button mat-raised-button color="primary" [disabled]="!transactionCreated" (click)="confirmTransaction(chargesIncluded)">{{'CONFIRM TRANSACTION' | translate}}</button> |
| <span flex></span> |
| <button mat-button [disabled]="!transactionCreated" (click)="cancelTransaction()">{{'CANCEL TRANSACTION' | translate}}</button> |
| </ng-template> |
| </td-step> |
| </td-steps> |