Merge branch 'MOHEMM-Q2-DEV' into enad-Q1

zohaib-huawei-q2
umasoodch 5 years ago
commit 93762ccfe8

@ -137,8 +137,8 @@ export class AppComponent implements OnInit {
this.authService.checkAds({ this.authService.checkAds({
EmployeeNumber: '', EmployeeNumber: '',
ItgEnableAt: "Before Service Initiation", //After Service Submission ItgEnableAt: "After Service Submission", //After Service Submission
ItgServiceName: "Ticket" ItgServiceName: "Login"
}, () => { }, this.ts.trPK('general', 'ok')).subscribe(res => { }, () => { }, this.ts.trPK('general', 'ok')).subscribe(res => {
var result = JSON.parse(res.Mohemm_ITG_ResponseItem).result.data; var result = JSON.parse(res.Mohemm_ITG_ResponseItem).result.data;

@ -169,11 +169,11 @@ export class HomePage implements OnInit {
ngOnInit() { ngOnInit() {
let openDigitalIDCard = this.sharedData.getSharedData("loginWithDigitalIDButton", true); let openDigitalIDCard = this.sharedData.getSharedData("loginWithDigitalIDButton", true);
this.platform.backButton.subscribeWithPriority(9999, () => { // this.platform.backButton.subscribeWithPriority(9999, () => {
if (this.router.isActive('/home', true)) { // if (this.router.isActive('/home', true)) {
this.common.openHome(); // this.common.openHome();
} // }
}); // });
this.direction = TranslatorService.getCurrentLanguageName(); this.direction = TranslatorService.getCurrentLanguageName();
this.myTeamTitle = this.ts.trPK('myTeam', 'myTeam-header'); this.myTeamTitle = this.ts.trPK('myTeam', 'myTeam-header');
this.vacationRuleTitle = this.ts.trPK('vacation-rule', 'vacationRule'); this.vacationRuleTitle = this.ts.trPK('vacation-rule', 'vacationRule');

@ -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');
}
})
}
}
})
}
} }

@ -74,7 +74,7 @@ export class HRRequestComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.getUserInformation(); this.getUserInformation();
this.checkERM('Before Service Initiation');
} }
@ -92,8 +92,7 @@ export class HRRequestComponent implements OnInit {
P_PAGE_LIMIT: 1 P_PAGE_LIMIT: 1
}; };
this.MowadhafiService.getUserInfo(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=> this.MowadhafiService.getUserInfo(request, () => { }, this.ts.trPK('general', 'retry')).subscribe((result) => {
{
this.handleUserInfoResult(result); this.handleUserInfoResult(result);
}) })
@ -122,5 +121,43 @@ export class HRRequestComponent implements OnInit {
this.cs.openHRRequestFormPage(); this.cs.openHRRequestFormPage();
// this.menu.toggle(); // this.menu.toggle();
} }
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');
}
})
}
}
})
}
} }

Loading…
Cancel
Save