add my team to side menu & handle accural balance in absence page

MOHEMM-Q3-DEV-LATEST
Mohamed Mekawy 6 years ago
parent 0928d55171
commit 8f9ef27ee1

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

@ -114,6 +114,15 @@
</button> -->
</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-thumbnail slot="start" class="menu-thumb">
<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
};
user: boolean;
TeamFlag :string = "false";
constructor(
public ts: TranslatorService,
private cs: CommonService,
@ -55,7 +56,7 @@ export class AppComponent implements OnInit, AfterViewInit {
}
ngOnInit() {
this.initializeApp();
}
ngAfterViewInit() {}
initializeApp() {
@ -106,6 +107,11 @@ export class AppComponent implements OnInit, AfterViewInit {
this.events.subscribe("getNotCount", badge => {
this.notBadge = badge;
});
this.events.subscribe('myTeamFlag', myTeamFlag => {
this.TeamFlag = myTeamFlag;
});
console.log("this.TeamFlag>>>>>>>>>"+ this.TeamFlag);
}
private initializeDirection() {
this.direction = TranslatorService.getCurrentDirection();
@ -130,6 +136,12 @@ export class AppComponent implements OnInit, AfterViewInit {
this.menu.toggle();
this.cs.openLogin();
}
openMyTeamPage() {
this.menu.toggle();
this.cs.openMyTeamPage();
}
// profile() {
// this.cs.openProfile();

@ -62,13 +62,6 @@
[icon]="subMenu.ICON">
</app-services-button>
</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">
<app-services-button
(click)="Vacation_Rule()"

@ -174,9 +174,9 @@ export class HomePage implements OnInit {
ngOnInit() {
// this.getUserDetails();
// this.getCount();
// this.events.subscribe('getNotCount', badge => {
// this.notBadge = badge;
// });
this.events.subscribe('getNotCount', badge => {
this.notBadge = badge;
});
}
ionViewWillEnter() {
@ -373,6 +373,12 @@ export class HomePage implements OnInit {
console.log("menu: " + selMenu.List_Menu);
this.common.sharedService.setSharedData(selMenu, MenuResponse.SHARED_DATA);
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') {
// this.common.openMyTeamPage();
// // this.navCtrl.push("MySubordinatePage");

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

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

Loading…
Cancel
Save