/** Angular Imports */ import { Injectable } from '@angular/core' ; import { HttpClient , HttpParams } from '@angular/common/http' ; /** rxjs Imports */ import { Observable } from 'rxjs' ; /**
 * Collections Service
 */ @ Injectable ( { providedIn : 'root' } ) export class CollectionsService { constructor ( private http ) { } /**
     * Returns all the offices
     */ getOffices ( ) { return this . http . get ( `/offices` ) ; } param { officeId } OfficeId getStaffs ( officeId ) { const httpParams = new HttpParams ( ) . set ( 'officeId' , officeId ) . set ( 'status' , 'all' ) ; return this . http . get ( `/staff` , { params : httpParams } ) ; } param { data } data retrieveCollectionSheetData ( data ) { const httpParams = new HttpParams ( ) . set ( 'command' , 'generateCollectionSheet' ) ; return this . http . post ( `/collectionsheet` , data , { params : httpParams } ) ; } param { data } data executeSaveCollectionSheet ( data ) { const httpParams = new HttpParams ( ) . set ( 'command' , 'saveCollectionSheet' ) ; return this . http . post ( `/collectionsheet` , data , { params : httpParams } ) ; } }