From 08938c93df5b44bc6cb5c97a38cd1c08432f981a Mon Sep 17 00:00:00 2001 From: Jose Alberto Hernandez Date: Tue, 8 Jul 2025 08:54:07 -0500 Subject: [PATCH] Loan Buy Down Fee transaction only when the Loan has enable this feature --- .../make-repayment.component.ts | 12 ++-- .../loans/loans-view/loans-view.component.ts | 14 ++-- .../transactions-tab.component.html | 4 +- .../transactions-tab.component.ts | 68 +++++++++++++++++++ src/assets/translations/de-DE.json | 4 +- src/assets/translations/es-CL.json | 2 +- src/assets/translations/es-MX.json | 2 +- src/assets/translations/fr-FR.json | 2 +- src/assets/translations/ko-KO.json | 2 +- src/assets/translations/lt-LT.json | 2 +- src/assets/translations/lv-LV.json | 2 +- src/assets/translations/ne-NE.json | 2 +- src/assets/translations/pt-PT.json | 2 +- 13 files changed, 92 insertions(+), 26 deletions(-) diff --git a/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.ts b/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.ts index 2afb22ef1..21679a7ba 100644 --- a/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.ts @@ -1,13 +1,7 @@ /** Angular Imports */ import { Component, OnInit, Input } from '@angular/core'; -import { - UntypedFormGroup, - UntypedFormBuilder, - Validators, - UntypedFormControl, - ReactiveFormsModule -} from '@angular/forms'; -import { ActivatedRoute, Router, RouterLink } from '@angular/router'; +import { UntypedFormGroup, UntypedFormBuilder, Validators, UntypedFormControl } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; /** Custom Services */ import { LoansService } from 'app/loans/loans.service'; @@ -77,6 +71,8 @@ export class MakeRepaymentComponent implements OnInit { */ ngOnInit() { this.command = this.dataObject.type.code.split('.')[1]; + console.log(this.command); + console.log(this.dataObject.type); this.maxDate = this.settingsService.businessDate; this.createRepaymentLoanForm(); this.setRepaymentLoanDetails(); diff --git a/src/app/loans/loans-view/loans-view.component.ts b/src/app/loans/loans-view/loans-view.component.ts index 8e65bdbc7..7a1edb4c0 100644 --- a/src/app/loans/loans-view/loans-view.component.ts +++ b/src/app/loans/loans-view/loans-view.component.ts @@ -183,16 +183,18 @@ export class LoansViewComponent implements OnInit { taskPermissionName: 'DISBURSE_LOAN' }); } else if (this.status === 'Active') { - this.buttonConfig.addButton({ - name: 'Buy Down Fee', - icon: 'plus', - taskPermissionName: 'BUY_DOWN_FEE_LOAN' - }); + if (this.loanDetailsData.enableBuyDownFee) { + this.buttonConfig.addButton({ + name: 'Buy Down Fee', + icon: 'plus', + taskPermissionName: 'BUYDOWNFEE_LOAN' + }); + } if (this.loanDetailsData.enableIncomeCapitalization) { this.buttonConfig.addButton({ name: 'Capitalized Income', icon: 'coins', - taskPermissionName: 'CAPITALIZED_INCOME_LOAN' + taskPermissionName: 'CAPITALIZEDINCOME_LOAN' }); } diff --git a/src/app/loans/loans-view/transactions-tab/transactions-tab.component.html b/src/app/loans/loans-view/transactions-tab/transactions-tab.component.html index 5839990dc..a8a24fa99 100644 --- a/src/app/loans/loans-view/transactions-tab/transactions-tab.component.html +++ b/src/app/loans/loans-view/transactions-tab/transactions-tab.component.html @@ -197,7 +197,7 @@