/** Angular Imports */ import { Injectable } from '@angular/core' ; import { HttpClient , HttpParams } from '@angular/common/http' ; /** rxjs Imports */ import { Observable } from 'rxjs' ; /**
 * Navigation service.
 */ @ Injectable ( { providedIn : 'root' } ) export class NavigationService { param { HttpClient } http constructor ( private http ) { } returns { Observable < any > } getOffices ( ) { return this . http . get ( '/offices' ) ; } param { number } officeId returns { Observable < any > } getEmployees ( officeId ) { const httpParams = new HttpParams ( ) . set ( 'officeId' , officeId . toString ( ) ) ; return this . http . get ( '/staff' , { params : httpParams } ) ; } param { number } staffId returns { Observable < any > } getCentersFromStaffId ( staffId ) { const httpParams = new HttpParams ( ) . set ( 'R_staffId' , staffId . toString ( ) ) . set ( 'genericResultSet' , false . toString ( ) ) ; return this . http . get ( '/runreports/GroupNamesByStaff' , { params : httpParams } ) ; } param { number } centerId returns { Observable < any > } getCenter ( centerId ) { const httpParams = new HttpParams ( ) . set ( 'associations' , 'groupMembers' ) ; return this . http . get ( `/centers/${ centerId }` , { params : httpParams } ) ; } param { number } centerId returns { Observable < any > } getCenterAccounts ( centerId ) { return this . http . get ( `/centers/${ centerId }/accounts` ) ; } param { number } centerId returns { Observable < any > } getCenterSummary ( centerId ) { const httpParams = new HttpParams ( ) . set ( 'R_groupId' , centerId . toString ( ) ) . set ( 'genericResultSet' , false . toString ( ) ) ; return this . http . get ( '/runreports/GroupSummaryCounts' , { params : httpParams } ) ; } param { number } groupId returns { Observable < any > } getGroup ( groupId ) { const httpParams = new HttpParams ( ) . set ( 'associations' , 'all' ) ; return this . http . get ( `/groups/${ groupId }` , { params : httpParams } ) ; } param { number } groupId returns { Observable < any > } getGroupAccounts ( groupId ) { return this . http . get ( `/groups/${ groupId }/accounts` ) ; } param { number } clientId returns { Observable < any > } getClient ( clientId ) { return this . http . get ( `/clients/${ clientId }` ) ; } param { number } clientId returns { Observable < any > } getClientAccounts ( clientId ) { return this . http . get ( `/clients/${ clientId }/accounts` ) ; } }