|
|
|
@ -244,27 +244,43 @@ export class HrRequestFormComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
var authUser = this.authService.getAuthenticatedRequest();
|
|
|
|
var authUser = this.authService.getAuthenticatedRequest();
|
|
|
|
this.cs.startLoading();
|
|
|
|
this.cs.startLoading();
|
|
|
|
var request = new FormData();
|
|
|
|
// var request = new FormData();
|
|
|
|
request.append('ticketTypeId', this.SelectedServiceType);
|
|
|
|
// request.append('ticketTypeId', this.SelectedServiceType);
|
|
|
|
request.append('projectId', this.projctid);
|
|
|
|
// request.append('projectId', this.projctid);
|
|
|
|
request.append('departmentId', this.depType);
|
|
|
|
// request.append('departmentId', this.depType);
|
|
|
|
request.append('sectionId', this.secType);
|
|
|
|
// request.append('sectionId', this.secType);
|
|
|
|
request.append('sectionTopicId', this.topicType);
|
|
|
|
// request.append('sectionTopicId', this.topicType);
|
|
|
|
request.append('description', this.Description);
|
|
|
|
// request.append('description', this.Description);
|
|
|
|
console.log("TEST:______")
|
|
|
|
|
|
|
|
console.log(this.selectedFile);
|
|
|
|
// if(this.selectedFile && this.selectedFile !== undefined){
|
|
|
|
if(this.selectedFile && this.selectedFile !== undefined){
|
|
|
|
// request.append('fileColl', this.selectedFile[0], this.selectedFile[0].name);
|
|
|
|
request.append('fileColl', this.selectedFile[0], this.selectedFile[0].name);
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// request.append('employeeNumber', authUser.P_USER_NAME);
|
|
|
|
request.append('employeeNumber', authUser.P_USER_NAME);
|
|
|
|
// request.append('ticketStatus', 'new');
|
|
|
|
request.append('ticketStatus', 'new');
|
|
|
|
// request.append('channelId', '3');
|
|
|
|
request.append('channelId', '3');
|
|
|
|
// request.append('Channel', authUser.Channel.toString());
|
|
|
|
request.append('Channel', authUser.Channel.toString());
|
|
|
|
// request.append('LogInToken', authUser.LogInTokenID);
|
|
|
|
request.append('LogInToken', authUser.LogInTokenID);
|
|
|
|
// request.append('Token', authUser.TokenID);
|
|
|
|
request.append('Token', authUser.TokenID);
|
|
|
|
// request.append('EmployeeNumber', authUser.P_USER_NAME);
|
|
|
|
request.append('EmployeeNumber', authUser.P_USER_NAME);
|
|
|
|
// request.append('MobileNo', authUser.MobileNumber);
|
|
|
|
request.append('MobileNo', authUser.MobileNumber);
|
|
|
|
|
|
|
|
|
|
|
|
var request = {
|
|
|
|
|
|
|
|
"TokenID": authUser.LogInTokenID, "EmployeeNumber": authUser.P_USER_NAME, "ItgImageCollList": this.addAttachRequest,
|
|
|
|
|
|
|
|
"ticketTypeId": this.SelectedServiceType,
|
|
|
|
|
|
|
|
"projectId": this.projctid,
|
|
|
|
|
|
|
|
"departmentId": this.depType,
|
|
|
|
|
|
|
|
"sectionId": this.secType,
|
|
|
|
|
|
|
|
"sectionTopicId": this.topicType,
|
|
|
|
|
|
|
|
"description": this.Description,
|
|
|
|
|
|
|
|
"employeeNumber": authUser.P_USER_NAME,
|
|
|
|
|
|
|
|
"ticketStatus": "new",
|
|
|
|
|
|
|
|
"channelId": 3,
|
|
|
|
|
|
|
|
"Channel": authUser.Channel.toString(),
|
|
|
|
|
|
|
|
"LogInToken": authUser.LogInTokenID,
|
|
|
|
|
|
|
|
"Token": authUser.TokenID,
|
|
|
|
|
|
|
|
"MobileNo": authUser.MobileNumber,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.MowadhafiService.getCreateTicket(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result: any) => {
|
|
|
|
this.MowadhafiService.getCreateTicket(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result: any) => {
|
|
|
|
if (this.cs.validResponse(result)) {
|
|
|
|
if (this.cs.validResponse(result)) {
|
|
|
|
@ -355,11 +371,14 @@ export class HrRequestFormComponent implements OnInit {
|
|
|
|
let attachType: string = array[array.length - 1];
|
|
|
|
let attachType: string = array[array.length - 1];
|
|
|
|
|
|
|
|
|
|
|
|
this.addAttachRequest.push({
|
|
|
|
this.addAttachRequest.push({
|
|
|
|
AttachmentID: this.indexLastObj,
|
|
|
|
// AttachmentID: this.indexLastObj,
|
|
|
|
P_FILE_CONTENT_TYPE: attachType, //type.split('/')[1],
|
|
|
|
// P_FILE_CONTENT_TYPE: attachType, //type.split('/')[1],
|
|
|
|
P_FILE_DATA: fileData.split(",")[1],
|
|
|
|
// P_FILE_DATA: fileData.split(",")[1],
|
|
|
|
P_FILE_NAME: name, //.split('.')[0],
|
|
|
|
// P_FILE_NAME: name, //.split('.')[0],
|
|
|
|
P_TRANSACTION_ID: this.TransactionID
|
|
|
|
// P_TRANSACTION_ID: this.TransactionID
|
|
|
|
|
|
|
|
Base64Data: fileData.split(",")[1],
|
|
|
|
|
|
|
|
FileName: name,
|
|
|
|
|
|
|
|
ContentType: 'image/' + attachType
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} catch (e) { }
|
|
|
|
} catch (e) { }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|