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.group"> Group Name: {{loanDetailsData.group.name}} </span>
<span *ngIf="loanDetailsData.delinquencyRange"> <span *ngIf="loanDetailsData.delinquencyRange">
Loan Account Classification : {{loanDetailsData?.delinquencyRange.classification}} Loan Account Classification : {{loanDetailsData?.delinquencyRange.classification}}
</span> </span> <br />
<span *ngIf="loanDetailsData.delinquent && loanDetailsData.delinquent.pastDueDays > 0"> <span class="loans-overview" *ngIf="loanDetailsData.delinquent && loanDetailsData.delinquent.pastDueDays > 0">
Past Due Days : {{loanDetailsData?.delinquent.pastDueDays | number}} Past Due Days : {{loanDetailsData?.delinquent.pastDueDays | number}}
</span> </span> <br />
<span *ngIf="loanDetailsData.delinquent && loanDetailsData.delinquent.delinquentDays > 0 <span class="loans-overview" *ngIf="loanDetailsData.delinquent && loanDetailsData.delinquent.delinquentDays > 0
&& loanDetailsData.delinquent.pastDueDays != loanDetailsData.delinquent.delinquentDays"> && loanDetailsData.delinquent.pastDueDays != loanDetailsData.delinquent.delinquentDays">
Delinquent Days : {{loanDetailsData?.delinquent.delinquentDays}} Delinquent Days : {{loanDetailsData?.delinquent.delinquentDays | number}}
</span> </span>
</h3> </h3>
</div> </div>
@@ -48,7 +48,6 @@ export class LoansViewComponent implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.recalculateInterest = this.loanDetailsData.recalculateInterest || true; this.recalculateInterest = this.loanDetailsData.recalculateInterest || true;
this.status = this.loanDetailsData.status.value; this.status = this.loanDetailsData.status.value;
this.setConditionalButtons(); this.setConditionalButtons();
@@ -81,13 +80,14 @@ export class LoansViewComponent implements OnInit {
}); });
} else if (this.status === 'Active') { } else if (this.status === 'Active') {
if (this.loanDetailsData.canDisburse || this.loanDetailsData.multiDisburseLoan) {
if (this.loanDetailsData.canDisburse) {
this.buttonConfig.addButton({ this.buttonConfig.addButton({
name: 'Disburse', name: 'Disburse',
icon: 'fa fa-flag', icon: 'fa fa-flag',
taskPermissionName: 'DISBURSE_LOAN' taskPermissionName: 'DISBURSE_LOAN'
}); });
}
if (this.loanDetailsData.canDisburse) {
this.buttonConfig.addButton({ this.buttonConfig.addButton({
name: 'Disburse To Savings', name: 'Disburse To Savings',
icon: 'fa fa-flag', icon: 'fa fa-flag',
@@ -20,21 +20,20 @@ export class LoanProductCurrencyStepComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.currencyData = this.loanProductsTemplate.currencyOptions; this.currencyData = this.loanProductsTemplate.currencyOptions;
this.loanProductCurrencyForm.patchValue({ this.loanProductCurrencyForm.patchValue({
'currencyCode': this.loanProductsTemplate.currency.code || this.currencyData[0].code, 'currencyCode': this.loanProductsTemplate.currency.code || this.currencyData[0].code,
'digitsAfterDecimal': this.loanProductsTemplate.installmentAmountInMultiplesOf ? this.loanProductsTemplate.currency.decimalPlaces : 2, 'digitsAfterDecimal': this.loanProductsTemplate.currency.decimalPlaces ? this.loanProductsTemplate.currency.decimalPlaces : 2,
'inMultiplesOf': this.loanProductsTemplate.currency.inMultiplesOf, 'inMultiplesOf': this.loanProductsTemplate.currency.inMultiplesOf ? this.loanProductsTemplate.currency.inMultiplesOf : 1,
'installmentAmountInMultiplesOf': this.loanProductsTemplate.installmentAmountInMultiplesOf 'installmentAmountInMultiplesOf': this.loanProductsTemplate.installmentAmountInMultiplesOf ? this.loanProductsTemplate.installmentAmountInMultiplesOf : 1
}); });
} }
createLoanProductCurrencyForm() { createLoanProductCurrencyForm() {
this.loanProductCurrencyForm = this.formBuilder.group({ this.loanProductCurrencyForm = this.formBuilder.group({
'currencyCode': ['', Validators.required], 'currencyCode': ['', Validators.required],
'digitsAfterDecimal': ['', Validators.required], 'digitsAfterDecimal': [2, Validators.required],
'inMultiplesOf': ['', Validators.required], 'inMultiplesOf': [1, Validators.required],
'installmentAmountInMultiplesOf': ['', Validators.required] 'installmentAmountInMultiplesOf': [1, Validators.required]
}); });
} }