Add Repayment Info as part of the Loan Account request

This commit is contained in:
Jose Alberto Hernandez
2022-11-25 11:50:15 -06:00
parent 5e6f14a5e0
commit 460d9bf8be
16 changed files with 227 additions and 80 deletions
@@ -52,6 +52,16 @@
</mat-step>
<mat-step>
<ng-template matStepLabel>REPAYMENT SCHEDULE</ng-template>
<mifosx-loans-account-schedule-step [loansAccountTemplate]="loansAccountAndTemplate"
[loansAccountProductTemplate]="loansAccountProductTemplate" [loansAccount]="loansAccount">
</mifosx-loans-account-schedule-step>
</mat-step>
<mat-step state="preview" *ngIf="loansAccountFormValidAndNotPristine" completed>
<ng-template matStepLabel>PREVIEW</ng-template>
@@ -60,9 +60,11 @@ export class EditLoansAccountComponent implements OnInit {
*/
setTemplate($event: any) {
this.loansAccountProductTemplate = $event;
this.loansService.getLoansCollateralTemplateResource(this.loansAccountProductTemplate.loanProductId).subscribe((response: any) => {
this.collateralOptions = response.loanCollateralOptions;
});
if (this.loansAccountProductTemplate.loanProductId) {
this.loansService.getLoansCollateralTemplateResource(this.loansAccountProductTemplate.loanProductId).subscribe((response: any) => {
this.collateralOptions = response.loanCollateralOptions;
});
}
}
/** Get Loans Account Details Form Data */