hr request

zohaib-huawei-q2
Sultan Khan 5 years ago
parent cdc81881f5
commit 8a5e9f25e7

@ -145,7 +145,7 @@
<ion-footer > <ion-footer >
<div class="centerDiv"> <div class="centerDiv">
<button class="gridCancelBtn" ion-button (click)="cancelRequest()">{{ts.trPK('general','cancel')}}</button> <button class="gridCancelBtn" ion-button (click)="cancelRequest()">{{ts.trPK('general','cancel')}}</button>
<button class="gridSubmitBtn" ion-button (click)="submitRequest()">{{ts.trPK('general','submit')}}</button> <button class="gridSubmitBtn" ion-button (click)="getCreateTicket()">{{ts.trPK('general','submit')}}</button>
</div> </div>
</ion-footer> </ion-footer>

@ -17,52 +17,52 @@ import { FileUploader } from 'ng2-file-upload';
styleUrls: ['./hr-request-form.component.scss'], styleUrls: ['./hr-request-form.component.scss'],
}) })
export class HrRequestFormComponent implements OnInit { export class HrRequestFormComponent implements OnInit {
public EmpName : string; public EmpName: string;
public EmpNum : string; public EmpNum: string;
public EmpGroup : string; public EmpGroup: string;
public EmpMobile : string; public EmpMobile: string;
public EmpJob : string; public EmpJob: string;
public EmpOrgName : string; public EmpOrgName: string;
public EmpPayrol : string; public EmpPayrol: string;
public EmpPosition : string; public EmpPosition: string;
public EmpEmail: string; public EmpEmail: string;
public EmpCatMeaning:string; public EmpCatMeaning: string;
public EmpGRADENAME : string; public EmpGRADENAME: string;
public EmpLocation : string; public EmpLocation: string;
public EmpImg : string; public EmpImg: string;
public userImage: any = '../assets/imgs/profile.png'; public userImage: any = '../assets/imgs/profile.png';
public loginData = new LoginModel(); public loginData = new LoginModel();
public searchKeySelect = 'Complaints'; public searchKeySelect = 'Complaints';
myColor: string = 'secondary'; myColor: string = 'secondary';
public showRequestDetails = false; public showRequestDetails = false;
public proID= "CS" public proID = "CS"
public inquiry: string; public inquiry: string;
public HR : string; public HR: string;
public complaints:string; public complaints: string;
public Projectresult:any; public Projectresult: any;
public EmpRelations:any; public EmpRelations: any;
public Hr:any; public Hr: any;
public Payroll:any; public Payroll: any;
public GovRelation:any; public GovRelation: any;
public projName:any; public projName: any;
public topicName:any; public topicName: any;
public departTypeList: any; public departTypeList: any;
public topicTypeList:any; public topicTypeList: any;
public sectionTypeList:any; public sectionTypeList: any;
public projectDetial:any; public projectDetial: any;
public projectDep:any; public projectDep: any;
public sectionDep:any; public sectionDep: any;
public projectCode; public projectCode;
public SelectedServiceType:any; public SelectedServiceType: any;
public depType:any; public depType: any;
public secType:any; public secType: any;
public topicType:any; public topicType: any;
indexLastObj: any; indexLastObj: any;
addAttachRequest: any = []; addAttachRequest: any = [];
TransactionID: any; TransactionID: any;
public teckitDetial:any; public teckitDetial: any;
public teckitInfo:any; public teckitInfo: any;
public Description:any; public Description: any;
public selectedFile: any; public selectedFile: any;
filterAllowedType: any = [ filterAllowedType: any = [
"application/pdf", "application/pdf",
@ -95,7 +95,7 @@ export class HrRequestFormComponent implements OnInit {
this.getTicketsByEmployee(); this.getTicketsByEmployee();
this.getTicketTypes(); this.getTicketTypes();
this.getProject(); this.getProject();
this.getCreateTicket(); //this.getCreateTicket();
} }
@ -105,92 +105,92 @@ export class HrRequestFormComponent implements OnInit {
} }
showSelectedField(){} showSelectedField() { }
getTicketTypes(){ getTicketTypes() {
const request = { const request = {
EmployeeNumber:"", EmployeeNumber: "",
}; };
this.MowadhafiService.getTicketTypes(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=> this.MowadhafiService.getTicketTypes(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => {
{
this.handlegetTicketTypesResult(result); this.handlegetTicketTypesResult(result);
}) } })
handlegetTicketTypesResult(result){ }
handlegetTicketTypesResult(result) {
this.HR = result.Mohemm_Itg_TicketTypesList[0].typeName; this.HR = result.Mohemm_Itg_TicketTypesList[0].typeName;
this.complaints = result.Mohemm_Itg_TicketTypesList[1].typeName; this.complaints = result.Mohemm_Itg_TicketTypesList[1].typeName;
this.inquiry = result.Mohemm_Itg_TicketTypesList[2].typeName; this.inquiry = result.Mohemm_Itg_TicketTypesList[2].typeName;
} }
getProject(){ getProject() {
const request = { const request = {
EmployeeNumber:"", EmployeeNumber: "",
ItgProjectCode: this.projectCode ItgProjectCode: this.projectCode
}; };
this.MowadhafiService.getProject(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=> this.MowadhafiService.getProject(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => {
{
this.handlegetProjectResult(result); this.handlegetProjectResult(result);
}) } })
handlegetProjectResult(result){ }
this.Projectresult=result.Mohemm_Itg_ProjectsList; handlegetProjectResult(result) {
this.Projectresult = result.Mohemm_Itg_ProjectsList;
this.getProjectDepartments(); this.getProjectDepartments();
} }
getProjectDepartments(){ getProjectDepartments() {
const request = { const request = {
EmployeeNumber:"", EmployeeNumber: "",
ItgProjectId:this.Projectresult[0].projectId, ItgProjectId: this.Projectresult[0].projectId,
}; };
this.MowadhafiService.getProjectDepartments(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=> this.MowadhafiService.getProjectDepartments(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => {
{
this.handlegetProjectDepartmentsResult(result); this.handlegetProjectDepartmentsResult(result);
}) } })
handlegetProjectDepartmentsResult(result){ }
this.departTypeList= result.Mohemm_ITG_ProjectDepartmentsList; handlegetProjectDepartmentsResult(result) {
this.departTypeList = result.Mohemm_ITG_ProjectDepartmentsList;
this.getDepartmentSections(); this.getDepartmentSections();
} }
getDepartmentSections(){ getDepartmentSections() {
const request = { const request = {
EmployeeNumber:"", EmployeeNumber: "",
ItgProjectDepartmentId:this.departTypeList.projectDepartmentId, ItgProjectDepartmentId: this.departTypeList.projectDepartmentId,
}; };
this.MowadhafiService.getDepartmentSections(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=> this.MowadhafiService.getDepartmentSections(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => {
{
this.handlegetDepartmentSectionsResult(result); this.handlegetDepartmentSectionsResult(result);
}) } })
handlegetDepartmentSectionsResult(result){ }
this.sectionTypeList= result.Mohemm_ITG_DepartmentSectionsList; handlegetDepartmentSectionsResult(result) {
this.sectionTypeList = result.Mohemm_ITG_DepartmentSectionsList;
this.getSectionTopics(); this.getSectionTopics();
} }
getSectionTopics(){ getSectionTopics() {
const request = { const request = {
EmployeeNumber:"", EmployeeNumber: "",
ItgDepartmentSectionId:this.sectionTypeList.departmentSectionId, ItgDepartmentSectionId: this.sectionTypeList.departmentSectionId,
}; };
this.MowadhafiService.getSectionTopics(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=> this.MowadhafiService.getSectionTopics(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => {
{
this.handlegetSectionTopicsResult(result); this.handlegetSectionTopicsResult(result);
}) } })
handlegetSectionTopicsResult(result){ }
handlegetSectionTopicsResult(result) {
// this.topicName=result.Mohemm_ITG_SectionTopicsList[0].topicName // this.topicName=result.Mohemm_ITG_SectionTopicsList[0].topicName
this.topicTypeList= result.Mohemm_ITG_SectionTopicsList; this.topicTypeList = result.Mohemm_ITG_SectionTopicsList;
} }
@ -234,12 +234,12 @@ getSectionTopics(){
}) })
} }
handlegetTicketsByEmployeeResult(result){ handlegetTicketsByEmployeeResult(result) {
let x; let x;
if(this.cs.validResponse(result)){ if (this.cs.validResponse(result)) {
x = JSON.parse(result.Mohemm_ITG_ResponseItem); x = JSON.parse(result.Mohemm_ITG_ResponseItem);
console.log(x); console.log(x);
this.teckitInfo=x.result.data; this.teckitInfo = x.result.data;
// for (let i = 0; i < this.ticketsInfo.length; i++) { // for (let i = 0; i < this.ticketsInfo.length; i++) {
// console.log(i + ' : ' + this.ticketsInfo[i].ticketTypeName) // console.log(i + ' : ' + this.ticketsInfo[i].ticketTypeName)
@ -252,7 +252,7 @@ getSectionTopics(){
} }
getCreateTicket(){ getCreateTicket() {
// const request = { // const request = {
// // EmployeeNumber:"", // // EmployeeNumber:"",
// // ticketTypeId:this.teckitInfo[0].ticketTypeId, // // ticketTypeId:this.teckitInfo[0].ticketTypeId,
@ -273,29 +273,28 @@ getSectionTopics(){
// }; // };
var request = new FormData(); var request = new FormData();
request.append('EmployeeNumber',"" );
request.append('ticketTypeId', this.teckitInfo[0].ticketTypeId );
request.append('projectId',this.teckitInfo[0].projectId);
request.append('departmentId',this.teckitInfo[0].departmentId );
request.append('sectionId',this. teckitInfo[0].sectionId );
request.append('sectionTopicId', this.teckitInfo[0].topicId );
request.append('description',this.teckitInfo[0].description );
request.append('fileColl',this.selectedFile[0],this.selectedFile[0].name );
request.append('employeeNumber',this.teckitInfo[0].employeeNumber );
request.append('ticketStatus',this.teckitInfo[0].ticketStatusName );
request.append('ticketTypeId', '1');
request.append('projectId', '11');
request.append('departmentId', '1');
request.append('sectionId', '1');
request.append('sectionTopicId', '1');
request.append('description', this.Description);
//request.append('fileColl', this.selectedFile[0], this.selectedFile[0].name);
request.append('employeeNumber', '13777');
request.append('ticketStatus', 'new');
request.append('channel', '31');
//request.append('file', this.uploadForm.get('profile').value); //request.append('file', this.uploadForm.get('profile').value);
this.MowadhafiService.getCreateTicket(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=> this.MowadhafiService.getCreateTicket(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => {
{
this.handlegetCreateTicketResult(result); this.handlegetCreateTicketResult(result);
}) } })
handlegetCreateTicketResult(result){ }
handlegetCreateTicketResult(result) {
} }
@ -304,14 +303,14 @@ getSectionTopics(){
public cancelRequest() { public cancelRequest() {
this.cs.openMyRequestPage(); this.cs.openMyRequestPage();
// this.menu.toggle(); // this.menu.toggle();
} }
/*******************Add attchement Functions*************/ /*******************Add attchement Functions*************/
public uploader: FileUploader = new FileUploader({ public uploader: FileUploader = new FileUploader({
allowedMimeType: [ allowedMimeType: [
"application/pdf", "application/pdf",
"image/jpeg", "image/jpeg",
@ -333,16 +332,16 @@ public uploader: FileUploader = new FileUploader({
}); });
}); });
} }
}); });
onFileSelectedclick(event){ // onFileSelected(event) {
//event.target.value = ''; // //event.target.value = '';
this.selectedFile = event; // this.selectedFile = event;
} // }
onFileSelected(input) { onFileSelected(input) {
if (!(this.filterAllowedType.indexOf(input.target.files[0].type) > -1)) { if (!(this.filterAllowedType.indexOf(input.target.files[0].type) > -1)) {
let msg: string = ""; let msg: string = "";
msg = this.ts.trPK("general", "noFileSelect"); msg = this.ts.trPK("general", "noFileSelect");
@ -351,26 +350,26 @@ onFileSelected(input) {
} // todo: show alert that you tried uploading wrong files } // todo: show alert that you tried uploading wrong files
else { else {
const file = input.target.files[0]; const file = input.target.files[0];
this.selectedFile = input.target.files;
// console.log(file); // console.log(file);
this.getBase64(file).then(data => this.getBase64(file).then(data =>
this.pushObject(data, file.name, file.type) this.pushObject(data, file.name, file.type)
); );
} }
} }
getBase64(file) { getBase64(file) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const reader = new FileReader(); const reader = new FileReader();
reader.readAsDataURL(file); reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result); reader.onload = () => resolve(reader.result);
reader.onerror = error => reject(error); reader.onerror = error => reject(error);
}); });
} }
pushObject(fileData, name, type) { pushObject(fileData, name, type) {
// console.log("before push: "+ this.index); // console.log("before push: "+ this.index);
this.indexLastObj++; this.indexLastObj++;
try { try {
@ -384,21 +383,21 @@ pushObject(fileData, name, type) {
P_FILE_NAME: name, //.split('.')[0], P_FILE_NAME: name, //.split('.')[0],
P_TRANSACTION_ID: this.TransactionID P_TRANSACTION_ID: this.TransactionID
}); });
} catch (e) {} } catch (e) { }
} }
removeFile(objectitem) { removeFile(objectitem) {
let objIndex1 = this.uploader.queue.findIndex(item => item == objectitem); let objIndex1 = this.uploader.queue.findIndex(item => item == objectitem);
this.uploader.queue.splice(objIndex1, 1); this.uploader.queue.splice(objIndex1, 1);
let objIndex = this.addAttachRequest.findIndex( let objIndex = this.addAttachRequest.findIndex(
item => item.AttachmentID == objectitem.AttachmentID item => item.AttachmentID == objectitem.AttachmentID
); );
this.addAttachRequest.splice(objIndex, 1); this.addAttachRequest.splice(objIndex, 1);
} }
submitRequest(){ submitRequest() {
} }
} }

@ -1,7 +1,7 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service'; import { ConnectorService } from 'src/app/hmg-common/services/connector/connector.service';
import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service"; import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service";
import { HttpClient, HttpHeaders } from '@angular/common/http';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
}) })
@ -9,102 +9,113 @@ export class MowadhafiService {
public static EMPLOYEE_SHARED_DATA = 'employee'; public static EMPLOYEE_SHARED_DATA = 'employee';
public static getMyTeam = 'Services/ERP.svc/REST/GET_EMPLOYEE_SUBORDINATES'; public static getMyTeam = 'Services/ERP.svc/REST/GET_EMPLOYEE_SUBORDINATES';
public static getSuborinateStatus = 'Services/ERP.svc/REST/GET_SUBORDINATES_ATTD_STATUS'; public static getSuborinateStatus = 'Services/ERP.svc/REST/GET_SUBORDINATES_ATTD_STATUS';
public static getUserInfo ='Services/ERP.svc/REST/Get_UserInformation'; public static getUserInfo = 'Services/ERP.svc/REST/Get_UserInformation';
public static getTicketTypes ='Services/COCWS.svc/REST/Mohemm_ITG_GetTicketTypes'; public static getTicketTypes = 'Services/COCWS.svc/REST/Mohemm_ITG_GetTicketTypes';
public static getProject ='Services/COCWS.svc/REST/Mohemm_ITG_GetProjects'; public static getProject = 'Services/COCWS.svc/REST/Mohemm_ITG_GetProjects';
public static getProjectDepartments ='Services/COCWS.svc/REST/Mohemm_ITG_GetProjectDepartments'; public static getProjectDepartments = 'Services/COCWS.svc/REST/Mohemm_ITG_GetProjectDepartments';
public static getDepartmentSections ='Services/COCWS.svc/REST/Mohemm_ITG_GetDepartmentSections'; public static getDepartmentSections = 'Services/COCWS.svc/REST/Mohemm_ITG_GetDepartmentSections';
public static getSectionTopics ='Services/COCWS.svc/REST/Mohemm_ITG_GetSectionTopics'; public static getSectionTopics = 'Services/COCWS.svc/REST/Mohemm_ITG_GetSectionTopics';
public static getTicketsByEmployee ='Services/COCWS.svc/REST/Mohemm_ITG_GetTicketsByEmployee'; public static getTicketsByEmployee = 'Services/COCWS.svc/REST/Mohemm_ITG_GetTicketsByEmployee';
public static getTicketStatisticsByEmp ='Services/COCWS.svc/REST/Mohemm_ITG_GetTicketStatisticsByEmployee'; public static getTicketStatisticsByEmp = 'Services/COCWS.svc/REST/Mohemm_ITG_GetTicketStatisticsByEmployee';
public static getTicketTransaction ='Services/COCWS.svc/REST/Mohemm_ITG_GetTicketTransaction'; public static getTicketTransaction = 'Services/COCWS.svc/REST/Mohemm_ITG_GetTicketTransaction';
public static getTicketDetails ='Services/COCWS.svc/REST/Mohemm_ITG_GetTicketDetails'; public static getTicketDetails = 'Services/COCWS.svc/REST/Mohemm_ITG_GetTicketDetails';
public static getCreateTicket = 'Services/COCWS.svc/REST/Mohemm_ITG_CreateTicket'; public static getCreateTicket = 'Services/COCWS.svc/REST/Mohemm_ITG_CreateTicket';
constructor( constructor(
public con: ConnectorService, public con: ConnectorService,
private authService: AuthenticationService private authService: AuthenticationService,
public http: HttpClient
) { } ) { }
public getEmployeeSubordinates(absence: any, onError?: any, errorLabel?: string){ public getEmployeeSubordinates(absence: any, onError?: any, errorLabel?: string) {
const request = absence; const request = absence;
this.authService.authenticateRequest(request); this.authService.authenticateRequest(request);
return this.con.post(MowadhafiService.getMyTeam, request, onError, errorLabel); return this.con.post(MowadhafiService.getMyTeam, request, onError, errorLabel);
} }
public getSuborinatesAttStatus(absence: any, onError?: any, errorLabel?: string){ public getSuborinatesAttStatus(absence: any, onError?: any, errorLabel?: string) {
const request = absence; const request = absence;
this.authService.authenticateRequest(request); this.authService.authenticateRequest(request);
return this.con.post(MowadhafiService.getSuborinateStatus, request, onError, errorLabel); return this.con.post(MowadhafiService.getSuborinateStatus, request, onError, errorLabel);
} }
public getUserInfo(absence: any, onError?: any, errorLabel?: string){ public getUserInfo(absence: any, onError?: any, errorLabel?: string) {
const request = absence; const request = absence;
this.authService.authenticateRequest(request); this.authService.authenticateRequest(request);
return this.con.post(MowadhafiService.getUserInfo, request, onError, errorLabel); return this.con.post(MowadhafiService.getUserInfo, request, onError, errorLabel);
} }
public getTicketTypes(absence: any, onError?: any, errorLabel?: string){ public getTicketTypes(absence: any, onError?: any, errorLabel?: string) {
const request = absence; const request = absence;
this.authService.authenticateRequest(request); this.authService.authenticateRequest(request);
request.EmployeeNumber = request.P_USER_NAME; request.EmployeeNumber = request.P_USER_NAME;
console.log(request); console.log(request);
return this.con.post(MowadhafiService.getTicketTypes, request, onError, errorLabel); return this.con.post(MowadhafiService.getTicketTypes, request, onError, errorLabel);
} }
public getProject(absence: any, onError?: any, errorLabel?: string){ public getProject(absence: any, onError?: any, errorLabel?: string) {
const request = absence; const request = absence;
this.authService.authenticateRequest(request); this.authService.authenticateRequest(request);
request.EmployeeNumber = request.P_USER_NAME; request.EmployeeNumber = request.P_USER_NAME;
// request.ItgProjectCode = request.projectCode; // request.ItgProjectCode = request.projectCode;
return this.con.post(MowadhafiService.getProject, request, onError, errorLabel); return this.con.post(MowadhafiService.getProject, request, onError, errorLabel);
} }
public getProjectDepartments(absence: any, onError?: any, errorLabel?: string){ public getProjectDepartments(absence: any, onError?: any, errorLabel?: string) {
const request = absence; const request = absence;
this.authService.authenticateRequest(request); this.authService.authenticateRequest(request);
request.EmployeeNumber = request.P_USER_NAME; request.EmployeeNumber = request.P_USER_NAME;
return this.con.post(MowadhafiService.getProjectDepartments, request, onError, errorLabel); return this.con.post(MowadhafiService.getProjectDepartments, request, onError, errorLabel);
} }
public getDepartmentSections(absence: any, onError?: any, errorLabel?: string){ public getDepartmentSections(absence: any, onError?: any, errorLabel?: string) {
const request = absence; const request = absence;
this.authService.authenticateRequest(request); this.authService.authenticateRequest(request);
request.EmployeeNumber = request.P_USER_NAME; request.EmployeeNumber = request.P_USER_NAME;
return this.con.post(MowadhafiService.getDepartmentSections, request, onError, errorLabel); return this.con.post(MowadhafiService.getDepartmentSections, request, onError, errorLabel);
} }
public getSectionTopics(absence: any, onError?: any, errorLabel?: string){ public getSectionTopics(absence: any, onError?: any, errorLabel?: string) {
const request = absence; const request = absence;
this.authService.authenticateRequest(request); this.authService.authenticateRequest(request);
request.EmployeeNumber = request.P_USER_NAME; request.EmployeeNumber = request.P_USER_NAME;
return this.con.post(MowadhafiService.getSectionTopics, request, onError, errorLabel); return this.con.post(MowadhafiService.getSectionTopics, request, onError, errorLabel);
} }
public getTicketsByEmployee(absence: any, onError?: any, errorLabel?: string){ public getTicketsByEmployee(absence: any, onError?: any, errorLabel?: string) {
let request = absence; let request = absence;
this.authService.authenticateRequest(request); this.authService.authenticateRequest(request);
request.EmployeeNumber = request.P_USER_NAME; request.EmployeeNumber = request.P_USER_NAME;
return this.con.post(MowadhafiService.getTicketsByEmployee, request, onError, errorLabel); return this.con.post(MowadhafiService.getTicketsByEmployee, request, onError, errorLabel);
} }
public getTicketStatisticsByEmp(absence: any, onError?: any, errorLabel?: string){ public getTicketStatisticsByEmp(absence: any, onError?: any, errorLabel?: string) {
const request = absence; const request = absence;
this.authService.authenticateRequest(request); this.authService.authenticateRequest(request);
return this.con.post(MowadhafiService.getTicketStatisticsByEmp, request, onError, errorLabel); return this.con.post(MowadhafiService.getTicketStatisticsByEmp, request, onError, errorLabel);
} }
public getTicketTransaction(absence: any, onError?: any, errorLabel?: string){ public getTicketTransaction(absence: any, onError?: any, errorLabel?: string) {
const request = absence; const request = absence;
this.authService.authenticateRequest(request); this.authService.authenticateRequest(request);
request.EmployeeNumber = request.P_USER_NAME; request.EmployeeNumber = request.P_USER_NAME;
return this.con.post(MowadhafiService.getTicketTransaction, request, onError, errorLabel); return this.con.post(MowadhafiService.getTicketTransaction, request, onError, errorLabel);
} }
public getTicketDetails(absence: any, onError?: any, errorLabel?: string){ public getTicketDetails(absence: any, onError?: any, errorLabel?: string) {
const request = absence; const request = absence;
this.authService.authenticateRequest(request); this.authService.authenticateRequest(request);
request.EmployeeNumber = request.P_USER_NAME; request.EmployeeNumber = request.P_USER_NAME;
return this.con.post(MowadhafiService.getTicketDetails, request, onError, errorLabel); return this.con.post(MowadhafiService.getTicketDetails, request, onError, errorLabel);
} }
public getCreateTicket(absence: any, onError?: any, errorLabel?: string){ public getCreateTicket(absence: any, onError?: any, errorLabel?: string) {
const request = absence; const request = absence;
this.authService.authenticateRequest(request); this.authService.authenticateRequest(request);
request.EmployeeNumber = request.P_USER_NAME; request.EmployeeNumber = request.P_USER_NAME;
return this.con.post(MowadhafiService.getCreateTicket, request, onError, errorLabel); const HttpUploadOptions = {
headers: new HttpHeaders({ "Content-Type": "multipart/form-data", })
}
// return this.con.post(MowadhafiService.getCreateTicket, request, onError, errorLabel);
return this.http.post(ConnectorService.host + MowadhafiService.getCreateTicket, absence, {
reportProgress: true,
observe: 'events'
} }
)
}
} }
Loading…
Cancel
Save