Files
cbsnexora/src/app/loans/common-resolvers/external-asset-owner-journal-entry.resolver.ts
T
Ralph HopmanandAdam Saghy cac1d11ad7 build: Use prettier for typescript
Stop ignoring .ts files in prettier and fix existing issues.
2025-01-15 11:59:30 +00:00

24 lines
905 B
TypeScript

import { Injectable } from '@angular/core';
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
import { Observable, of } from 'rxjs';
import { ExternalAssetOwnerService } from '../services/external-asset-owner.service';
@Injectable({
providedIn: 'root'
})
export class ExternalAssetOwnerJournalEntryResolver implements Resolve<boolean> {
/**
* @param {ExternalAssetOwnerService} externalAssetOwnerService External Asset Owner service.
*/
constructor(private externalAssetOwnerService: ExternalAssetOwnerService) {}
/**
* Returns the Loans with Association data.
* @returns {Observable<any>}
*/
resolve(route: ActivatedRouteSnapshot): Observable<any> {
const transferId = route.paramMap.get('transferId') || route.parent.paramMap.get('transferId');
return this.externalAssetOwnerService.retrieveExternalAssetOwnerTransferJournalEntries(transferId);
}
}