feat: create, view, edit, delete data-table (#365)
- Add view-data-table - Add edit-data-table - Add create-data-table Fixes #171 Co-authored-by: Chirag Gupta <gchirag@apache.org>
This commit is contained in:
co-authored by
Chirag Gupta
parent
17197056bb
commit
b1a3646bc2
@@ -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 { SystemService } from '../system.service';
|
||||
|
||||
/**
|
||||
* Data Table data resolver.
|
||||
*/
|
||||
@Injectable()
|
||||
export class DataTableResolver implements Resolve<Object> {
|
||||
|
||||
/**
|
||||
* @param {SystemService} systemService System service.
|
||||
*/
|
||||
constructor(private systemService: SystemService) {}
|
||||
|
||||
/**
|
||||
* Returns the Data Table data.
|
||||
* TODO: Delete the extra column to avoid multiple usages of `this.columnsData.shift()`.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
resolve(route: ActivatedRouteSnapshot): Observable<any> {
|
||||
const dataTableName = route.paramMap.get('datatableName');
|
||||
return this.systemService.getDataTable(dataTableName);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user