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.
25 lines
961 B
TypeScript
25 lines
961 B
TypeScript
|
7 years ago
|
import {Injectable} from '@angular/core';
|
||
|
|
import {Http, Response, Headers} from "@angular/http";
|
||
|
|
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 {WorkListRequest} from '../models/workListRequest';
|
||
|
|
import {WorKListResponse} from '../models/workListResponse';
|
||
|
|
|
||
|
|
|
||
|
|
@Injectable()
|
||
|
|
export class WorklistService {
|
||
|
|
public static getWorkList = 'Services/ERP.svc/REST/GET_WORKLIST';
|
||
|
|
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);
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|