|
|
|
@ -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();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -112,11 +112,11 @@ export class HrRequestFormComponent implements OnInit {
|
|
|
|
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;
|
|
|
|
@ -130,11 +130,11 @@ getProject(){
|
|
|
|
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) {
|
|
|
|
handlegetProjectResult(result) {
|
|
|
|
this.Projectresult = result.Mohemm_Itg_ProjectsList;
|
|
|
|
this.Projectresult = result.Mohemm_Itg_ProjectsList;
|
|
|
|
this.getProjectDepartments();
|
|
|
|
this.getProjectDepartments();
|
|
|
|
@ -148,11 +148,11 @@ getProjectDepartments(){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
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) {
|
|
|
|
handlegetProjectDepartmentsResult(result) {
|
|
|
|
this.departTypeList = result.Mohemm_ITG_ProjectDepartmentsList;
|
|
|
|
this.departTypeList = result.Mohemm_ITG_ProjectDepartmentsList;
|
|
|
|
this.getDepartmentSections();
|
|
|
|
this.getDepartmentSections();
|
|
|
|
@ -166,11 +166,11 @@ getDepartmentSections(){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
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) {
|
|
|
|
handlegetDepartmentSectionsResult(result) {
|
|
|
|
this.sectionTypeList = result.Mohemm_ITG_DepartmentSectionsList;
|
|
|
|
this.sectionTypeList = result.Mohemm_ITG_DepartmentSectionsList;
|
|
|
|
|
|
|
|
|
|
|
|
@ -183,11 +183,11 @@ getSectionTopics(){
|
|
|
|
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;
|
|
|
|
@ -273,28 +273,27 @@ 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) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -336,10 +335,10 @@ 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) {
|
|
|
|
@ -351,7 +350,7 @@ 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 =>
|
|
|
|
|