feat: add edit standing instructions details (#1139)

Fixes: #1138
This commit is contained in:
Muskan Khedia
2020-07-19 10:24:52 +05:30
committed by GitHub
parent 521c61d1f3
commit 3bc8e41a46
11 changed files with 404 additions and 4 deletions
@@ -0,0 +1,32 @@
/** 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 StandingInstructionsDataAndTemplateResolver 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.getStandingInstructionsDataAndTemplate(standingInstructionsId);
}
}