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.
34 lines
1.3 KiB
TypeScript
34 lines
1.3 KiB
TypeScript
import { Injectable } from '@angular/core';
|
|
import { Observable } from "rxjs";
|
|
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 ProfileService {
|
|
public static updateEmpImage ="Services/ERP.svc/REST/UPDATE_EMPLOYEE_IMAGE";
|
|
public static getEmployeeBasicDetails ="Services/ERP.svc/REST/GET_EMPLOYEE_BASIC_DETAILS";
|
|
|
|
constructor(
|
|
public api: ConnectorService,
|
|
public authService: AuthenticationService
|
|
) {}
|
|
|
|
public updateImageProfile( updateImgRequest: any,onError?: any,errorLabel?: string
|
|
): Observable<any> {
|
|
const request = updateImgRequest;
|
|
this.authService.authenticateRequest(request);
|
|
return this.api.post(
|
|
ProfileService.updateEmpImage,
|
|
request,
|
|
onError,
|
|
errorLabel
|
|
);
|
|
}
|
|
|
|
public getEmployeeBasicDetails(basicEmployeeDetailsRequest: any, onError?: any, errorLabel?: string): Observable<any> {
|
|
const request = basicEmployeeDetailsRequest;
|
|
this.authService.authenticateRequest(request);
|
|
return this.api.post(ProfileService.getEmployeeBasicDetails, request, onError, errorLabel);
|
|
}
|
|
} |