Realtime Loan Delinquency Classification

This commit is contained in:
Jose Alberto Hernandez
2022-09-04 16:24:04 -05:00
parent 240c388170
commit 0e178e8ab5
19 changed files with 509 additions and 213 deletions
@@ -0,0 +1,36 @@
<div class="container">
<h3>Loan Delinquency Tags</h3>
<table mat-table [dataSource]="loanDelinquencyTags" *ngIf="loanDelinquencyTags.length>0">
<ng-container matColumnDef="classification">
<th mat-header-cell *matHeaderCellDef> Delinquency Classification </th>
<td mat-cell *matCellDef="let item"> {{ item.delinquencyRange.classification }}
<span *ngIf="item.delinquencyRange.maximumAgeDays">( {{ item.delinquencyRange.minimumAgeDays }} - {{ item.delinquencyRange.maximumAgeDays }} )</span>
<span *ngIf="!item.delinquencyRange.maximumAgeDays">( {{ item.delinquencyRange.minimumAgeDays }} )</span>
</td>
</ng-container>
<ng-container matColumnDef="addedOn">
<th mat-header-cell *matHeaderCellDef> Added On </th>
<td mat-cell *matCellDef="let item">
<span *ngIf="item.addedOnDate">
{{ item.addedOnDate | dateFormat }}
</span>
</td>
</ng-container>
<ng-container matColumnDef="liftedOn">
<th mat-header-cell *matHeaderCellDef> Lifted On </th>
<td mat-cell *matCellDef="let item">
<span *ngIf="item.liftedOnDate">
{{ item.liftedOnDate | dateFormat }}
</span>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="loanDelinquencyTagsColumns"></tr>
<tr mat-row *matRowDef="let row; columns: loanDelinquencyTagsColumns;"></tr>
</table>
</div>
@@ -0,0 +1,11 @@
table {
width: 100%;
}
.container {
padding-top: 1%;
padding-bottom: 2%;
.delete-button {
margin-left: 1%;
}
}
@@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { LoanDelinquencyTagsTabComponent } from './loan-delinquency-tags-tab.component';
describe('LoanDelinquencyTagsTabComponent', () => {
let component: LoanDelinquencyTagsTabComponent;
let fixture: ComponentFixture<LoanDelinquencyTagsTabComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ LoanDelinquencyTagsTabComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(LoanDelinquencyTagsTabComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,23 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
@Component({
selector: 'mifosx-loan-delinquency-tags-tab',
templateUrl: './loan-delinquency-tags-tab.component.html',
styleUrls: ['./loan-delinquency-tags-tab.component.scss']
})
export class LoanDelinquencyTagsTabComponent implements OnInit {
loanDelinquencyTags: any;
loanDelinquencyTagsColumns: string[] = ['classification', 'addedOn', 'liftedOn'];
constructor(private route: ActivatedRoute) {
this.route.parent.data.subscribe((data: { loanDelinquencyTagsData: any }) => {
this.loanDelinquencyTags = data.loanDelinquencyTagsData;
});
}
ngOnInit(): void {
}
}
@@ -100,6 +100,12 @@
Transactions
</a>
</ng-container>
<ng-container>
<a mat-tab-link [routerLink]="['./delinquencytags']" routerLinkActive #delinquencytags="routerLinkActive"
[active]="delinquencytags.isActive">
Delinquency Tags
</a>
</ng-container>
<ng-container *ngIf="loanDetailsData.collateral">
<a mat-tab-link [routerLink]="['./loan-collateral']" routerLinkActive #loanCollateralDetails="routerLinkActive"
[active]="loanCollateralDetails.isActive">