-
Notifications
You must be signed in to change notification settings - Fork 580
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display installment level delinquency (#1907)
Co-authored-by: Jose Alberto Hernandez <[email protected]>
- Loading branch information
1 parent
df8c90d
commit 7c53b82
Showing
21 changed files
with
150 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/app/loans/common-resolvers/loan-delinquency-data.resolver.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** Angular Imports */ | ||
import { Injectable } from '@angular/core'; | ||
import { Resolve, ActivatedRouteSnapshot } from '@angular/router'; | ||
|
||
/** rxjs Imports */ | ||
import { Observable } from 'rxjs'; | ||
|
||
/** Custom Services */ | ||
import { LoansService } from '../loans.service'; | ||
|
||
/** | ||
* Loan Delinquency data resolver. | ||
*/ | ||
@Injectable() | ||
export class LoanDelinquencyDataResolver implements Resolve<Object> { | ||
|
||
/** | ||
* @param {LoansService} LoansService Loans service. | ||
*/ | ||
constructor(private loansService: LoansService) { } | ||
|
||
/** | ||
* Returns the Loans with Association data. | ||
* @returns {Observable<any>} | ||
*/ | ||
resolve(route: ActivatedRouteSnapshot): Observable<any> { | ||
const loanId = route.paramMap.get('loanId') || route.parent.paramMap.get('loanId'); | ||
return this.loansService.getDelinquencyData(loanId); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
export interface DelinquencyRange { | ||
id: number; | ||
classification: string; | ||
minimumAgeDays: number; | ||
} | ||
|
||
export interface DelinquentData { | ||
availableDisbursementAmount: number; | ||
pastDueDays: number; | ||
nextPaymentDueDate: number[]; | ||
delinquentDays: number; | ||
delinquentDate: number[]; | ||
delinquentAmount: number; | ||
lastPaymentAmount: number; | ||
lastRepaymentAmount: number; | ||
delinquencyCalculationPaused: boolean; | ||
installmentLevelDelinquency?: InstallmentLevelDelinquency[]; | ||
} | ||
|
||
export interface InstallmentLevelDelinquency { | ||
rangeId: number; | ||
classification: string; | ||
minimumAgeDays: number; | ||
delinquentAmount: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.