feat: add datatable tabs in clients view component

- add datatable-tab component
- add single-row component
- add multi-row component

fixes: #431
This commit is contained in:
Jivjyot Singh
2019-12-01 23:20:51 +03:00
committed by Abhay Chawla
parent b80ef7910b
commit c2bd5d1444
20 changed files with 306 additions and 6 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 { ClientsService } from '../clients.service';
/**
* Client datatable resolver.
*/
@Injectable()
export class ClientDatatableResolver implements Resolve<Object> {
/**
* @param {ClientsService} ClientsService Clients service.
*/
constructor(private clientsService: ClientsService) { }
/**
* Returns the Client datatables.
* @returns {Observable<any>}
*/
resolve(route: ActivatedRouteSnapshot): Observable<any> {
const clientId = route.parent.parent.paramMap.get('clientId');
const datatableName = route.paramMap.get('datatableName');
return this.clientsService.getClientDatatable(clientId, datatableName);
}
}