feat: added data table for transactions of saving account (#1844)
* feat: added data table for transactions of saving account Now we can add the data table for transactions entity type of saving account and also we can edit,delete and create the datatable. Fixes: #1726 * made changes in the comments
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
// Angular Imports
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
// rxjs Imports
|
||||
import { Observable, of } from 'rxjs';
|
||||
|
||||
// Custom Service
|
||||
import { SavingsService } from '../savings.service';
|
||||
|
||||
@Injectable()
|
||||
export class TransactionDatatableResolver implements Resolve<Object> {
|
||||
/**
|
||||
*
|
||||
* @param {SavingsService} savingsService
|
||||
*/
|
||||
constructor(private savingsService: SavingsService) { }
|
||||
/**
|
||||
* Returns the Transactions Account's Datatable data.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
|
||||
resolve(route: ActivatedRouteSnapshot): Observable<any> {
|
||||
const accountId = route.parent.parent.paramMap.get('id');
|
||||
const datatableName = route.paramMap.get('datatableName');
|
||||
return this.savingsService.getSavingsTransactionDatatable(accountId, datatableName);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
// Angular Imports
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
|
||||
|
||||
// rxjs Imports
|
||||
import { Observable, of } from 'rxjs';
|
||||
|
||||
// Custom Service
|
||||
import { SavingsService } from '../savings.service';
|
||||
|
||||
@Injectable()
|
||||
export class TransactionDatatablesResolver implements Resolve<Object> {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param savingsService Savings Service
|
||||
*/
|
||||
constructor(private savingsService: SavingsService) { }
|
||||
/**
|
||||
*
|
||||
* @param route
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
resolve(route: ActivatedRouteSnapshot): Observable<any> {
|
||||
return this.savingsService.getSavingsTransactionDatatables();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user