From f0c8ddc306c56bb5dcdd259e8205054cbe133e0e Mon Sep 17 00:00:00 2001 From: Jose Alberto Hernandez Date: Tue, 23 Sep 2025 07:19:26 -0500 Subject: [PATCH] WEB-322: Re-aging: Interest handling configuration --- .../loan-action-button.resolver.ts | 4 +-- .../loan-reaging/loan-reaging.component.html | 27 ++++++++++++++++--- .../loan-reaging/loan-reaging.component.ts | 23 +++++++++++----- src/assets/translations/cs-CS.json | 5 +++- src/assets/translations/de-DE.json | 5 +++- src/assets/translations/en-US.json | 5 +++- src/assets/translations/es-CL.json | 5 +++- src/assets/translations/es-MX.json | 5 +++- src/assets/translations/fr-FR.json | 5 +++- src/assets/translations/it-IT.json | 5 +++- src/assets/translations/ko-KO.json | 5 +++- src/assets/translations/lt-LT.json | 5 +++- src/assets/translations/lv-LV.json | 5 +++- src/assets/translations/ne-NE.json | 5 +++- src/assets/translations/pt-PT.json | 5 +++- src/assets/translations/sw-SW.json | 5 +++- 16 files changed, 94 insertions(+), 25 deletions(-) diff --git a/src/app/loans/common-resolvers/loan-action-button.resolver.ts b/src/app/loans/common-resolvers/loan-action-button.resolver.ts index ed17c6810..d6cdd6887 100644 --- a/src/app/loans/common-resolvers/loan-action-button.resolver.ts +++ b/src/app/loans/common-resolvers/loan-action-button.resolver.ts @@ -79,8 +79,8 @@ export class LoanActionButtonResolver { return this.loansService.getLoanActionTemplate(loanId, 'contractTermination'); } else if (loanActionButton === 'Buy Down Fee') { return this.loansService.getLoanActionTemplate(loanId, 'buyDownFee'); - } else if (loanActionButton === 'Undo Write-off') { - return undefined; + } else if (loanActionButton === 'Re-Age') { + return this.loansService.getLoanActionTemplate(loanId, 'reAge'); } else { return undefined; } diff --git a/src/app/loans/loans-view/loan-account-actions/loan-reaging/loan-reaging.component.html b/src/app/loans/loans-view/loan-account-actions/loan-reaging/loan-reaging.component.html index 1037c0fa9..dbce4b31b 100644 --- a/src/app/loans/loans-view/loan-account-actions/loan-reaging/loan-reaging.component.html +++ b/src/app/loans/loans-view/loan-account-actions/loan-reaging/loan-reaging.component.html @@ -16,8 +16,8 @@ {{ 'labels.inputs.Frequency Type' | translate }} - - {{ frequencyType.value }} + + {{ frequencyType }} @@ -40,15 +40,36 @@ + + {{ 'labels.inputs.Interest Handling' | translate }} + + + {{ reAgeInterestHandlingOption.value | translateKey: 'catalogs' }} + + + + {{ 'labels.inputs.Reason' | translate }} - + + + {{ reAgeReasonOption.name }} + + {{ 'labels.inputs.External Id' | translate }} + + + {{ 'labels.inputs.Note' | translate }} + + diff --git a/src/app/loans/loans-view/loan-account-actions/loan-reaging/loan-reaging.component.ts b/src/app/loans/loans-view/loan-account-actions/loan-reaging/loan-reaging.component.ts index 42aaefc2f..03ceabb17 100644 --- a/src/app/loans/loans-view/loan-account-actions/loan-reaging/loan-reaging.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/loan-reaging/loan-reaging.component.ts @@ -1,8 +1,7 @@ import { Component, Input, OnInit } from '@angular/core'; -import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; -import { ActivatedRoute, Router, RouterLink } from '@angular/router'; +import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms'; +import { ActivatedRoute, Router } from '@angular/router'; import { Dates } from 'app/core/utils/dates'; -import { DropdownOptions } from 'app/core/utils/dropdownOptions'; import { LoansService } from 'app/loans/loans.service'; import { SettingsService } from 'app/settings/settings.service'; import { OptionData } from 'app/shared/models/option-data.model'; @@ -23,7 +22,9 @@ export class LoanReagingComponent implements OnInit { /** Repayment Loan Form */ reagingLoanForm: UntypedFormGroup; - frequencyOptions: OptionData[] = []; + reAgeReasonOptions: any[] = []; + periodFrequencyOptions: OptionData[] = []; + reAgeInterestHandlingOptions: OptionData[] = []; /** Minimum Date allowed. */ minDate = new Date(2000, 0, 1); @@ -35,16 +36,19 @@ export class LoanReagingComponent implements OnInit { private route: ActivatedRoute, private router: Router, private settingsService: SettingsService, - private dropdownOptions: DropdownOptions, private loanService: LoansService, private dateUtils: Dates ) { this.loanId = this.route.snapshot.params['loanId']; - this.frequencyOptions = this.dropdownOptions.retrievePeriodFrequencyTypeOptions(false); } ngOnInit(): void { this.maxDate = this.settingsService.maxFutureDate; + + this.reAgeReasonOptions = this.dataObject.reAgeReasonOptions; + this.reAgeInterestHandlingOptions = this.dataObject.reAgeInterestHandlingOptions; + this.periodFrequencyOptions = this.dataObject.periodFrequencyOptions; + this.createReagingLoanForm(); } @@ -66,8 +70,13 @@ export class LoanReagingComponent implements OnInit { , Validators.required ], + reAgeInterestHandling: [ + this.reAgeInterestHandlingOptions[0], + Validators.required + ], note: '', - externalId: '' + externalId: '', + reasonCodeValueId: null }); } diff --git a/src/assets/translations/cs-CS.json b/src/assets/translations/cs-CS.json index fc8cb5fc7..2497c345e 100644 --- a/src/assets/translations/cs-CS.json +++ b/src/assets/translations/cs-CS.json @@ -753,7 +753,9 @@ "Zero interest after charge-off": "Nulový úrok po nabití", "Accelerate maturity to charge-off date": "Urychlete splatnost do data odúčtování", "Full Leap Year": "Úplný přestupný rok", - "Feb 29 Period Only": "Pouze období 29. února" + "Feb 29 Period Only": "Pouze období 29. února", + "Waive Interest": "Vzdát se úroků", + "Equal Amortization of Outstanding amount": "Stejná amortizace dlužné částky" }, "commons": { "50 characters long": "50 znaků dlouhé", @@ -1760,6 +1762,7 @@ "Interest Earned Not Posted": "Získaný úrok nebyl zveřejněn", "Interest Free Period": "Bezúročné období", "Interest Grace Periods": "Doby odkladu úroků", + "Interest Handling": "Zpracování úroků", "Interest Method": "Zájmová metoda", "Interest Outstanding": "Neuvěřitelný zájem", "Interest Payable": "Zájem päyable", diff --git a/src/assets/translations/de-DE.json b/src/assets/translations/de-DE.json index d26202f54..5bf7c6df5 100644 --- a/src/assets/translations/de-DE.json +++ b/src/assets/translations/de-DE.json @@ -753,7 +753,9 @@ "Zero interest after charge-off": "Null Zinsen nach Abschreibung", "Accelerate maturity to charge-off date": "Fälligkeit bis zum Abschreibungsdatum beschleunigen", "Full Leap Year": "Volles Schaltjahr", - "Feb 29 Period Only": "Nur für den Zeitraum vom 29. Februar" + "Feb 29 Period Only": "Nur für den Zeitraum vom 29. Februar", + "Waive Interest": "Zinsen erlassen", + "Equal Amortization of Outstanding amount": "Gleichmäßige Amortisierung des ausstehenden Betrags" }, "commons": { "50 characters long": "50 Zeichen lang", @@ -1760,6 +1762,7 @@ "Interest Earned Not Posted": "Verdiente Zinsen wurden nicht gebucht", "Interest Free Period": "Zinsfreier Zeitraum", "Interest Grace Periods": "Zinsschonfristen", + "Interest Handling": "Zinsabwicklung", "Interest Method": "Zinsmethode", "Interest Outstanding": "Ausstehende Zinsen", "Interest Payable": "Interesse päylierbar", diff --git a/src/assets/translations/en-US.json b/src/assets/translations/en-US.json index 6ad10cb72..54681616a 100644 --- a/src/assets/translations/en-US.json +++ b/src/assets/translations/en-US.json @@ -756,7 +756,9 @@ "Zero interest after charge-off": "Zero interest after charge-off", "Accelerate maturity to charge-off date": "Accelerate maturity to charge-off date", "Full Leap Year": "Full Leap Year", - "Feb 29 Period Only": "Feb 29 Period Only" + "Feb 29 Period Only": "Feb 29 Period Only", + "Waive Interest": "Waive Interest", + "Equal Amortization of Outstanding amount": "Equal Amortization of Outstanding amount" }, "commons": { "50 characters long": "50 characters long", @@ -1765,6 +1767,7 @@ "Interest Earned Not Posted": "Interest Earned Not Posted", "Interest Free Period": "Interest Free Period", "Interest Grace Periods": "Interest Grace Periods", + "Interest Handling": "Interest Handling", "Interest Method": "Interest Method", "Interest Outstanding": "Interest Outstanding", "Interest Payable": "Interest Payable", diff --git a/src/assets/translations/es-CL.json b/src/assets/translations/es-CL.json index 23e5a45d4..a23ee0ff9 100644 --- a/src/assets/translations/es-CL.json +++ b/src/assets/translations/es-CL.json @@ -752,7 +752,9 @@ "Zero interest after charge-off": "Cero intereses después de la cancelación", "Accelerate maturity to charge-off date": "Acelerar el vencimiento hasta la fecha de amortización", "Full Leap Year": "Año bisiesto completo", - "Feb 29 Period Only": "Solo periodo del 29 de febrero" + "Feb 29 Period Only": "Solo periodo del 29 de febrero", + "Waive Interest": "Renunciar a los intereses", + "Equal Amortization of Outstanding amount": "Amortización igual del importe pendiente" }, "commons": { "50 characters long": "50 caracteres de largo", @@ -1759,6 +1761,7 @@ "Interest Earned Not Posted": "Intereses ganados no contabilizados", "Interest Free Period": "Periodo libre de intereses", "Interest Grace Periods": "Períodos de gracia de intereses", + "Interest Handling": "Manejo de intereses", "Interest Method": "Método de interés", "Interest Outstanding": "Interés pendiente", "Interest Payable": "Intereses a pagar", diff --git a/src/assets/translations/es-MX.json b/src/assets/translations/es-MX.json index e16294c18..b21916932 100644 --- a/src/assets/translations/es-MX.json +++ b/src/assets/translations/es-MX.json @@ -752,7 +752,9 @@ "Zero interest after charge-off": "Cero intereses después de la cancelación", "Accelerate maturity to charge-off date": "Acelerar el vencimiento hasta la fecha de amortización", "Full Leap Year": "Año bisiesto completo", - "Feb 29 Period Only": "Solo periodo del 29 de febrero" + "Feb 29 Period Only": "Solo periodo del 29 de febrero", + "Waive Interest": "Renunciar a los intereses", + "Equal Amortization of Outstanding amount": "Amortización igual del importe pendiente" }, "commons": { "50 characters long": "50 caracteres de largo", @@ -1759,6 +1761,7 @@ "Interest Earned Not Posted": "Intereses ganados no contabilizados", "Interest Free Period": "Periodo libre de intereses", "Interest Grace Periods": "Períodos de gracia de intereses", + "Interest Handling": "Manejo de intereses", "Interest Method": "Método de interés", "Interest Outstanding": "Interés pendiente", "Interest Payable": "Intereses a pagar", diff --git a/src/assets/translations/fr-FR.json b/src/assets/translations/fr-FR.json index 4fa9aea5c..07a599cbc 100644 --- a/src/assets/translations/fr-FR.json +++ b/src/assets/translations/fr-FR.json @@ -753,7 +753,9 @@ "Zero interest after charge-off": "Zéro intérêt après radiation", "Accelerate maturity to charge-off date": "Accélérer la maturité jusqu'à la date de radiation", "Full Leap Year": "Année bissextile complète", - "Feb 29 Period Only": "Période du 29 février seulement" + "Feb 29 Period Only": "Période du 29 février seulement", + "Waive Interest": "Renoncer aux intérêts", + "Equal Amortization of Outstanding amount": "Amortissement égal du montant restant dû" }, "commons": { "50 characters long": "50 caractères", @@ -1760,6 +1762,7 @@ "Interest Earned Not Posted": "Intérêts gagnés non comptabilisés", "Interest Free Period": "Période sans intérêt", "Interest Grace Periods": "Délais de grâce des intérêts", + "Interest Handling": "Gestion des intérêts", "Interest Method": "Méthode d'intérêt", "Interest Outstanding": "Intérêts impayés", "Interest Payable": "Intérêts payables", diff --git a/src/assets/translations/it-IT.json b/src/assets/translations/it-IT.json index ec2828e96..c0d1d130c 100644 --- a/src/assets/translations/it-IT.json +++ b/src/assets/translations/it-IT.json @@ -753,7 +753,9 @@ "Zero interest after charge-off": "Zero interessi dopo la cancellazione", "Accelerate maturity to charge-off date": "Accelerare la scadenza alla data di cancellazione", "Full Leap Year": "Anno bisestile completo", - "Feb 29 Period Only": "Solo periodo del 29 febbraio" + "Feb 29 Period Only": "Solo periodo del 29 febbraio", + "Waive Interest": "Rinuncia agli interessi", + "Equal Amortization of Outstanding amount": "Ammortamento pari all'importo in sospeso" }, "commons": { "50 characters long": "50 caratteri di lunghezza", @@ -1760,6 +1762,7 @@ "Interest Earned Not Posted": "Interessi maturati non pubblicati", "Interest Free Period": "Periodo senza interessi", "Interest Grace Periods": "Periodi di grazia degli interessi", + "Interest Handling": "Gestione degli interessi", "Interest Method": "Metodo degli interessi", "Interest Outstanding": "Interessi in sospeso", "Interest Payable": "Interesse päyable", diff --git a/src/assets/translations/ko-KO.json b/src/assets/translations/ko-KO.json index d1d40d7da..1a7a9f8dd 100644 --- a/src/assets/translations/ko-KO.json +++ b/src/assets/translations/ko-KO.json @@ -753,7 +753,9 @@ "Zero interest after charge-off": "대손충당 후 이자 없음", "Accelerate maturity to charge-off date": "만기일을 대금상환일로 앞당기세요", "Full Leap Year": "전체 윤년", - "Feb 29 Period Only": "2월 29일 기간만" + "Feb 29 Period Only": "2월 29일 기간만", + "Waive Interest": "이자 면제", + "Equal Amortization of Outstanding amount": "미지급 금액의 균등 상각" }, "commons": { "50 characters long": "50자(영문 기준)", @@ -1761,6 +1763,7 @@ "Interest Earned Not Posted": "발생한 이자 미게시", "Interest Free Period": "무이자 기간", "Interest Grace Periods": "이자 유예 기간", + "Interest Handling": "이자 처리", "Interest Method": "이자방식", "Interest Outstanding": "미결제 이자", "Interest Payable": "관심있는 관심", diff --git a/src/assets/translations/lt-LT.json b/src/assets/translations/lt-LT.json index a2a83f51e..febdefe2f 100644 --- a/src/assets/translations/lt-LT.json +++ b/src/assets/translations/lt-LT.json @@ -753,7 +753,9 @@ "Zero interest after charge-off": "Nulinės palūkanos po apmokestinimo", "Accelerate maturity to charge-off date": "Paspartinkite terminą iki nurašymo datos", "Full Leap Year": "Visi keliamieji metai", - "Feb 29 Period Only": "Tik vasario 29 d" + "Feb 29 Period Only": "Tik vasario 29 d", + "Waive Interest": "Atsisakyti palūkanų", + "Equal Amortization of Outstanding amount": "Lygi neapmokėtos sumos amortizacija" }, "commons": { "50 characters long": "50 simbolių ilgio", @@ -1760,6 +1762,7 @@ "Interest Earned Not Posted": "Uždirbtos palūkanos nepaskelbtos", "Interest Free Period": "Laikotarpis be palūkanų", "Interest Grace Periods": "Palūkanų lengvatinis laikotarpis", + "Interest Handling": "Interesų valdymas", "Interest Method": "Palūkanų metodas", "Interest Outstanding": "Susidomėjimas išskirtinis", "Interest Payable": "Mokėtinos palūkanos", diff --git a/src/assets/translations/lv-LV.json b/src/assets/translations/lv-LV.json index 7f92c8283..86a21d133 100644 --- a/src/assets/translations/lv-LV.json +++ b/src/assets/translations/lv-LV.json @@ -753,7 +753,9 @@ "Zero interest after charge-off": "Nulle procenti pēc atskaitīšanas", "Accelerate maturity to charge-off date": "Paātriniet dzēšanas termiņu līdz izņemšanas datumam", "Full Leap Year": "Pilns lēciens gads", - "Feb 29 Period Only": "Tikai 29. februāris" + "Feb 29 Period Only": "Tikai 29. februāris", + "Waive Interest": "Atteikties no procentiem", + "Equal Amortization of Outstanding amount": "Neizmaksātās summas vienāda amortizācija" }, "commons": { "50 characters long": "50 rakstzīmes garš", @@ -1760,6 +1762,7 @@ "Interest Earned Not Posted": "Nopelnītie procenti nav publicēti", "Interest Free Period": "Periods bez procentiem", "Interest Grace Periods": "Procentu labvēlības periodi", + "Interest Handling": "Interešu apstrāde", "Interest Method": "Interešu metode", "Interest Outstanding": "Interese Izcila", "Interest Payable": "Procenti Päyable", diff --git a/src/assets/translations/ne-NE.json b/src/assets/translations/ne-NE.json index 808c48152..ca3778159 100644 --- a/src/assets/translations/ne-NE.json +++ b/src/assets/translations/ne-NE.json @@ -753,7 +753,9 @@ "Zero interest after charge-off": "चार्ज अफ पछि शून्य ब्याज", "Accelerate maturity to charge-off date": "चार्ज अफ मितिमा परिपक्वतालाई गति दिनुहोस्", "Full Leap Year": "पूर्ण छलांग वर्ष", - "Feb 29 Period Only": "फेब्रुअरी 29 अवधि मात्र" + "Feb 29 Period Only": "फेब्रुअरी 29 अवधि मात्र", + "Waive Interest": "ब्याज माफ गर्नुहोस्", + "Equal Amortization of Outstanding amount": "बकाया रकमको समान परिशोधन" }, "commons": { "50 characters long": "५० वर्ण लामो", @@ -1760,6 +1762,7 @@ "Interest Earned Not Posted": "कमाएको ब्याज पोस्ट गरिएको छैन", "Interest Free Period": "ब्याज मुक्त अवधि", "Interest Grace Periods": "ब्याज अनुग्रह अवधिहरू", + "Interest Handling": "ब्याज ह्यान्डलिङ", "Interest Method": "ब्याज विधि", "Interest Outstanding": "बकाया ब्याज", "Interest Payable": "ब्याज päyy", diff --git a/src/assets/translations/pt-PT.json b/src/assets/translations/pt-PT.json index 7d4fb4378..ad8bece08 100644 --- a/src/assets/translations/pt-PT.json +++ b/src/assets/translations/pt-PT.json @@ -753,7 +753,9 @@ "Zero interest after charge-off": "Juros zero após baixa", "Accelerate maturity to charge-off date": "Acelerar o vencimento até à data de baixa", "Full Leap Year": "Ano bissexto completo", - "Feb 29 Period Only": "Somente período de 29 de fevereiro" + "Feb 29 Period Only": "Somente período de 29 de fevereiro", + "Waive Interest": "Renúncia de juros", + "Equal Amortization of Outstanding amount": "Amortização igual do valor em dívida" }, "commons": { "50 characters long": "50 caracteres", @@ -1760,6 +1762,7 @@ "Interest Earned Not Posted": "Juros ganhos não lançados", "Interest Free Period": "Período sem juros", "Interest Grace Periods": "Períodos de carência de juros", + "Interest Handling": "Tratamento de juros", "Interest Method": "Método de juros", "Interest Outstanding": "Juros pendentes", "Interest Payable": "Juros a pagar", diff --git a/src/assets/translations/sw-SW.json b/src/assets/translations/sw-SW.json index 7b0d7e32d..e6b517ae7 100644 --- a/src/assets/translations/sw-SW.json +++ b/src/assets/translations/sw-SW.json @@ -753,7 +753,9 @@ "Zero interest after charge-off": "Riba sifuri baada ya kutozwa", "Accelerate maturity to charge-off date": "Kuharakisha ukomavu hadi tarehe ya kukomesha malipo", "Full Leap Year": "Mwaka Kamili wa Kurukaruka", - "Feb 29 Period Only": "Feb 29 Kipindi Pekee" + "Feb 29 Period Only": "Feb 29 Kipindi Pekee", + "Waive Interest": "Ondoa Maslahi", + "Equal Amortization of Outstanding amount": "Ulipaji Sawa wa Madeni ya Kiasi Kinachodaiwa" }, "commons": { "50 characters long": "Urefu wa herufi 50", @@ -1760,6 +1762,7 @@ "Interest Earned Not Posted": "Riba Imepatikana Haijatumwa", "Interest Free Period": "Kipindi Bila Riba", "Interest Grace Periods": "Vipindi vya Neema vya Riba", + "Interest Handling": "Ushughulikiaji wa Maslahi", "Interest Method": "Mbinu ya Maslahi", "Interest Outstanding": "Maslahi Bora", "Interest Payable": "Riba inaelezewa",