Merge pull request #1598 from josehernandezfintecheandomx/enhancement/disburse_button_loan_multitranche

Add the disburse button when the loan is multi tranche
This commit is contained in:
Adam Saghy
2022-12-16 17:30:41 +01:00
committed by GitHub
3 changed files with 14 additions and 15 deletions
@@ -25,13 +25,13 @@
<span *ngIf="loanDetailsData.group"> Group Name: {{loanDetailsData.group.name}} </span>
<span *ngIf="loanDetailsData.delinquencyRange">
Loan Account Classification : {{loanDetailsData?.delinquencyRange.classification}}
</span>
<span *ngIf="loanDetailsData.delinquent && loanDetailsData.delinquent.pastDueDays > 0">
</span> <br />
<span class="loans-overview" *ngIf="loanDetailsData.delinquent && loanDetailsData.delinquent.pastDueDays > 0">
Past Due Days : {{loanDetailsData?.delinquent.pastDueDays | number}}
</span>
<span *ngIf="loanDetailsData.delinquent && loanDetailsData.delinquent.delinquentDays > 0
</span> <br />
<span class="loans-overview" *ngIf="loanDetailsData.delinquent && loanDetailsData.delinquent.delinquentDays > 0
&& loanDetailsData.delinquent.pastDueDays != loanDetailsData.delinquent.delinquentDays">
Delinquent Days : {{loanDetailsData?.delinquent.delinquentDays}}
Delinquent Days : {{loanDetailsData?.delinquent.delinquentDays | number}}
</span>
</h3>
</div>
@@ -48,7 +48,6 @@ export class LoansViewComponent implements OnInit {
}
ngOnInit() {
this.recalculateInterest = this.loanDetailsData.recalculateInterest || true;
this.status = this.loanDetailsData.status.value;
this.setConditionalButtons();
@@ -81,13 +80,14 @@ export class LoansViewComponent implements OnInit {
});
} else if (this.status === 'Active') {
if (this.loanDetailsData.canDisburse) {
if (this.loanDetailsData.canDisburse || this.loanDetailsData.multiDisburseLoan) {
this.buttonConfig.addButton({
name: 'Disburse',
icon: 'fa fa-flag',
taskPermissionName: 'DISBURSE_LOAN'
});
}
if (this.loanDetailsData.canDisburse) {
this.buttonConfig.addButton({
name: 'Disburse To Savings',
icon: 'fa fa-flag',
@@ -20,21 +20,20 @@ export class LoanProductCurrencyStepComponent implements OnInit {
ngOnInit() {
this.currencyData = this.loanProductsTemplate.currencyOptions;
this.loanProductCurrencyForm.patchValue({
'currencyCode': this.loanProductsTemplate.currency.code || this.currencyData[0].code,
'digitsAfterDecimal': this.loanProductsTemplate.installmentAmountInMultiplesOf ? this.loanProductsTemplate.currency.decimalPlaces : 2,
'inMultiplesOf': this.loanProductsTemplate.currency.inMultiplesOf,
'installmentAmountInMultiplesOf': this.loanProductsTemplate.installmentAmountInMultiplesOf
'digitsAfterDecimal': this.loanProductsTemplate.currency.decimalPlaces ? this.loanProductsTemplate.currency.decimalPlaces : 2,
'inMultiplesOf': this.loanProductsTemplate.currency.inMultiplesOf ? this.loanProductsTemplate.currency.inMultiplesOf : 1,
'installmentAmountInMultiplesOf': this.loanProductsTemplate.installmentAmountInMultiplesOf ? this.loanProductsTemplate.installmentAmountInMultiplesOf : 1
});
}
createLoanProductCurrencyForm() {
this.loanProductCurrencyForm = this.formBuilder.group({
'currencyCode': ['', Validators.required],
'digitsAfterDecimal': ['', Validators.required],
'inMultiplesOf': ['', Validators.required],
'installmentAmountInMultiplesOf': ['', Validators.required]
'digitsAfterDecimal': [2, Validators.required],
'inMultiplesOf': [1, Validators.required],
'installmentAmountInMultiplesOf': [1, Validators.required]
});
}