Support to pause and resume Loan Delinquency Classification (#1918)

Co-authored-by: Jose Alberto Hernandez <alberto@blue-daemon.local>
This commit is contained in:
José Alberto Hernández
2023-12-01 18:06:31 -06:00
committed by GitHub
co-authored by Jose Alberto Hernandez
parent 3f4e9870b6
commit a26c906d2c
28 changed files with 414 additions and 73 deletions
@@ -14,6 +14,7 @@ import { ConfirmationDialogComponent } from '../../shared/confirmation-dialog/co
import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.component';
import { LoanStatus } from '../models/loan-status.model';
import { Currency } from 'app/shared/models/general.model';
import { DelinquencyPausePeriod } from '../models/loan-account.model';
@Component({
selector: 'mifosx-loans-view',
@@ -42,6 +43,7 @@ export class LoansViewComponent implements OnInit {
/** Disburse Transaction number */
disburseTransactionNo = 0;
loanDelinquencyClassificationStyle = '';
loanStatus: LoanStatus;
currency: Currency;
@@ -80,6 +82,7 @@ export class LoansViewComponent implements OnInit {
} else if (this.router.url.includes('centers')) {
this.entityType = 'Center';
}
this.loanDelinquencyClassification();
}
// Defines the buttons based on the status of the loan account
@@ -199,6 +202,17 @@ export class LoansViewComponent implements OnInit {
});
}
loanDelinquencyClassification(): void {
this.loanDelinquencyClassificationStyle = '';
if (this.loanDetailsData.delinquent && this.loanDetailsData.delinquent.delinquencyPausePeriods) {
this.loanDetailsData.delinquent.delinquencyPausePeriods.some((period: DelinquencyPausePeriod) => {
if (period.active) {
this.loanDelinquencyClassificationStyle = 'fa fa-stop status-pending';
}
});
}
}
iconLoanStatusColor() {
if (this.loanDetailsData.chargedOff) {
return 'loanStatusType.chargeoff';