feat: add cashiers list page (#888)

Fixes: #757
This commit is contained in:
Karan Takalkar
2020-06-23 02:44:29 +05:30
committed by GitHub
parent e01897aa66
commit 02e2155f15
11 changed files with 218 additions and 6 deletions
@@ -0,0 +1,31 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
/** rxjs Imports */
import { Observable } from 'rxjs';
/** Custom Services */
import { OrganizationService } from 'app/organization/organization.service';
/**
* Teller data resolver.
*/
@Injectable()
export class TellerResolver implements Resolve<Object> {
/**
* @param {OrganizationService} organizationService Organization service.
*/
constructor(private organizationService: OrganizationService) {}
/**
* Returns the teller data.
* @returns {Observable<any>}
*/
resolve(route: ActivatedRouteSnapshot): Observable<any> {
const tellerId = route.paramMap.get('id');
return this.organizationService.getTeller(tellerId);
}
}