Merge branch 'dev' into angular20

This commit is contained in:
Felix van Hove
2025-12-08 11:05:39 +01:00
committed by GitHub
9 changed files with 66 additions and 7 deletions
@@ -255,6 +255,12 @@ export class LoansAccountTermsStepComponent implements OnInit, OnChanges {
this.loansAccountTermsForm.addControl('enableDownPayment', new UntypedFormControl(enableDownPayment));
}
if (this.isFullTermTrancheEditable()) {
const allowFullTermForTranche =
this.loansAccountTermsData.allowFullTermForTranche ?? this.loanProduct?.allowFullTermForTranche ?? false;
this.loansAccountTermsForm.patchValue({ allowFullTermForTranche });
}
const allowAttributeOverrides = this.loansAccountTermsData.product.allowAttributeOverrides;
if (!allowAttributeOverrides.repaymentEvery) {
this.loansAccountTermsForm.controls.repaymentEvery.disable();
@@ -517,7 +523,8 @@ export class LoansAccountTermsStepComponent implements OnInit, OnChanges {
multiDisburseLoan: [false],
interestRateFrequencyType: [''],
balloonRepaymentAmount: [''],
interestRecognitionOnDisbursementDate: [false]
interestRecognitionOnDisbursementDate: [false],
allowFullTermForTranche: [false]
});
}
@@ -699,4 +706,12 @@ export class LoansAccountTermsStepComponent implements OnInit, OnChanges {
collateral: this.collateralDataSource
};
}
/**
* Check if full term tranche option should be editable at loan level.
* Only available if the loan product has it enabled and is PROGRESSIVE schedule type.
*/
isFullTermTrancheEditable(): boolean {
return this.isProgressive && this.loanProduct?.allowFullTermForTranche === true;
}
}
@@ -4,6 +4,11 @@
<span class="flex-60">{{ loanDetails.maxOutstandingLoanBalance | formatNumber }}</span>
</div>
<div class="flex-fill" *ngIf="loanDetails.allowFullTermForTranche">
<span class="flex-40">{{ 'labels.inputs.Allow full term for each tranche' | translate }}:</span>
<span class="flex-60">{{ loanDetails.allowFullTermForTranche | yesNo }}</span>
</div>
<h3>{{ 'labels.heading.Loan Tranche Details' | translate }}</h3>
<div class="layout-row margin-t layout-xs-column layout-align-end gap-2percent">
@@ -27,6 +27,7 @@ import {
import { MatTooltip } from '@angular/material/tooltip';
import { DateFormatPipe } from '../../../pipes/date-format.pipe';
import { FormatNumberPipe } from '../../../pipes/format-number.pipe';
import { YesnoPipe } from '../../../pipes/yesno.pipe';
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
@Component({
@@ -49,7 +50,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
MatRowDef,
MatRow,
DateFormatPipe,
FormatNumberPipe
FormatNumberPipe,
YesnoPipe
]
})
export class LoanTrancheDetailsComponent implements OnInit {