WEB-642: Add Originators tab on loan details view (#3064)

Co-authored-by: Jose Alberto Hernandez <alberto@black-box.local>
This commit is contained in:
Jose Alberto Hernandez
2026-02-02 09:16:25 -06:00
committed by GitHub
co-authored by Jose Alberto Hernandez
parent 53427418c7
commit 1577e9dd8e
21 changed files with 1583 additions and 1328 deletions
@@ -0,0 +1,31 @@
/**
* Copyright since 2025 Mifos Initiative
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import { Injectable, inject } from '@angular/core';
import { ActivatedRouteSnapshot } from '@angular/router';
import { LoansService } from 'app/loans/loans.service';
import { Observable, throwError } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class LoanOriginatorsResolver {
private loansService = inject(LoansService);
/**
* Returns the Loans data.
* @returns {Observable<any>}
*/
resolve(route: ActivatedRouteSnapshot): Observable<any> {
const loanId = route.paramMap.get('loanId') ?? route.parent?.paramMap.get('loanId');
if (!loanId) {
return throwError(() => new Error('Missing loanId route param'));
}
return this.loansService.getLoanOriginators(loanId);
}
}