Update dashboard table reports (#1653)

Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
This commit is contained in:
José Alberto Hernández
2023-01-21 23:24:49 -06:00
committed by GitHub
co-authored by Jose Alberto Hernandez
parent e61f4f92e3
commit 9ed38f0f7b
24 changed files with 58 additions and 57 deletions
+11
View File
@@ -5,6 +5,7 @@ import { HttpClient, HttpParams } from '@angular/common/http';
/** rxjs Imports */
import { Observable } from 'rxjs';
import { Dates } from 'app/core/utils/dates';
import { SettingsService } from 'app/settings/settings.service';
/**
* Loans service.
@@ -14,6 +15,7 @@ import { Dates } from 'app/core/utils/dates';
})
export class LoansService {
constructor(private http: HttpClient,
private settingsService: SettingsService,
private dateUtils: Dates) { }
/**
* @param {string} loanId loanId of the loan.
@@ -28,6 +30,15 @@ export class LoansService {
return this.http.get(`/loans/${loanId}/transactions/template`, { params: httpParams });
}
getLoanForeclosureActionTemplate(loanId: string): Observable<any> {
const httpParams = new HttpParams()
.set('command', 'foreclosure')
.set('locale', this.settingsService.language.code)
.set('dateFormat', this.settingsService.dateFormat)
.set('transactionDate', this.dateUtils.formatDate(this.settingsService.businessDate, this.settingsService.dateFormat))
return this.http.get(`/loans/${loanId}/transactions/template`, { params: httpParams });
}
getLoanAccountResource(loanId: string, associations: string): Observable<any> {
const httpParams = new HttpParams().set('associations', associations);
return this.http.get(`/loans/${loanId}`, { params: httpParams });