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/notification/service/worklist.service.ts

31 lines
1.2 KiB
TypeScript

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 { WorkListReplacmentEmployeeRequest } from '../models/ReplacmentEmployeeReq';
@Injectable()
export class WorklistService {
public static getWorkList = 'Services/ERP.svc/REST/GET_WORKLIST';
public static getReplacmentEmployeeList = 'Services/ERP.svc/REST/GET_REPLACEMENT_LIST';
constructor(
public api: ConnectorService,
public authService: AuthenticationService,
) { }
public getWorkList(WorkListReq: any, onError?: any, errorLabel?: string): Observable<any> {
const request = WorkListReq;
this.authService.authenticateRequest(request);
return this.api.post(WorklistService.getWorkList, request, onError, errorLabel);
}
public getReplacmentEmployeeList(ReplacmentEmployeeRequest: any, onError?: any, errorLabel?: string): Observable<any> {
const request = ReplacmentEmployeeRequest;
this.authService.authenticateRequest(request);
return this.api.post(WorklistService.getReplacmentEmployeeList, request, onError, errorLabel);
}
}