import {Injectable} from '@angular/core';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service';
import { Observable } from 'rxjs';
import {Request} from '../models/request'
import { ReplacementServiceRequest } from '../models/replacement-Service.request';

@Injectable()
export class replacmentListService {
  public static getReplacmentEmployeeList = 'Services/ERP.svc/REST/GET_REPLACEMENT_LIST';
    constructor(
      public api: ConnectorService,
      public authService: AuthenticationService,
  
    ) { 
        
    }
    public getReplacmentList(req: any, onError?: any, errorLabel?: string): Observable<any> {
        const request = req;
        this.authService.authenticateRequest(request);
        return this.api.post(replacmentListService.getReplacmentEmployeeList, request, onError, errorLabel);
      }
}