Merge branch 'master-newdesign' into myteam

MOHEMM-Q3-DEV-LATEST
umasoodch 6 years ago
commit 98eae4cc7f

@ -55,7 +55,9 @@ export class HomeComponent implements OnInit {
public absService: AbsenceListService, public absService: AbsenceListService,
public accrualService: AccrualService, public accrualService: AccrualService,
public authService: AuthenticationService public authService: AuthenticationService
) {} ) {
// this.userData =this.common.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA,false);
}
ngOnInit() { ngOnInit() {
@ -66,8 +68,8 @@ export class HomeComponent implements OnInit {
private getUserDetails(){ private getUserDetails(){
this.authService.loadAuthenticatedUser().subscribe((user: AuthenticatedUser) => { this.authService.loadAuthenticatedUser().subscribe((user: AuthenticatedUser) => {
if (user) { if (user) {
this.emp_no=user.EMPLOYEE_NUMBER; // this.emp_no=user.EMPLOYEE_NUMBER;
this.getAccrualBalance(); // this.getAccrualBalance();
} }
}); });
@ -236,7 +238,7 @@ createAbsence() {
let todayDate = month + '/' + day + '/' + year; let todayDate = month + '/' + day + '/' + year;
let effectiveDate = todayDate; let effectiveDate = todayDate;
const request = { const request = {
P_SELECTED_EMPLOYEE_NUMBER: this.emp_no, P_SELECTED_EMPLOYEE_NUMBER: this.selEmp,
P_EFFECTIVE_DATE: effectiveDate P_EFFECTIVE_DATE: effectiveDate
}; };

@ -114,6 +114,15 @@
</button> --> </button> -->
</ion-item> </ion-item>
<ion-item [hidden]="TeamFlag!='true'" (click)="openMyTeamPage()">
<ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 14px !important;" src="../assets/imgs/my_team_icon.png" item-left>
</ion-thumbnail>
<ion-label class="profile">
{{ts.trPK('myTeam','myTeam-header')}}
</ion-label>
</ion-item>
<!-- <ion-item (click)="profile()"> <!-- <ion-item (click)="profile()">
<ion-thumbnail slot="start" class="menu-thumb"> <ion-thumbnail slot="start" class="menu-thumb">
<img width="30" src="../assets/imgs/profile_icon.png" item-left> <img width="30" src="../assets/imgs/profile_icon.png" item-left>

@ -33,6 +33,7 @@ export class AppComponent implements OnInit, AfterViewInit {
DeviceType: string; DeviceToken: string; //this.deviceToken DeviceType: string; DeviceToken: string; //this.deviceToken
}; };
user: boolean; user: boolean;
TeamFlag :string = "false";
constructor( constructor(
public ts: TranslatorService, public ts: TranslatorService,
private cs: CommonService, private cs: CommonService,
@ -55,11 +56,12 @@ export class AppComponent implements OnInit, AfterViewInit {
} }
ngOnInit() { ngOnInit() {
this.initializeApp(); this.initializeApp();
} }
ngAfterViewInit() {} ngAfterViewInit() {}
initializeApp() { initializeApp() {
this.start = false; this.start = false;
this.menu.enable(false)
this.lazyLoadingService.monitorLazyLoading(15, true); this.lazyLoadingService.monitorLazyLoading(15, true);
this.platform.ready().then(() => { this.platform.ready().then(() => {
this.ts.loadResources(() => { this.ts.loadResources(() => {
@ -106,6 +108,11 @@ export class AppComponent implements OnInit, AfterViewInit {
this.events.subscribe("getNotCount", badge => { this.events.subscribe("getNotCount", badge => {
this.notBadge = badge; this.notBadge = badge;
}); });
this.events.subscribe('myTeamFlag', myTeamFlag => {
this.TeamFlag = myTeamFlag;
});
console.log("this.TeamFlag>>>>>>>>>"+ this.TeamFlag);
} }
private initializeDirection() { private initializeDirection() {
this.direction = TranslatorService.getCurrentDirection(); this.direction = TranslatorService.getCurrentDirection();
@ -130,6 +137,12 @@ export class AppComponent implements OnInit, AfterViewInit {
this.menu.toggle(); this.menu.toggle();
this.cs.openLogin(); this.cs.openLogin();
}
openMyTeamPage() {
this.menu.toggle();
this.cs.openMyTeamPage();
} }
// profile() { // profile() {
// this.cs.openProfile(); // this.cs.openProfile();

@ -237,12 +237,12 @@ export class LoginComponent implements OnInit, OnDestroy {
console.log("success"); console.log("success");
this.cs.stopLoading(); this.cs.stopLoading();
if (this.cs.validResponse(result)) { if (this.cs.validResponse(result)) {
// alert("result.MemberLoginList.EMPLOYEE_NAME :" + result.MemberLoginList.EMPLOYEE_NAME); // alert("result.MemberLoginList.EMPLOYEE_NAME :" + result.MemberLoginList[0].EMPLOYEE_NAME);
this.loginData.LogInTokenID = result.LogInTokenID; this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.MobileNumber = result.MemberLoginList.P_MOBILE_NUMBER; this.loginData.MobileNumber = result.MemberLoginList.P_MOBILE_NUMBER;
this.loginData.P_USER_NAME = this.username; this.loginData.P_USER_NAME = this.username;
// this.loginData.EMPLOYEE_NAME =result.MemberLoginList[0].EMPLOYEE_NAME; // this.loginData.EMPLOYEE_NAME =result.MemberLoginList[0].EMPLOYEE_NAME;
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA); this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA); this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
this.remeberMyInfo(); this.remeberMyInfo();
@ -325,7 +325,7 @@ export class LoginComponent implements OnInit, OnDestroy {
console.log(result); console.log(result);
this.loginData.LogInTokenID = result.LogInTokenID; this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.P_USER_NAME = this.username; this.loginData.P_USER_NAME = this.username;
this.loginData.EmployeeName =result.MemberLoginList[0].EMPLOYEE_NAME; // this.loginData.EmployeeName =result.MemberLoginList[0].EMPLOYEE_NAME;
this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA); this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA); this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);

@ -496,9 +496,13 @@ console.log("successful insertMobileLogin" );
const key = e.which; const key = e.which;
const t = e.target; const t = e.target;
let sib = t.nextElementSibling; let sib = t.nextElementSibling;
let sibPre =t.previousElementSibling;
if (key !== 9 && (key < 48 || key > 57)) { if (key !== 9 && (key < 48 || key > 57)) {
if (key === 8 || key === 46) { if (key === 8 || key === 46) {
return true; return true;
} else { } else {
e.preventDefault(); e.preventDefault();
@ -509,11 +513,13 @@ console.log("successful insertMobileLogin" );
if (key === 9) { if (key === 9) {
return true; return true;
} }
if (sib) { if (sib) {
//sib = document.querySelector('input'); //sib = document.querySelector('input');
if (e.target.value) { if (e.target.value ==="") {
sibPre.setFocus()}
else{
sib.setFocus(); sib.setFocus();
}
} }
} }
// } else { // } else {
@ -523,6 +529,6 @@ console.log("successful insertMobileLogin" );
}
} }

@ -62,13 +62,6 @@
[icon]="subMenu.ICON"> [icon]="subMenu.ICON">
</app-services-button> </app-services-button>
</ion-slide> </ion-slide>
<ion-slide *ngIf="i == 0">
<app-services-button
(click)="openMyTeamPage()"
title="My Team"
icon="assets/icon/new-design/leave_balance.png">
</app-services-button>
</ion-slide>
<ion-slide *ngIf="i == 2"> <ion-slide *ngIf="i == 2">
<app-services-button <app-services-button
(click)="Vacation_Rule()" (click)="Vacation_Rule()"

@ -172,11 +172,13 @@ export class HomePage implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.menu.enable(true)
// this.getUserDetails(); // this.getUserDetails();
// this.getCount(); // this.getCount();
// this.events.subscribe('getNotCount', badge => { this.events.subscribe('getNotCount', badge => {
// this.notBadge = badge; this.notBadge = badge;
// }); });
} }
ionViewWillEnter() { ionViewWillEnter() {
@ -373,6 +375,12 @@ export class HomePage implements OnInit {
console.log("menu: " + selMenu.List_Menu); console.log("menu: " + selMenu.List_Menu);
this.common.sharedService.setSharedData(selMenu, MenuResponse.SHARED_DATA); this.common.sharedService.setSharedData(selMenu, MenuResponse.SHARED_DATA);
this.getMenuEntries(item); this.getMenuEntries(item);
for(let i=0;i<this.menuList.length;i++){
if(this.menuList[i].MENU_TYPE=="M"){
this.events.publish("myTeamFlag","true");
}
}
// if (item.MENU_TYPE === 'M') { // if (item.MENU_TYPE === 'M') {
// this.common.openMyTeamPage(); // this.common.openMyTeamPage();
// // this.navCtrl.push("MySubordinatePage"); // // this.navCtrl.push("MySubordinatePage");

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

@ -1369,8 +1369,8 @@
"ar": "Attendance Statistics" "ar": "Attendance Statistics"
}, },
"myTeam-header": { "myTeam-header": {
"en": "MY TEAM", "en": "My Team",
"ar": "MY TEAM" "ar": "فريقى"
}, },
"total": { "total": {
"en": "TOTAL", "en": "TOTAL",

Loading…
Cancel
Save