Files
cbsnexora/src/app/account-transfers/common-resolvers/view-standing-instructions.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

31 lines
995 B
TypeScript

/** Angular Imports */
import { Injectable } from '@angular/core';
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
/** rxjs Imports */
import { Observable } from 'rxjs';
/** Custom Services */
import { AccountTransfersService } from '../account-transfers.service';
/**
* View Standing Instructions resolver.
*/
@Injectable()
export class ViewStandingInstructionsResolver implements Resolve<Object> {
/**
* @param {accountTransfersService} AccountTransfersService Account Transfers service.
*/
constructor(private accountTransfersService: AccountTransfersService) {}
/**
* Returns the Standing Instructions Data.
* @param {ActivatedRouteSnapshot} route Route Snapshot
* @returns {Observable<any>}
*/
resolve(route: ActivatedRouteSnapshot): Observable<any> {
const standingInstructionsId = route.parent.paramMap.get('standingInstructionsId');
return this.accountTransfersService.getStandingInstructionsData(standingInstructionsId);
}
}