Skip to content

Commit 5bbf0ce

Browse files
authored
Merge pull request #2678 from alberto-art3ch/WEB-322/re-aging-for-interest-bearing-products
WEB-322: Re-aging: Interest handling configuration
2 parents eccca92 + f0c8ddc commit 5bbf0ce

File tree

16 files changed

+94
-25
lines changed

16 files changed

+94
-25
lines changed

src/app/loans/common-resolvers/loan-action-button.resolver.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ export class LoanActionButtonResolver {
7979
return this.loansService.getLoanActionTemplate(loanId, 'contractTermination');
8080
} else if (loanActionButton === 'Buy Down Fee') {
8181
return this.loansService.getLoanActionTemplate(loanId, 'buyDownFee');
82-
} else if (loanActionButton === 'Undo Write-off') {
83-
return undefined;
82+
} else if (loanActionButton === 'Re-Age') {
83+
return this.loansService.getLoanActionTemplate(loanId, 'reAge');
8484
} else {
8585
return undefined;
8686
}

src/app/loans/loans-view/loan-account-actions/loan-reaging/loan-reaging.component.html

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
<mat-form-field>
1717
<mat-label>{{ 'labels.inputs.Frequency Type' | translate }}</mat-label>
1818
<mat-select formControlName="frequencyType">
19-
<mat-option *ngFor="let frequencyType of frequencyOptions" [value]="frequencyType.code">
20-
{{ frequencyType.value }}
19+
<mat-option *ngFor="let frequencyType of periodFrequencyOptions" [value]="frequencyType">
20+
{{ frequencyType }}
2121
</mat-option>
2222
</mat-select>
2323
</mat-form-field>
@@ -40,15 +40,36 @@
4040
</mat-error>
4141
</mat-form-field>
4242

43+
<mat-form-field>
44+
<mat-label>{{ 'labels.inputs.Interest Handling' | translate }}</mat-label>
45+
<mat-select formControlName="reAgeInterestHandling">
46+
<mat-option
47+
*ngFor="let reAgeInterestHandlingOption of reAgeInterestHandlingOptions"
48+
[value]="reAgeInterestHandlingOption.code"
49+
>
50+
{{ reAgeInterestHandlingOption.value | translateKey: 'catalogs' }}
51+
</mat-option>
52+
</mat-select>
53+
</mat-form-field>
54+
4355
<mat-form-field>
4456
<mat-label>{{ 'labels.inputs.Reason' | translate }}</mat-label>
45-
<input matInput formControlName="note" />
57+
<mat-select formControlName="reasonCodeValueId">
58+
<mat-option *ngFor="let reAgeReasonOption of reAgeReasonOptions" [value]="reAgeReasonOption.id">
59+
{{ reAgeReasonOption.name }}
60+
</mat-option>
61+
</mat-select>
4662
</mat-form-field>
4763

4864
<mat-form-field>
4965
<mat-label>{{ 'labels.inputs.External Id' | translate }}</mat-label>
5066
<input matInput formControlName="externalId" />
5167
</mat-form-field>
68+
69+
<mat-form-field>
70+
<mat-label>{{ 'labels.inputs.Note' | translate }}</mat-label>
71+
<input matInput formControlName="note" />
72+
</mat-form-field>
5273
</div>
5374

5475
<mat-card-actions class="layout-row align-center gap-5px responsive-column">

src/app/loans/loans-view/loan-account-actions/loan-reaging/loan-reaging.component.ts

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { Component, Input, OnInit } from '@angular/core';
2-
import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
3-
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
2+
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
3+
import { ActivatedRoute, Router } from '@angular/router';
44
import { Dates } from 'app/core/utils/dates';
5-
import { DropdownOptions } from 'app/core/utils/dropdownOptions';
65
import { LoansService } from 'app/loans/loans.service';
76
import { SettingsService } from 'app/settings/settings.service';
87
import { OptionData } from 'app/shared/models/option-data.model';
@@ -23,7 +22,9 @@ export class LoanReagingComponent implements OnInit {
2322
/** Repayment Loan Form */
2423
reagingLoanForm: UntypedFormGroup;
2524

26-
frequencyOptions: OptionData[] = [];
25+
reAgeReasonOptions: any[] = [];
26+
periodFrequencyOptions: OptionData[] = [];
27+
reAgeInterestHandlingOptions: OptionData[] = [];
2728

2829
/** Minimum Date allowed. */
2930
minDate = new Date(2000, 0, 1);
@@ -35,16 +36,19 @@ export class LoanReagingComponent implements OnInit {
3536
private route: ActivatedRoute,
3637
private router: Router,
3738
private settingsService: SettingsService,
38-
private dropdownOptions: DropdownOptions,
3939
private loanService: LoansService,
4040
private dateUtils: Dates
4141
) {
4242
this.loanId = this.route.snapshot.params['loanId'];
43-
this.frequencyOptions = this.dropdownOptions.retrievePeriodFrequencyTypeOptions(false);
4443
}
4544

4645
ngOnInit(): void {
4746
this.maxDate = this.settingsService.maxFutureDate;
47+
48+
this.reAgeReasonOptions = this.dataObject.reAgeReasonOptions;
49+
this.reAgeInterestHandlingOptions = this.dataObject.reAgeInterestHandlingOptions;
50+
this.periodFrequencyOptions = this.dataObject.periodFrequencyOptions;
51+
4852
this.createReagingLoanForm();
4953
}
5054

@@ -66,8 +70,13 @@ export class LoanReagingComponent implements OnInit {
6670
,
6771
Validators.required
6872
],
73+
reAgeInterestHandling: [
74+
this.reAgeInterestHandlingOptions[0],
75+
Validators.required
76+
],
6977
note: '',
70-
externalId: ''
78+
externalId: '',
79+
reasonCodeValueId: null
7180
});
7281
}
7382

src/assets/translations/cs-CS.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,9 @@
753753
"Zero interest after charge-off": "Nulový úrok po nabití",
754754
"Accelerate maturity to charge-off date": "Urychlete splatnost do data odúčtování",
755755
"Full Leap Year": "Úplný přestupný rok",
756-
"Feb 29 Period Only": "Pouze období 29. února"
756+
"Feb 29 Period Only": "Pouze období 29. února",
757+
"Waive Interest": "Vzdát se úroků",
758+
"Equal Amortization of Outstanding amount": "Stejná amortizace dlužné částky"
757759
},
758760
"commons": {
759761
"50 characters long": "50 znaků dlouhé",
@@ -1760,6 +1762,7 @@
17601762
"Interest Earned Not Posted": "Získaný úrok nebyl zveřejněn",
17611763
"Interest Free Period": "Bezúročné období",
17621764
"Interest Grace Periods": "Doby odkladu úroků",
1765+
"Interest Handling": "Zpracování úroků",
17631766
"Interest Method": "Zájmová metoda",
17641767
"Interest Outstanding": "Neuvěřitelný zájem",
17651768
"Interest Payable": "Zájem päyable",

src/assets/translations/de-DE.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,9 @@
753753
"Zero interest after charge-off": "Null Zinsen nach Abschreibung",
754754
"Accelerate maturity to charge-off date": "Fälligkeit bis zum Abschreibungsdatum beschleunigen",
755755
"Full Leap Year": "Volles Schaltjahr",
756-
"Feb 29 Period Only": "Nur für den Zeitraum vom 29. Februar"
756+
"Feb 29 Period Only": "Nur für den Zeitraum vom 29. Februar",
757+
"Waive Interest": "Zinsen erlassen",
758+
"Equal Amortization of Outstanding amount": "Gleichmäßige Amortisierung des ausstehenden Betrags"
757759
},
758760
"commons": {
759761
"50 characters long": "50 Zeichen lang",
@@ -1760,6 +1762,7 @@
17601762
"Interest Earned Not Posted": "Verdiente Zinsen wurden nicht gebucht",
17611763
"Interest Free Period": "Zinsfreier Zeitraum",
17621764
"Interest Grace Periods": "Zinsschonfristen",
1765+
"Interest Handling": "Zinsabwicklung",
17631766
"Interest Method": "Zinsmethode",
17641767
"Interest Outstanding": "Ausstehende Zinsen",
17651768
"Interest Payable": "Interesse päylierbar",

src/assets/translations/en-US.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,9 @@
756756
"Zero interest after charge-off": "Zero interest after charge-off",
757757
"Accelerate maturity to charge-off date": "Accelerate maturity to charge-off date",
758758
"Full Leap Year": "Full Leap Year",
759-
"Feb 29 Period Only": "Feb 29 Period Only"
759+
"Feb 29 Period Only": "Feb 29 Period Only",
760+
"Waive Interest": "Waive Interest",
761+
"Equal Amortization of Outstanding amount": "Equal Amortization of Outstanding amount"
760762
},
761763
"commons": {
762764
"50 characters long": "50 characters long",
@@ -1765,6 +1767,7 @@
17651767
"Interest Earned Not Posted": "Interest Earned Not Posted",
17661768
"Interest Free Period": "Interest Free Period",
17671769
"Interest Grace Periods": "Interest Grace Periods",
1770+
"Interest Handling": "Interest Handling",
17681771
"Interest Method": "Interest Method",
17691772
"Interest Outstanding": "Interest Outstanding",
17701773
"Interest Payable": "Interest Payable",

src/assets/translations/es-CL.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,9 @@
752752
"Zero interest after charge-off": "Cero intereses después de la cancelación",
753753
"Accelerate maturity to charge-off date": "Acelerar el vencimiento hasta la fecha de amortización",
754754
"Full Leap Year": "Año bisiesto completo",
755-
"Feb 29 Period Only": "Solo periodo del 29 de febrero"
755+
"Feb 29 Period Only": "Solo periodo del 29 de febrero",
756+
"Waive Interest": "Renunciar a los intereses",
757+
"Equal Amortization of Outstanding amount": "Amortización igual del importe pendiente"
756758
},
757759
"commons": {
758760
"50 characters long": "50 caracteres de largo",
@@ -1759,6 +1761,7 @@
17591761
"Interest Earned Not Posted": "Intereses ganados no contabilizados",
17601762
"Interest Free Period": "Periodo libre de intereses",
17611763
"Interest Grace Periods": "Períodos de gracia de intereses",
1764+
"Interest Handling": "Manejo de intereses",
17621765
"Interest Method": "Método de interés",
17631766
"Interest Outstanding": "Interés pendiente",
17641767
"Interest Payable": "Intereses a pagar",

src/assets/translations/es-MX.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,9 @@
752752
"Zero interest after charge-off": "Cero intereses después de la cancelación",
753753
"Accelerate maturity to charge-off date": "Acelerar el vencimiento hasta la fecha de amortización",
754754
"Full Leap Year": "Año bisiesto completo",
755-
"Feb 29 Period Only": "Solo periodo del 29 de febrero"
755+
"Feb 29 Period Only": "Solo periodo del 29 de febrero",
756+
"Waive Interest": "Renunciar a los intereses",
757+
"Equal Amortization of Outstanding amount": "Amortización igual del importe pendiente"
756758
},
757759
"commons": {
758760
"50 characters long": "50 caracteres de largo",
@@ -1759,6 +1761,7 @@
17591761
"Interest Earned Not Posted": "Intereses ganados no contabilizados",
17601762
"Interest Free Period": "Periodo libre de intereses",
17611763
"Interest Grace Periods": "Períodos de gracia de intereses",
1764+
"Interest Handling": "Manejo de intereses",
17621765
"Interest Method": "Método de interés",
17631766
"Interest Outstanding": "Interés pendiente",
17641767
"Interest Payable": "Intereses a pagar",

src/assets/translations/fr-FR.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,9 @@
753753
"Zero interest after charge-off": "Zéro intérêt après radiation",
754754
"Accelerate maturity to charge-off date": "Accélérer la maturité jusqu'à la date de radiation",
755755
"Full Leap Year": "Année bissextile complète",
756-
"Feb 29 Period Only": "Période du 29 février seulement"
756+
"Feb 29 Period Only": "Période du 29 février seulement",
757+
"Waive Interest": "Renoncer aux intérêts",
758+
"Equal Amortization of Outstanding amount": "Amortissement égal du montant restant dû"
757759
},
758760
"commons": {
759761
"50 characters long": "50 caractères",
@@ -1760,6 +1762,7 @@
17601762
"Interest Earned Not Posted": "Intérêts gagnés non comptabilisés",
17611763
"Interest Free Period": "Période sans intérêt",
17621764
"Interest Grace Periods": "Délais de grâce des intérêts",
1765+
"Interest Handling": "Gestion des intérêts",
17631766
"Interest Method": "Méthode d'intérêt",
17641767
"Interest Outstanding": "Intérêts impayés",
17651768
"Interest Payable": "Intérêts payables",

src/assets/translations/it-IT.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,9 @@
753753
"Zero interest after charge-off": "Zero interessi dopo la cancellazione",
754754
"Accelerate maturity to charge-off date": "Accelerare la scadenza alla data di cancellazione",
755755
"Full Leap Year": "Anno bisestile completo",
756-
"Feb 29 Period Only": "Solo periodo del 29 febbraio"
756+
"Feb 29 Period Only": "Solo periodo del 29 febbraio",
757+
"Waive Interest": "Rinuncia agli interessi",
758+
"Equal Amortization of Outstanding amount": "Ammortamento pari all'importo in sospeso"
757759
},
758760
"commons": {
759761
"50 characters long": "50 caratteri di lunghezza",
@@ -1760,6 +1762,7 @@
17601762
"Interest Earned Not Posted": "Interessi maturati non pubblicati",
17611763
"Interest Free Period": "Periodo senza interessi",
17621764
"Interest Grace Periods": "Periodi di grazia degli interessi",
1765+
"Interest Handling": "Gestione degli interessi",
17631766
"Interest Method": "Metodo degli interessi",
17641767
"Interest Outstanding": "Interessi in sospeso",
17651768
"Interest Payable": "Interesse päyable",

0 commit comments

Comments
 (0)