import { Response } from 'src/app/hmg-common/services/models/response'; import { VacationRuleRequest } from './../model/VacationRuleRequest'; import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service'; @Injectable({ providedIn: 'root' }) export class VacationRuleServiceService { /* Vacation Rule Methods */ public static getVacationRule = 'Services/ERP.svc/REST/GET_VACATION_RULES'; public static changePassword = 'Services/ERP.svc/REST/ChangePassword_FromActiveSession'; public static userChecking = 'Services/ERP.svc/REST/Get_BasicUserInformation'; public static getVacationType = 'Services/ERP.svc/REST/GET_VR_ITEM_TYPES'; public static getNotificationType = 'Services/ERP.svc/REST/GET_ITEM_TYPE_NOTIFICATIONS'; public static createVacationRule = 'Services/ERP.svc/REST/CREATE_VACATION_RULE'; public static deleteVacationRule = 'Services/ERP.svc/REST/DELETE_VACATION_RULE'; public static updateVacationRule = 'Services/ERP.svc/REST/UPDATE_VACATION_RULE'; public static respondAttributes = 'Services/ERP.svc/REST/GET_RESPOND_ATTRIBUTES'; public static notificationReassign = 'Services/ERP.svc/REST/GET_NOTIFICATION_REASSIGN_MODE'; constructor(public authService: AuthenticationService, public con: ConnectorService) { } public getVacationRule(vacationRuleRequest: VacationRuleRequest, onError: any, errorLabel: string): Observable { const request = vacationRuleRequest; console.log(request); this.authService.authenticateRequest(request); return this.con.post(VacationRuleServiceService.getVacationRule, request, onError, errorLabel) } }