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.
33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
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';
|
|
public static getSuborinateStatus = 'Services/ERP.svc/REST/GET_SUBORDINATES_ATTD_STATUS';
|
|
|
|
|
|
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);
|
|
}
|
|
|
|
public getSuborinatesAttStatus(absence: any, onError?: any, errorLabel?: string){
|
|
const request = absence;
|
|
this.authService.authenticateRequest(request);
|
|
return this.con.post(MyTeamService.getSuborinateStatus, request, onError, errorLabel);
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|