/** * 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/. */ /** 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'; /** * Clients data resolver. */ @Injectable() export class LoanDetailsChargesResolver implements Resolve { /** * @param {LoansService} LoansService Loans service. */ // eslint-disable-next-line @angular-eslint/prefer-inject constructor(private loansService: LoansService) {} /** * Returns the Loans with Association data. * @returns {Observable} */ resolve(route: ActivatedRouteSnapshot): Observable { const loanId = route.paramMap.get('loanId'); return this.loansService.getLoanAccountAssociationDetails(loanId); } }