feat: add employees component (#502)

Fixes: #156
This commit is contained in:
pwai
2019-12-08 12:43:13 +03:00
committed by Abhay Chawla
parent e87a247254
commit 2f87aa93eb
9 changed files with 224 additions and 3 deletions
@@ -0,0 +1,30 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { Resolve } from '@angular/router';
/** rxjs Imports */
import { Observable } from 'rxjs';
/** Custom Services */
import { OrganizationService } from '../organization.service';
/**
* Employees data resolver.
*/
@Injectable()
export class EmployeesResolver implements Resolve<Object> {
/**
* @param {OrganizationService} organizationService Organization service.
*/
constructor(private organizationService: OrganizationService) {}
/**
* Returns the employees data.
* @returns {Observable<any>}
*/
resolve(): Observable<any> {
return this.organizationService.getEmployees();
}
}