New input control for Transaction Amounts
This commit is contained in:
committed by
Jose Alberto Hernandez
parent
83f9a0e499
commit
9b51ec4694
+4
-9
@@ -19,15 +19,10 @@
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{"labels.inputs.Transaction Amount" | translate}}</mat-label>
|
||||
<span matTextSuffix class="m-l-10" *ngIf="dataObject.currency">{{ dataObject.currency.code }}</span>
|
||||
<span fxFlex="auto"></span>
|
||||
<input type="number" matInput required class="right-input" formControlName="transactionAmount">
|
||||
<mat-error *ngIf="recoveryRepaymentLoanForm.controls.transactionAmount.hasError('required')">
|
||||
{{"labels.inputs.Transaction Amount" | translate}} {{"labels.commons.is" | translate}} <strong>{{"labels.commons.required" | translate}}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
<mifosx-input-amount [currency]="currency" [isRequired]="true"
|
||||
[inputFormControl]="recoveryRepaymentLoanForm.controls.transactionAmount"
|
||||
[inputLabel]="'Transaction Amount'">
|
||||
</mifosx-input-amount>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{"labels.inputs.External Id" | translate}}</mat-label>
|
||||
|
||||
+6
@@ -7,6 +7,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { LoansService } from 'app/loans/loans.service';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
import { Currency } from 'app/shared/models/general.model';
|
||||
|
||||
/**
|
||||
* Loan Recovery Repayment Action
|
||||
@@ -31,6 +32,7 @@ export class RecoveryRepaymentComponent implements OnInit {
|
||||
maxDate = new Date();
|
||||
/** Recovery Repayment Loan Form */
|
||||
recoveryRepaymentLoanForm: UntypedFormGroup;
|
||||
currency: Currency | null = null;
|
||||
|
||||
/**
|
||||
* @param {FormBuilder} formBuilder Form Builder.
|
||||
@@ -56,6 +58,9 @@ export class RecoveryRepaymentComponent implements OnInit {
|
||||
this.maxDate = this.settingsService.businessDate;
|
||||
this.createRecoveryRepaymentLoanForm();
|
||||
this.setRecoveryRepaymentLoanDetails();
|
||||
if (this.dataObject.currency) {
|
||||
this.currency = this.dataObject.currency;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -114,6 +119,7 @@ export class RecoveryRepaymentComponent implements OnInit {
|
||||
dateFormat,
|
||||
locale
|
||||
};
|
||||
data['transactionAmount'] = data['transactionAmount'] * 1;
|
||||
this.loanService.submitLoanActionButton(this.loanId, data, 'recoverypayment')
|
||||
.subscribe((response: any) => {
|
||||
this.router.navigate(['../../general'], { relativeTo: this.route });
|
||||
|
||||
Reference in New Issue
Block a user