Merge pull request #2678 from alberto-art3ch/WEB-322/re-aging-for-interest-bearing-products
WEB-322: Re-aging: Interest handling configuration
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
+24
-3
@@ -16,8 +16,8 @@
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Frequency Type' | translate }}</mat-label>
|
||||
<mat-select formControlName="frequencyType">
|
||||
<mat-option *ngFor="let frequencyType of frequencyOptions" [value]="frequencyType.code">
|
||||
{{ frequencyType.value }}
|
||||
<mat-option *ngFor="let frequencyType of periodFrequencyOptions" [value]="frequencyType">
|
||||
{{ frequencyType }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@@ -40,15 +40,36 @@
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Interest Handling' | translate }}</mat-label>
|
||||
<mat-select formControlName="reAgeInterestHandling">
|
||||
<mat-option
|
||||
*ngFor="let reAgeInterestHandlingOption of reAgeInterestHandlingOptions"
|
||||
[value]="reAgeInterestHandlingOption.code"
|
||||
>
|
||||
{{ reAgeInterestHandlingOption.value | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Reason' | translate }}</mat-label>
|
||||
<input matInput formControlName="note" />
|
||||
<mat-select formControlName="reasonCodeValueId">
|
||||
<mat-option *ngFor="let reAgeReasonOption of reAgeReasonOptions" [value]="reAgeReasonOption.id">
|
||||
{{ reAgeReasonOption.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.External Id' | translate }}</mat-label>
|
||||
<input matInput formControlName="externalId" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Note' | translate }}</mat-label>
|
||||
<input matInput formControlName="note" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<mat-card-actions class="layout-row align-center gap-5px responsive-column">
|
||||
|
||||
+16
-7
@@ -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
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user