import { Injectable } from '@angular/core'; import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; import { CommonService } from 'src/app/hmg-common/services/common/common.service'; import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service'; @Injectable({ providedIn: 'root' }) export class TerminationServiceService { public static GET_TERM_COLS_STRUCTURE = 'Services/ERP.svc/REST/GET_TERM_COLS_STRUCTURE'; public static GET_TERM_DIFF_STRUCTURE = 'Services/ERP.svc/REST/GET_TERM_DFF_STRUCTURE'; public static TERMINATION_PAGE = 'termination-page'; constructor( public con: ConnectorService, private authService: AuthenticationService, public cs: CommonService ) { } getTerminationColStructure(request, onError, errorLabel) { this.authService.authenticateRequest(request); request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName; return this.con.postNoLoad( TerminationServiceService.GET_TERM_COLS_STRUCTURE, request, onError, errorLabel ); } getTermDiffStructure(request, onError, errorLabel) { this.authService.authenticateRequest(request); request.P_SELECTED_EMPLOYEE_NUMBER = request.UserName; return this.con.postNoLoad( TerminationServiceService.GET_TERM_DIFF_STRUCTURE, request, onError, errorLabel ); } }