31 lines
680 B
TypeScript
31 lines
680 B
TypeScript
/** 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';
|
|
|
|
/**
|
|
* Tellers data resolver.
|
|
*/
|
|
@Injectable()
|
|
export class TellersResolver implements Resolve<Object> {
|
|
|
|
/**
|
|
* @param {OrganizationService} organizationService Organization service.
|
|
*/
|
|
constructor(private organizationService: OrganizationService) {}
|
|
|
|
/**
|
|
* Returns the Tellers data.
|
|
* @returns {Observable<any>}
|
|
*/
|
|
resolve(): Observable<any> {
|
|
return this.organizationService.getTellers();
|
|
}
|
|
|
|
}
|