Recurring Deposit view account homologation (#1910)

Co-authored-by: Jose Alberto Hernandez <alberto@blue-daemon.local>
This commit is contained in:
José Alberto Hernández
2023-11-26 20:00:42 -06:00
committed by GitHub
co-authored by Jose Alberto Hernandez
parent 7c53b82965
commit 79595f6a1c
72 changed files with 1591 additions and 1226 deletions
@@ -27,7 +27,7 @@
<div fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column" *ngIf="loanProductSelected">
<mat-form-field fxFlex="48%">
<mat-label>{{"labels.inputs.Loan purpose" | translate}}</mat-label>
<mat-label>{{"labels.inputs.Loan Purpose" | translate}}</mat-label>
<mat-select formControlName="loanPurposeId" matTooltip="{{ 'tooltips.Provides an indication' | translate}}">
<mat-option *ngFor="let loanPurpose of loanPurposeOptions" [value]="loanPurpose.id">
{{ loanPurpose.name }}
@@ -1,8 +1,8 @@
<div fxLayout="row wrap" fxLayout.lt-md="column">
<a mat-button (click)="showRepaymentInfo()">
{{"labels.inputs.Repayment Info" | translate}}
</a>
<button mat-stroked-button color="primary" (click)="showRepaymentInfo()">
<fa-icon icon="calendar" class="m-r-10"></fa-icon>{{"labels.inputs.Generate Repayment Schedule" | translate}}
</button>
<mifosx-repayment-schedule-tab fxFlex="100%" [repaymentScheduleDetails]="repaymentScheduleDetails"
[currencyCode]="currencyCode">
@@ -19,7 +19,6 @@ export class LoansAccountScheduleStepComponent implements OnInit {
/** Loans Account Data */
@Input() loansAccount: any;
showRepayment = false;
repaymentScheduleDetails: any = {periods: []};
loanId: any = null;
@@ -34,16 +33,13 @@ export class LoansAccountScheduleStepComponent implements OnInit {
showRepaymentInfo(): void {
this.repaymentScheduleDetails = {periods: []};
this.showRepayment = !this.showRepayment;
if (this.showRepayment) {
const locale = this.settingsService.language.code;
const dateFormat = this.settingsService.dateFormat;
const payload = this.loansService.buildLoanRequestPayload(this.loansAccount, this.loansAccountTemplate,
this.loansAccountProductTemplate.calendarOptions, locale, dateFormat);
const locale = this.settingsService.language.code;
const dateFormat = this.settingsService.dateFormat;
const payload = this.loansService.buildLoanRequestPayload(this.loansAccount, this.loansAccountTemplate,
this.loansAccountProductTemplate.calendarOptions, locale, dateFormat);
this.loansService.calculateLoanSchedule(payload).subscribe((response: any) => {
this.repaymentScheduleDetails = response;
});
}
this.loansService.calculateLoanSchedule(payload).subscribe((response: any) => {
this.repaymentScheduleDetails = response;
});
}
}