feat: add permissions (#1198)
- add permission in centers, loans, recurring deposits, products and account transfer module - add charges action in loans view
This commit is contained in:
@@ -24,7 +24,7 @@ export class LoanDetailsChargesResolver implements Resolve<Object> {
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
resolve(route: ActivatedRouteSnapshot): Observable<any> {
|
||||
const loanId = route.parent.paramMap.get('loanId');
|
||||
const loanId = route.parent.parent.paramMap.get('loanId');
|
||||
return this.loansService.getLoanAccountAssociationDetails(loanId);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/** Angular Imports */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
/** rxjs Imports */
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
/** Custom Services */
|
||||
import { LoansService } from '../loans.service';
|
||||
|
||||
/**
|
||||
* Loans Account Charge data resolver.
|
||||
*/
|
||||
@Injectable()
|
||||
export class LoansAccountChargeResolver implements Resolve<Object> {
|
||||
|
||||
/**
|
||||
* @param {LoansService} LoansService Loans service.
|
||||
*/
|
||||
constructor(private loansService: LoansService) { }
|
||||
|
||||
/**
|
||||
* Returns the Loans Account Charge data.
|
||||
* @param {ActivatedRouteSnapshot} route Route Snapshot
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
resolve(route: ActivatedRouteSnapshot): Observable<any> {
|
||||
const loanAccountId = route.parent.parent.paramMap.get('loanId');
|
||||
const chargeId = route.paramMap.get('id');
|
||||
return this.loansService.getLoansAccountCharge(loanAccountId, chargeId);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user