|
|
|
|
@ -2,16 +2,70 @@ 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 "src/app/hmg-common/services/models/request";
|
|
|
|
|
import { OrganizationSalariesResponse } from './organization-salaries.response';
|
|
|
|
|
import { OpenMissingSwipesResponse } from './open-missing-swipes.response';
|
|
|
|
|
import { PerformanceAppraisalResponse } from './performance-appraisal.response';
|
|
|
|
|
import {AttendanceTrackingResponse} from './attendance-tracking.response'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Injectable({
|
|
|
|
|
providedIn: 'root'
|
|
|
|
|
})
|
|
|
|
|
export class DashboredService {
|
|
|
|
|
public static organizationSalariesUrl="Services/ERP.svc/REST/GET_ORGANIZATIONS_SALARIES"
|
|
|
|
|
public static openmissingswipesUrl="Services/ERP.svc/REST/GET_OPEN_MISSING_SWIPES"
|
|
|
|
|
public static performanceappraisalUrl="Services/ERP.svc/REST/GET_Performance_Appraisal"
|
|
|
|
|
public static attendancetrackingUrl="Services/ERP.svc/REST/GET_Attendance_Tracking"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
constructor(
|
|
|
|
|
public api: ConnectorService,
|
|
|
|
|
public con: ConnectorService,
|
|
|
|
|
public authService: AuthenticationService,
|
|
|
|
|
) { }
|
|
|
|
|
|
|
|
|
|
public getOrganizationSalaries(onError ?:any ,oerrorLable ?:any):Observable<OrganizationSalariesResponse>{
|
|
|
|
|
const request = new Request();
|
|
|
|
|
this.authService.authenticateRequest(request);
|
|
|
|
|
return this.con.post(
|
|
|
|
|
DashboredService.organizationSalariesUrl,
|
|
|
|
|
request,
|
|
|
|
|
onError,
|
|
|
|
|
oerrorLable
|
|
|
|
|
);}
|
|
|
|
|
|
|
|
|
|
public getOpenMissingSwipes(onError ?:any ,oerrorLable ?:any):Observable<OpenMissingSwipesResponse>{
|
|
|
|
|
const request = new Request();
|
|
|
|
|
this.authService.authenticateRequest(request);
|
|
|
|
|
return this.con.post(
|
|
|
|
|
DashboredService.openmissingswipesUrl,
|
|
|
|
|
request,
|
|
|
|
|
onError,
|
|
|
|
|
oerrorLable
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public getPerformanceAppraisal(onError ?:any ,oerrorLable ?:any):Observable<PerformanceAppraisalResponse>{
|
|
|
|
|
const request = new Request();
|
|
|
|
|
this.authService.authenticateRequest(request);
|
|
|
|
|
return this.con.post(
|
|
|
|
|
DashboredService.performanceappraisalUrl,
|
|
|
|
|
request,
|
|
|
|
|
onError,
|
|
|
|
|
oerrorLable
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
public getAttendanceTracking(onError ?:any ,oerrorLable ?:any):Observable<AttendanceTrackingResponse>{
|
|
|
|
|
const request = new Request();
|
|
|
|
|
this.authService.authenticateRequest(request);
|
|
|
|
|
return this.con.post(
|
|
|
|
|
DashboredService.attendancetrackingUrl,
|
|
|
|
|
request,
|
|
|
|
|
onError,
|
|
|
|
|
oerrorLable
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|