/** Angular Imports */ import { Injectable } from '@angular/core' ; import { Resolve , ActivatedRouteSnapshot } from '@angular/router' ; /** rxjs Imports */ import { Observable } from 'rxjs' ; /** Custom Services */ import { ReportsService } from 'app/reports/reports.service' ; import { SettingsService } from 'app/settings/settings.service' ; /**
 * Savings Transaction Reciept resolver.
 */ @ Injectable ( ) export class SavingsTransactionRecieptResolver implements Resolve < Object > { param { ReportsService } reportsService param { SettingsService } settingsService constructor ( private reportsService , private settingsService ) { } param { ActivatedRouteSnapshot } route returns { Observable < any > } resolve ( route ) { const transactionId = route . paramMap . get ( 'id' ) ; const data = { 'output-type' : 'PDF' , R_transactionId : transactionId } ; return this . reportsService . getPentahoRunReportData ( 'Savings Transaction Receipt' , data , 'default' , this . settingsService . language . code , this . settingsService . dateFormat ) ; } }