fix app direction and itg all segment

mekawy-issues
enadhilal 6 years ago
parent 3b3d06ea8a
commit 050eca7245

@ -203,4 +203,4 @@
"android"
]
}
}
}

@ -129,8 +129,7 @@ export class AppComponent implements OnInit, AfterViewInit {
this.events.subscribe('myTeamFlag', myTeamFlag => {
this.TeamFlag = myTeamFlag;
});
// this.TeamFlag = this.cs.sharedService.getSharedData("myTeamFlag",false);
// console.log("this.TeamFlag>>>>>>>>>"+ this.TeamFlag);
console.log("this.TeamFlag>>>>>>>>>"+ this.TeamFlag);
}
private initializeDirection() {
this.direction = TranslatorService.getCurrentDirection();
@ -156,8 +155,7 @@ export class AppComponent implements OnInit, AfterViewInit {
this.menu.enable(false);
this.logoutFlage=true;
this.events.publish('logoutFlage', this.logoutFlage);
this.cs.setUpdateImage("",false);
this.TeamFlag ="false";
this.getLastLoginInfo();
// this.cs.openLogin();

@ -62,8 +62,8 @@
<a>{{ts.trPK('login','signup')}}</a>
</div>
<div class="gridDiv" aria-disabled="true">
<button class="gridBtn" ion-button (click)="changeLanguage('1')" [ngClass]="{'active':this.currentLang ==1}">English</button>
<button class="gridBtn arTxt" ion-button (click)="changeLanguage('2')" [ngClass]="{'active':this.currentLang ==2}">عربي</button>
<button class="gridBtn" ion-button (click)="changeLanguage('2')" [ngClass]="{'active':currentLang ==2}">English</button>
<button class="gridBtn arTxt" ion-button (click)="changeLanguage('1')" [ngClass]="{'active':currentLang ==1}">عربي</button>
<!-- <button class="gridBtn" ion-button (click)="changeLanguage()" style="background: #dcdcdc !important;color: #ccc6c6 !important;margin: 1px;width: 49%">English</button>
<button class="gridBtn arTxt" ion-button (click)="changeLanguage()" style="background: #dcdcdc !important;color: #ccc6c6 !important;margin: 1px;width: 49%">عربي</button> -->
</div>

@ -74,7 +74,7 @@ export class LoginComponent implements OnInit, OnDestroy {
public remeberMe: boolean;
private iosLink: string;
private androidLink: string;
public currentLang: any = 1;
public currentLang = 1;
private patientOutSA: boolean;
private loginTokenID: string;
private isMobileFingerPrint: boolean;
@ -95,14 +95,18 @@ export class LoginComponent implements OnInit, OnDestroy {
private checkUserResult: CheckUserAuthenticationResponse;
ngOnInit() {
console.log("ENAD TEST!!!")
this.currentLang = TranslatorService.getCurrentLanguageCode();
console.log(TranslatorService.CURRENT_LANGUAGE)
console.log(TranslatorService.EN)
if (TranslatorService.CURRENT_LANGUAGE == TranslatorService.EN) {
this.language = "US";
this.changeLanguage('2')
} else {
this.language = "AR";
this.changeLanguage('1')
}
this.ts.switchLanguage();
this.currentLang = TranslatorService.getCurrentLanguageCode();
console.log("current lang: "+this.currentLang)
//this.ts.switchLanguage();
// this.deviceToken= this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false);
// console.log("get deviceToken login"+ this.deviceToken)
@ -191,7 +195,10 @@ export class LoginComponent implements OnInit, OnDestroy {
}
public changeLanguage(langNumber) {
console.log("current lang: "+this.currentLang)
console.log("click lang: "+langNumber)
if(this.currentLang == langNumber){
this.currentLang = langNumber;
return;
}else{
this.ts.switchLanguage();
@ -202,6 +209,7 @@ export class LoginComponent implements OnInit, OnDestroy {
}
this.currentLang = TranslatorService.getCurrentLanguageCode();
}
this.currentLang = langNumber;
}
public forgetPasswordPage() {
this.cs.openUserForgot();

@ -52,7 +52,7 @@
<ion-row *ngIf='selectedFilter === "ITG"' class="filters-row">
<ion-col>
<ion-slides>
<ion-slides [options]="slideOptsTwo">
<ion-slide class='slideCss' *ngFor="let segment of ITGSegment">
<span [ngClass]="segment.style? 'text-span-active': 'text-span'" (click)="setActive(segment.code)">
{{segment.name}}

@ -151,6 +151,10 @@ export class HomeComponent implements OnInit {
slidesPerView: 4.3,
spaceBetween: 10
};
public slideOptsTwo = {
slidesPerView: 1.3,
spaceBetween: 10
};
constructor(
public common: CommonService,
public ts: TranslatorService,
@ -497,14 +501,19 @@ export class HomeComponent implements OnInit {
Count() {
const datas = [];
const names = [];
this.ITGSegment[0] = {
name: 'All',
code: 'All',
data: null,
style: false
};
this.workListService.getITGCount('', '', this.isPostNoLoad)
this.workListService.getITGCount('', '', this.isPostNoLoad)
.subscribe((result: any) => {
if(result.RequestType.length > 0){
this.ITGSegment[0] = {
name: 'All',
code: 'All',
data: null,
style: false
};
this.ITGSegment[0].data = datas;
this.ITGSegment[0].names = names;
this.setActive(this.ITGSegment[0].code);
}
for (let i = 1; i < result.RequestType.length; i++) {
this.ITGSegment[i] = {
name: result.RequestType[i].RequestTypeName,
@ -515,9 +524,7 @@ export class HomeComponent implements OnInit {
datas[i] = result.RequestType[i].RequestDetails;
names[i] = result.RequestType[i].RequestTypeCode;
}
this.ITGSegment[0].data = datas;
this.ITGSegment[0].names = names;
this.setActive(this.ITGSegment[0].code);
});
}

Loading…
Cancel
Save