feat: savings account transactions (view-reciept) (#949)

Fixes: #948
This commit is contained in:
Karan Takalkar
2020-06-29 17:36:11 +05:30
committed by GitHub
parent be0e7032a7
commit b1c4efccbf
13 changed files with 156 additions and 11 deletions
@@ -0,0 +1,36 @@
/** 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';
/**
* Savings Transaction Reciept resolver.
*/
@Injectable()
export class SavingsTransactionRecieptResolver implements Resolve<Object> {
/**
* @param {ReportsService} reportsService Reports service.
*/
constructor(private reportsService: ReportsService) { }
/**
* Returns the Savings Transaction Reciept
* @param {ActivatedRouteSnapshot} route Route Snapshot
* @returns {Observable<any>}
*/
resolve(route: ActivatedRouteSnapshot): Observable<any> {
const transactionId = route.paramMap.get('id');
const data = {
'output-type': 'PDF',
R_transactionId: transactionId
};
return this.reportsService.getPentahoRunReportData({name: 'Savings Transaction Receipt'}, data, 'default', 'en', 'dd MMMM yyyy');
}
}