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.
43 lines
1.6 KiB
TypeScript
43 lines
1.6 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 getSubordintesLeaves = 'Services/ERP.svc/REST/GET_SUBORDINATES_LEAVES_TOTAL_VACATIONS';
|
|
// 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 getEmployeeSubordinatesLeave(absence: any, onError?: any, errorLabel?: string){
|
|
const request = absence;
|
|
this.authService.authenticateRequest(request);
|
|
request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName;
|
|
return this.con.post(MyTeamService.getSubordintesLeaves, request, onError, errorLabel);
|
|
}
|
|
|
|
// public getSuborinatesAttStatus(absence: any, onError?: any, errorLabel?: string){
|
|
// const request = absence;
|
|
// this.authService.authenticateRequest(request);
|
|
// console.log("________________________________");
|
|
// console.log(request);
|
|
// return this.con.post(MyTeamService.getSuborinateStatus, request, onError, errorLabel);
|
|
// }
|
|
|
|
|
|
|
|
|
|
}
|