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:
Chirag Gupta
2020-03-23 02:06:57 +05:30
committed by GitHub
co-authored by Chirag Gupta
parent 17197056bb
commit b1a3646bc2
23 changed files with 1302 additions and 8 deletions
@@ -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);
}
}