mekawy-issues
ashwaq 6 years ago
parent 30ba667bb4
commit 5d978fa175

@ -30,15 +30,11 @@
<p class="text1" style="font-size: 28px;margin-bottom: 0px" >{{empname}}</p> <p class="text1" style="font-size: 28px;margin-bottom: 0px" >{{empname}}</p>
--> -->
</ion-col> </ion-col>
</ion-row> <div *ngIf="onlySMSBox"><p>{{ts.trPK('login','verify-login-with')}}</p></div> </ion-row>
<!-- <type-writer *ngIf="!onlySMSBox" [text]="'login, verify-fingerprint' | translate" class="description" <div *ngIf="onlySMSBox"><p>{{ts.trPK('login','verify-login-with')}}</p></div>
color="primary" fontSize="0.55cm" lineHeight="1cm" fontSize="0.55cm"></type-writer>
-->
<div *ngIf="!onlySMSBox && FFloginType == 2"><p>{{ts.trPK('login','verify-fingerprint')}}</p></div> <div *ngIf="!onlySMSBox && FFloginType == 2"><p>{{ts.trPK('login','verify-fingerprint')}}</p></div>
<div *ngIf="!onlySMSBox && FFloginType == 3"><p>{{ts.trPK('login','verify-faceId')}}</p></div> <div *ngIf="!onlySMSBox && FFloginType == 3"><p>{{ts.trPK('login','verify-faceId')}}</p></div>
</ion-col> </ion-col>
</ion-row> </ion-row>

@ -23,6 +23,7 @@ import { PushService } from 'src/app/hmg-common/services/push/push.service';
styleUrls: ['./login.component.scss'] styleUrls: ['./login.component.scss']
}) })
export class LoginComponent implements OnInit, OnDestroy { export class LoginComponent implements OnInit, OnDestroy {
deviceToken1: any;
constructor( constructor(
public cs: CommonService, public cs: CommonService,
@ -91,10 +92,26 @@ export class LoginComponent implements OnInit, OnDestroy {
requestGetLoginInfo: any; requestGetLoginInfo: any;
logoutFlage: boolean ; logoutFlage: boolean ;
getuser: any = ''; getuser: any = '';
getlastlogin: any;
private checkUserResult: CheckUserAuthenticationResponse; private checkUserResult: CheckUserAuthenticationResponse;
ionViewWillEnter(){
console.log("ionViewWillEnter");
}
ngOnInit() { ngOnInit() {
// if(!this.cs.getIsTimeSessionOut()){
// this.getlastlogin = this.cs.sharedService.getSharedData(
// AuthenticationService.IMEI_USER_DATA,
// false
// );
// console.log("this.getlastlogin"+ this.getlastlogin);
// }
this.currentLang = TranslatorService.getCurrentLanguageCode(); this.currentLang = TranslatorService.getCurrentLanguageCode();
console.log(TranslatorService.CURRENT_LANGUAGE) console.log(TranslatorService.CURRENT_LANGUAGE)
console.log(TranslatorService.EN) console.log(TranslatorService.EN)
@ -126,7 +143,13 @@ export class LoginComponent implements OnInit, OnDestroy {
this.user = user; this.user = user;
}); });
this.deviceToken = localStorage.getItem('devicyeToken');
console.log(" this.user login in init" + this.user);
//this.deviceToken = localStorage.getItem('devicyeToken');
this.deviceToken =this.cs.getDeviceToken();
console.log('lngOnInit localStorage: ' + this.deviceToken1);
console.log('lngOnInit getDeviceToken: ' + this.deviceToken);
if (this.deviceToken) { if (this.deviceToken) {
console.log('login enabled first time: ' + this.deviceToken); console.log('login enabled first time: ' + this.deviceToken);
} else { } else {
@ -372,7 +395,7 @@ export class LoginComponent implements OnInit, OnDestroy {
getLastLoginInfo() { getLastLoginInfo() {
this.requestGetLoginInfo = { this.requestGetLoginInfo = {
DeviceType: this.cs.getDeviceType(), // "Android",//this.cs.getDeviceType(), DeviceType: this.cs.getDeviceType(), // "Android",//this.cs.getDeviceType(),
DeviceToken: this.deviceToken// "5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36"//this.deviceToken DeviceToken: this.cs.getDeviceToken()// "5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36"//this.deviceToken
}; };
this.authService.getLoginInfo(this.requestGetLoginInfo, () => {}, this.ts.trPK('general', 'ok')).subscribe(res => { this.authService.getLoginInfo(this.requestGetLoginInfo, () => {}, this.ts.trPK('general', 'ok')).subscribe(res => {
if (this.cs.validResponse(res)) { if (this.cs.validResponse(res)) {

@ -18,7 +18,16 @@
<ion-col> <ion-col>
<p class="headerTxt" > {{'verificationcode,verificationcode' | translate}}</p> <p class="headerTxt" > {{'verificationcode,verificationcode' | translate}}</p>
<br/> <br/>
<p class="leftDiv">{{'verificationcode,title' | translate}}<span class="boldTxtNav">{{'verificationcode,verificationcode' | translate}}</span> {{'verificationcode,by' | translate}}<span class="boldTxtNav">{{'verificationcode,sms' | translate}}</span>{{'verificationcode,instruct' | translate}}<span class="boldTxtNav">{{'general,submit' | translate}}</span></p> <p class="leftDiv">{{'verificationcode,title' | translate}}
<span class="boldTxtNav">{{'verificationcode,verificationcode' | translate}}</span>
{{'verificationcode,by' | translate}}
<span *ngIf="loginType == 1" class="boldTxtNav">{{'verificationcode , sms' | translate}}</span>
<span *ngIf="loginType == 4" class="boldTxtNav">{{'verificationcode , whatsapp' | translate}}</span>
{{'verificationcode,instruct' | translate}}
<span class="boldTxtNav">{{'general,submit' | translate}}</span
></p>
<!-- <p class="leftDiv">{{'verificationcode,title' | translate}}<span class="boldTxtNav">{{'verificationcode,verificationcode' | translate}}</span> {{'verificationcode,by' | translate}}<span class="boldTxtNav">{{'verificationcode,sms' | translate}}</span>{{'verificationcode,instruct' | translate}}<span class="boldTxtNav">{{'general,submit' | translate}}</span></p> -->
</ion-col> </ion-col>
</ion-row> </ion-row>
</ion-grid> </ion-grid>

@ -81,6 +81,7 @@ export class SmsPageComponent implements OnInit {
public smc_code: any = []; public smc_code: any = [];
code: any; code: any;
user_name: string; user_name: string;
loginType: any;
constructor( constructor(
@ -138,8 +139,9 @@ export class SmsPageComponent implements OnInit {
console.log("deviceToken :"+this.deviceToken); console.log("deviceToken :"+this.deviceToken);
this.loginTypeData= this.common.sharedService.getSharedData(SMSCheckRequest.SHARED_DATA, false); this.loginTypeData= this.common.sharedService.getSharedData(SMSCheckRequest.SHARED_DATA, false);
this.loginType=this.loginTypeData.loginType;
// console.log("loginType :"+this.loginTypeData.loginType); console.log("loginType :"+this.loginTypeData.loginType);
@ -418,7 +420,7 @@ export class SmsPageComponent implements OnInit {
console.log("successful insertMobileLogin" );
}); });

@ -1,6 +1,6 @@
<!-- <ion-header> <!-- <ion-header>
<ion-toolbar class="header-toolbar-new"> <ion-toolbar class="header-toolbar-new">
<ion-buttons slot="start"> <ion-buttons *ngIf="getPassdirfromNotifiPage != true" slot="start">
<nav-buttons backLink=""></nav-buttons> <nav-buttons backLink=""></nav-buttons>
</ion-buttons> </ion-buttons>
<ion-title color="light">{{headerTitle}}</ion-title> <ion-title color="light">{{headerTitle}}</ion-title>
@ -12,13 +12,21 @@
</ion-buttons> </ion-buttons>
</ion-toolbar> </ion-toolbar>
</ion-header> --> </ion-header>
-->
<!-- <app-generic-header
showBack="!getPassdirfromNotifiPage"
[updateDirection]="getPassdirfromNotifiPage"
[headerText]="headerTitle"
(trigger)="closemodal()">
</app-generic-header> -->
<app-generic-header <app-generic-header
showBack="true" showBack="true"
[headerText]="headerTitle"> [headerText]="headerTitle">
</app-generic-header> </app-generic-header>
<ion-content padding> <ion-content padding>
<div #containerDiv id="containerDiv"> <div #containerDiv id="containerDiv">

@ -168,11 +168,12 @@ export class PushService {
localStorage.setItem('deviceToken', data); localStorage.setItem('deviceToken', data);
} }
if (this.authService.isAuthenticated()) { //
this.registerAuthenticatedUser(data); // if (this.authService.isAuthenticated()) {
} else { // this.registerAuthenticatedUser(data);
this.registerNotAuthenticatedUser(data); // } else {
} // this.registerNotAuthenticatedUser(data);
// }
} }

@ -12,6 +12,24 @@
<img [src]="userImage"/> <img [src]="userImage"/>
</div> </div>
</ion-col> </ion-col>
<!-- *ngIf="getPassdirfromNotifiPage == true" -->
<ion-col *ngIf="updateDirection" [size]="2" style="padding: 0;" (click)="closeModal()">
<div class="profile-image-container">
<img style="
width: 20px;
height: 20px;
margin-top: 5px;"
[src]="close"
/>
</div>
<!-- <ion-buttons slot="primary" >
<ion-button style="background: red !important;">
<ion-icon slot="icon-only" name="close"></ion-icon>
</ion-button>
</ion-buttons> -->
</ion-col>
</ion-row> </ion-row>
</ion-toolbar> </ion-toolbar>
</ion-header> </ion-header>

@ -1,4 +1,4 @@
import { Component, OnInit, Input } from '@angular/core'; import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { CommonService } from '../../services/common/common.service'; import { CommonService } from '../../services/common/common.service';
@Component({ @Component({
@ -12,16 +12,35 @@ export class GenericHeaderComponent implements OnInit {
@Input() showMenu = false; @Input() showMenu = false;
@Input() showBack = false; @Input() showBack = false;
@Input() navigate = true; @Input() navigate = true;
@Input() showClose = false;
@Input() updateDirection = false;
@Input() headerText = ''; @Input() headerText = '';
@Input() backLink: string; @Input() backLink: string;
@Output() trigger= new EventEmitter();
public close = 'assets/imgs/cancel.png';
constructor(public common: CommonService) { } constructor(public common: CommonService) { }
ngOnInit() {} ngOnInit() {
console.log(this.updateDirection);
console.log(this.showClose);
console.log(this.showBack);
if(this.updateDirection){
this.showBack=false;
}else{
}
}
openProfilePage() { openProfilePage() {
this.common.openEditProfile(); this.common.openEditProfile();
} }
closeModal(){
console.log("closeModal");
this.trigger.emit();
}
} }

@ -1,6 +1,9 @@
<ion-header *ngIf="!messageSuccess"> <ion-header *ngIf="!messageSuccess">
<ion-toolbar > <ion-toolbar >
<ion-title color="dark">{{ 'workListMain, rfc' | translate}}</ion-title> <ion-title color="dark">
{{ts.trPK('worklistMain','rfc')}}
</ion-title>
</ion-toolbar> </ion-toolbar>
</ion-header> </ion-header>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 635 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Loading…
Cancel
Save