feat: add view transactions history (#1157)

Fixes: #1156
This commit is contained in:
Muskan Khedia
2020-07-26 15:25:04 +05:30
committed by GitHub
parent 67a836e3d6
commit 6ad1335d93
14 changed files with 245 additions and 14 deletions
@@ -0,0 +1,31 @@
/** 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 ListTransactionsResolver 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 id = route.parent.paramMap.get('standingInstructionsId');
return this.accountTransfersService.getStandingInstructionsTransactions(id);
}
}