|
|
|
@ -95,6 +95,7 @@ export class HrRequestFormComponent implements OnInit {
|
|
|
|
this.getTicketsByEmployee();
|
|
|
|
this.getTicketsByEmployee();
|
|
|
|
this.getTicketTypes();
|
|
|
|
this.getTicketTypes();
|
|
|
|
this.getProject();
|
|
|
|
this.getProject();
|
|
|
|
|
|
|
|
|
|
|
|
//this.getCreateTicket();
|
|
|
|
//this.getCreateTicket();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -295,6 +296,7 @@ export class HrRequestFormComponent implements OnInit {
|
|
|
|
this.MowadhafiService.getCreateTicket(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => {
|
|
|
|
this.MowadhafiService.getCreateTicket(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => {
|
|
|
|
this.cs.stopLoading();
|
|
|
|
this.cs.stopLoading();
|
|
|
|
this.handlegetCreateTicketResult(result);
|
|
|
|
this.handlegetCreateTicketResult(result);
|
|
|
|
|
|
|
|
this.checkERM('After Service Submission');
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -404,4 +406,44 @@ export class HrRequestFormComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
checkERM(status) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.authService.checkAds({
|
|
|
|
|
|
|
|
EmployeeNumber: '',
|
|
|
|
|
|
|
|
ItgEnableAt: status, //After Service Submission
|
|
|
|
|
|
|
|
ItgServiceName: "Ticket"
|
|
|
|
|
|
|
|
}, () => { }, this.ts.trPK('general', 'ok')).subscribe(res => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var result = JSON.parse(res.Mohemm_ITG_ResponseItem).result.data;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.cs.sharedService.setSharedData(
|
|
|
|
|
|
|
|
result,
|
|
|
|
|
|
|
|
AuthenticationService.SERVEY_DATA
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
if (!CommonService.SKIP && result) {
|
|
|
|
|
|
|
|
if (result.notificationType == 'Survey') {
|
|
|
|
|
|
|
|
this.cs.navigateForward('/erm-channel/survey');
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.authService.adsDetails({
|
|
|
|
|
|
|
|
"ItgNotificationMasterId": result['notificationMasterId']
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
() => { }, this.ts.trPK('general', 'ok')
|
|
|
|
|
|
|
|
).subscribe((result) => {
|
|
|
|
|
|
|
|
var data = result.Mohemm_ITG_ResponseItem;
|
|
|
|
|
|
|
|
if (data) {
|
|
|
|
|
|
|
|
this.cs.sharedService.setSharedData(
|
|
|
|
|
|
|
|
JSON.parse(data),
|
|
|
|
|
|
|
|
AuthenticationService.ADS_DATA
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
this.cs.navigateForward('/erm-channel/home');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|