From ad0a055fcfc152926de539133c514f0ae93aa0b9 Mon Sep 17 00:00:00 2001 From: Jose Alberto Hernandez Date: Mon, 12 Sep 2022 19:03:04 -0500 Subject: [PATCH] Management Loan tranches --- .../loans-account-terms-step.component.html | 287 +++++++++--------- .../loans-account-terms-step.component.ts | 4 + .../loan-product-settings-step.component.ts | 1 + 3 files changed, 149 insertions(+), 143 deletions(-) diff --git a/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.html b/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.html index 3b929c7e1..fc07e2221 100644 --- a/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.html +++ b/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.html @@ -1,102 +1,99 @@
-
+
- - Principal {{currencyDisplaySymbol}} - - - Principal is required - - + + Principal {{currencyDisplaySymbol}} + + + Principal is required + + -

Term Options

+

Term Options

- - Loan Term - - - Loan Term is required - - + + Loan Term + + + Loan Term is required + + - - Frequency - - - {{ type.value }} - - - - Frequency is required - - + + Frequency + + + {{ type.value }} + + + + Frequency is required + + - - Number of repayments - - - Number of repayments is required - - + + Number of repayments + + + Number of repayments is required + + - - First repayment on - - - - + + First repayment on + + + + -

Repaid Every

+

Repaid Every

- - Repaid every - - - Repaid every is required - - + + Repaid every + + + Repaid every is required + + - - Frequency - - - {{ repaymentFrequencyType.value }} - - - + + Frequency + + + {{ repaymentFrequencyType.value }} + + + - - Select On - - - {{ repaymentFrequencyNthDayType.value }} - - - + + Select On + + + {{ repaymentFrequencyNthDayType.value }} + + + - - Select Day - - - {{ repaymentFrequencyDayOfWeekType.value }} - - - + + Select Day + + + {{ repaymentFrequencyDayOfWeekType.value }} + + + - - Interest charged from - - - - + + Interest charged from + + + + @@ -105,20 +102,19 @@ - - Interest method - - - {{ interestType.value }} - - - + + Interest method + + + {{ interestType.value }} + + + - -

Is Equal Amortization

-
+ +

Is Equal Amortization

+
@@ -151,8 +147,7 @@ Amortization - + {{ amortizationType.value }} @@ -166,8 +161,7 @@ Interest calculation period - {{ interestCalculationPeriodType.value }} @@ -175,7 +169,7 @@ - +

Calculate interest for exact days in partial period

@@ -192,8 +186,7 @@ Repayment strategy - {{ transactionProcessingStrategy.name }} @@ -205,15 +198,15 @@

Moratorium

- + On Principal Payment - + On Interest Payment - + On Arreas Aging @@ -231,8 +224,7 @@ Loan closed with Topup - + {{ clientActiveLoan.accountNo }} @@ -270,7 +262,8 @@
Interest recalculation compounding on - {{ loansAccountTemplate?.interestRecalculationData.interestRecalculationCompoundingType.value }} + {{ loansAccountTemplate?.interestRecalculationData.interestRecalculationCompoundingType.value + }}
@@ -293,24 +286,30 @@ -
+
Frequency Interval for recalculation {{ loansAccountTemplate?.interestRecalculationData.recalculationRestFrequencyInterval}}
-

Loan Tranche Details

- - Maximum allowed outstanding balance - - - - - +
+

Loan Tranche Details

+ + Maximum allowed outstanding balance + + + + + +
+
+

Loan Tranche Details are not allowed for this Loan Product

+
@@ -329,9 +328,8 @@ @@ -348,7 +346,8 @@
Frequency for compounding - {{ loansAccountTemplate?.interestRecalculationData.recalculationCompoundingFrequencyType.value}} + {{ + loansAccountTemplate?.interestRecalculationData.recalculationCompoundingFrequencyType.value}} on {{ loansAccountTemplate?.interestRecalculationData.recalculationCompoundingFrequencyWeekday.value}} @@ -368,9 +367,11 @@ -
+
Frequency Interval for compounding - {{ loansAccountTemplate?.interestRecalculationData.recalculationCompoundingFrequencyInterval}} + {{ + loansAccountTemplate?.interestRecalculationData.recalculationCompoundingFrequencyInterval}}
@@ -423,19 +424,19 @@
Actions -
-
-
- - - -
+
+
+ + + +
diff --git a/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.ts b/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.ts index c7802ce21..82a56d627 100644 --- a/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.ts +++ b/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.ts @@ -214,6 +214,10 @@ export class LoansAccountTermsStepComponent implements OnInit, OnChanges { // this.setCustomValidators(); } + allowAddDisbursementDetails() { + return (this.multiDisburseLoan && !this.loansAccountTermsData.disallowExpectedDisbursements); + } + /** Custom Validators for the form */ setCustomValidators() { const repaymentFrequencyNthDayType = this.loansAccountTermsForm.get('repaymentFrequencyNthDayType'); diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.ts b/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.ts index b86a19273..a89673a6a 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.ts +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.ts @@ -317,6 +317,7 @@ export class LoanProductSettingsStepComponent implements OnInit { } else { this.loanProductSettingsForm.removeControl('maxTrancheCount'); this.loanProductSettingsForm.removeControl('outstandingLoanBalance'); + this.loanProductSettingsForm.patchValue({'disallowExpectedDisbursements': false}); } });