You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mohemmionic5/Mohem/src/app/my-team/service/my-team.service.ts

20 lines
795 B
TypeScript

import { Injectable } from '@angular/core';
import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service';
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
@Injectable({
providedIn: 'root'
})
export class MyTeamService {
public static EMPLOYEE_SHARED_DATA = 'employee';
public static getMyTeam = 'Services/ERP.svc/REST/GET_EMPLOYEE_SUBORDINATES';
constructor(
public con: ConnectorService,
private authService: AuthenticationService
) { }
public getEmployeeSubordinates(absence: any, onError?: any, errorLabel?: string){
const request = absence;
this.authService.authenticateRequest(request);
return this.con.post(MyTeamService.getMyTeam, request, onError, errorLabel);
}
}