add digital id and fixed worklist issues.

ZohaibIqbalKambrani
enadhilal 5 years ago
parent b3bffd09c8
commit 65f7385630

@ -120,6 +120,8 @@ export class AppComponent implements OnInit {
this.events.subscribe('setMenu', () => {
const user = this.authService.loadAuthenticatedUser().subscribe((user: AuthenticatedUser) => {
if (user) {
console.log(user);
localStorage.setItem("digitalIDUser", JSON.stringify(user));
this.digitalIDUser = user//JSON.stringify(user);
this.companyUrl = user.CompanyImageURL ? user.CompanyImageURL : '../assets/imgs/CSLogo.png';
this.companyDesc = user.CompanyImageDescription ? user.CompanyImageDescription : 'Powered By Cloud Solutions';

@ -63,12 +63,5 @@
</ng-container>
</ion-row>
<page-trailer [small]="true"></page-trailer>
</ion-grid>
<!-- <ion-button *ngIf="userInfo" class="button-digital-id" (click)="openDigitalId()">
<p style="color: black;">{{ts.trPK('general','digital-id')}}</p>
<img [ngClass]=" direction === 'en' ? 'digital-id-en' : 'digital-id-ar'" src="../assets/imgs/ID_ico.png">
</ion-button> -->
</ion-content>

@ -1,6 +1,6 @@
import { Component, OnInit, Input } from '@angular/core';
import {ButtonSettings} from 'src/app/hmg-common/ui/button/models/button-settingsl';
import {TranslatorService} from 'src/app/hmg-common/services/translator/translator.service';
import { ButtonSettings } from 'src/app/hmg-common/ui/button/models/button-settingsl';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { LoginRequest } from 'src/app/hmg-common/services/authentication/models/login.request';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
@ -50,7 +50,7 @@ export class ConfirmLoginComponent implements OnInit {
private iosLink: string;
private androidLink: string;
public isNFCAvailable = false;
direction:string;
direction: string;
userInfo: any;
constructor(
@ -63,19 +63,19 @@ export class ConfirmLoginComponent implements OnInit {
public platform: Platform,
public modalController: ModalController,
private nfc: NFC
) {
this.loginData = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
this.deviceToken = this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false);
// if device token undefind
) {
this.loginData = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
this.deviceToken = this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false);
// if device token undefind
// tslint:disable-next-line: triple-equals
if (this.deviceToken == undefined) {
// tslint:disable-next-line: triple-equals
if (this.deviceToken == undefined) {
this.deviceToken = localStorage.getItem('deviceToken');
}
this.lastLogin = this.cs.sharedService.getSharedData(AuthenticationService.LAST_LOGIN, false);
this.username = localStorage.getItem('user');
this.password = localStorage.getItem('password');
this.empname = localStorage.getItem('emp-name');
this.lastLogin = this.cs.sharedService.getSharedData(AuthenticationService.LAST_LOGIN, false);
this.username = localStorage.getItem('user');
this.password = localStorage.getItem('password');
this.empname = localStorage.getItem('emp-name');
}
ngOnInit() {
@ -125,7 +125,7 @@ export class ConfirmLoginComponent implements OnInit {
icon: 'assets/icon/login/101.png',
settings: new ButtonSettings(true, true, true, true),
value: 3,
disabled: this.isFaceorFinger === 'face' ? false : true,
disabled: this.isFaceorFinger === 'face' ? false : true,
visible: this.onlySMSBox,
buttonClass: 'buttonClassWhite',
pClass: 'pClassMyFileIconBlack',
@ -161,16 +161,16 @@ export class ConfirmLoginComponent implements OnInit {
switch (el.value) {
case 1:
console.log(el.value);
localStorage.setItem("login-type",el.value);
console.log("login-type: "+ localStorage.getItem("login-type"))
if(this.FFloginType == 3 || this.FFloginType == 2 ){
this.cs.setActiveTypeLogin(el.value);
}else{
this.cs.setActiveTypeLogin(0);
console.log(el.value);
localStorage.setItem("login-type", el.value);
console.log("login-type: " + localStorage.getItem("login-type"))
if (this.FFloginType == 3 || this.FFloginType == 2) {
this.cs.setActiveTypeLogin(el.value);
} else {
this.cs.setActiveTypeLogin(0);
}
this.loginWithSMS(el);
}
this.loginWithSMS(el);
break;
case 2:
@ -183,15 +183,15 @@ export class ConfirmLoginComponent implements OnInit {
break;
case 4:
console.log(el.value);
console.log(el.value);
localStorage.setItem("login-type",el.value);
if(this.FFloginType == 3 || this.FFloginType == 2 ){
this.cs.setActiveTypeLogin(el.value);
}else{
this.cs.setActiveTypeLogin(0);
localStorage.setItem("login-type", el.value);
if (this.FFloginType == 3 || this.FFloginType == 2) {
this.cs.setActiveTypeLogin(el.value);
} else {
this.cs.setActiveTypeLogin(0);
}
}
this.loginWithWhatsapp(el);
break;
default:
@ -203,46 +203,46 @@ export class ConfirmLoginComponent implements OnInit {
loginWithSMS(el) {
if (!el.disabled) {
if (this.loginData.LogInTokenID) {
this.sendActivationCode(1);
} else {
// this.checkUserAuthentication(1);
// this.checkUserAuthentication();**
}
if (this.loginData.LogInTokenID) {
this.sendActivationCode(1);
} else {
// this.checkUserAuthentication(1);
// this.checkUserAuthentication();**
}
}
}
loginWithWhatsapp(el) {
if (!el.disabled) {
if (this.loginData.LogInTokenID) {
this.sendActivationCode(2);
} else {
// this.checkUserAuthentication(2);
}
if (this.loginData.LogInTokenID) {
this.sendActivationCode(2);
} else {
// this.checkUserAuthentication(2);
}
}
}
public sendActivationCode(type: number) {
public sendActivationCode(type: number) {
const request = new SendActivationByType();
this.authService.setPublicFields(request);
request.OTP_SendType = type;
request.MobileNumber = this.loginData.MobileNumber;
request.IsMobileFingerPrint =0;
request.IsMobileFingerPrint = 0;
request.P_USER_NAME=this.loginData.P_USER_NAME;
request.P_USER_NAME = this.loginData.P_USER_NAME;
request.LogInTokenID =this.loginData.LogInTokenID;
request.LogInTokenID = this.loginData.LogInTokenID;
request.P_LEGISLATION_CODE =this.loginData.P_LEGISLATION_CODE;//"SA";
request.P_LEGISLATION_CODE = this.loginData.P_LEGISLATION_CODE;//"SA";
// request.VersionID ="2.0";
// request.LanguageID = imeiData && imeiData.PreferredLanguage || request.LanguageID;
// request.LanguageID = imeiData && imeiData.PreferredLanguage || request.LanguageID;
this.authService
@ -259,7 +259,7 @@ export class ConfirmLoginComponent implements OnInit {
.subscribe((result: any) => {
if (result.isSMSSent) {
// tslint:disable-next-line: max-line-length
this.cs.sharedService.setSharedData({MobileNumber: this.loginData.MobileNumber, loginType: this.selectedOption}, SMSCheckRequest.SHARED_DATA);
this.cs.sharedService.setSharedData({ MobileNumber: this.loginData.MobileNumber, loginType: this.selectedOption }, SMSCheckRequest.SHARED_DATA);
this.cs.openSMSPage();
}
});
@ -293,7 +293,7 @@ export class ConfirmLoginComponent implements OnInit {
private presentBiometricDialog() {
this.faio.show({
title: 'Biometric Authetnciation', // (Android Only) | optional | Default: "<APP_NAME> Biometric Sign On"
subtitle: 'Coolest Plugin ever' , // (Android Only) | optional | Default: null
subtitle: 'Coolest Plugin ever', // (Android Only) | optional | Default: null
description: this.ts.trPK('general', 'auth-please'), // optional | Default: null
fallbackButtonTitle: this.ts.trPK('general', 'use-pin'), // optional | When disableBackup is false defaults to "Use Pin".
disableBackup: true, // optional | default: false
@ -302,39 +302,39 @@ export class ConfirmLoginComponent implements OnInit {
// disableBackup: true, // Only for Android(optional)
// localizedFallbackTitle: this.ts.trPK("general", "use-pin"), // Only for iOS
// localizedReason: this.ts.trPK("general", "auth-please") // Only for iOS
}).then((result: any) => {
const request = {
}).then((result: any) => {
const request = {
DeviceType: this.cs.getDeviceType(),
DeviceToken: this.deviceToken
};
// this.authService.setPublicFields(request);
// request.MobileNumber = this.loginData.MobileNumber;
// request.P_USER_NAME=this.loginData.P_USER_NAME;
// request.UserName=this.loginData.P_USER_NAME;
// request.LogInTokenID =this.loginData.LogInTokenID;
// request.CompanyID =1;//cs=1 , HMG=2
this.getMobileInfo(request);
}).catch((error: any) => {
console.log(error);
});
};
// this.authService.setPublicFields(request);
// request.MobileNumber = this.loginData.MobileNumber;
// request.P_USER_NAME=this.loginData.P_USER_NAME;
// request.UserName=this.loginData.P_USER_NAME;
// request.LogInTokenID =this.loginData.LogInTokenID;
// request.CompanyID =1;//cs=1 , HMG=2
this.getMobileInfo(request);
}).catch((error: any) => {
console.log(error);
});
}
private getMobileInfo(request: any) {
this.authService.getLoginInfo(request, () => { }, this.ts.trPK('general', 'ok')).subscribe((result: GetLoginInfoResponse) => {
if (result.Mohemm_GetMobileLoginInfoList.length > 0) {
// tslint:disable-next-line: triple-equals
if ( result.Mohemm_GetMobileLoginInfoList[0].LoginType == 2 || result.Mohemm_GetMobileLoginInfoList[0].LoginType == 3) {
this.loginTokenID = result.LogInTokenID;
this.checkSMS();
} else {
this.onlySMSBox = false;
this.button();
}
if (result.Mohemm_GetMobileLoginInfoList.length > 0) {
// tslint:disable-next-line: triple-equals
if (result.Mohemm_GetMobileLoginInfoList[0].LoginType == 2 || result.Mohemm_GetMobileLoginInfoList[0].LoginType == 3) {
this.loginTokenID = result.LogInTokenID;
this.checkSMS();
} else {
this.onlySMSBox = false;
this.button();
}
});
this.onlySMSBox = false;
this.button();
}
} else {
this.onlySMSBox = false;
this.button();
}
});
}
@ -348,7 +348,7 @@ export class ConfirmLoginComponent implements OnInit {
if (err === "NO_NFC") {
this.isNFCAvailable = false;
} else if (err === "NFC_DISABLED") {
this.isNFCAvailable = true;
this.isNFCAvailable = true;
} else {
this.isNFCAvailable = false;
}
@ -363,10 +363,10 @@ export class ConfirmLoginComponent implements OnInit {
request.P_USER_NAME = data.P_USER_NAME;
request.MobileNumber = data.MobileNumber;
request.IsDeviceNFC = this.isNFCAvailable;
this.authService.checkSMS(request, () => {}, this.ts.trPK('general', 'ok'))
this.authService.checkSMS(request, () => { }, this.ts.trPK('general', 'ok'))
.subscribe((result: SMSCheckResponse) => {
if (this.cs.validResponse(result)) {
// Wifi Credientials
CommonService.MOHEMM_WIFI_SSID = result.Mohemm_Wifi_SSID;
CommonService.MOHEMM_WIFI_PASSWORD = result.Mohemm_Wifi_Password;
@ -375,7 +375,7 @@ export class ConfirmLoginComponent implements OnInit {
this.authService.setAuthenticatedUser(result).subscribe(() => {
localStorage.setItem('emp-name', result.MemberInformationList[0].EMPLOYEE_NAME);
this.user_name = result.MemberInformationList[0].EMPLOYEE_NAME;
const currDateTime = moment().format('MMM DD , YYYY HH:mm');
const currDateTime = moment().format('MMM DD , YYYY HH:mm');
localStorage.setItem('login-at', currDateTime);
if (this.platform.is('cordova')) {
this.insertMobileLogin();
@ -401,91 +401,104 @@ export class ConfirmLoginComponent implements OnInit {
request.EmployeeName = this.user_name;
this.authService.insertMobileLoginInfo(request, () => { }, this.ts.trPK('general', 'ok'), this.isPostNoLoad)
.subscribe((result: any) => {
console.log('successful insertMobileLoginInfo' );
});
}
console.log('successful insertMobileLoginInfo');
});
}
// do silent login
private checkUserAuthentication() {
this.cs.startLoading();
const request = new LoginRequest();
request.P_USER_NAME = this.username;
request.P_LANGUAGE = 'US'; // this.language;
request.P_PASSWORD = this.password;
this.authService
// do silent login
private checkUserAuthentication() {
this.cs.startLoading();
const request = new LoginRequest();
request.P_USER_NAME = this.username;
request.P_LANGUAGE = 'US'; // this.language;
request.P_PASSWORD = this.password;
this.authService
.login(request, () => {
console.log('error here');
console.log('error here');
}, this.ts.trPK('general', 'ok'))
.subscribe((result: CheckUserAuthenticationResponse) => {
console.log('success');
this.cs.stopLoading();
if (this.cs.validResponse(result)) {
this.loginData = new LoginModel();
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.MobileNumber = result.MemberLoginList.P_MOBILE_NUMBER;
this.loginData.P_USER_NAME = this.username;
this.loginData.EmployeeName = this.user_name;
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
this.confirm(this.loginType);
} else {
if (result.IsPasswordExpired) {
// alert("dont forget to handelpresentPasswordExpiredDialog() ");
// this.presentPasswordExpiredDialog(); *****
}
console.log('success');
this.cs.stopLoading();
if (this.cs.validResponse(result)) {
this.loginData = new LoginModel();
this.loginData.LogInTokenID = result.LogInTokenID;
this.loginData.MobileNumber = result.MemberLoginList.P_MOBILE_NUMBER;
this.loginData.P_USER_NAME = this.username;
this.loginData.EmployeeName = this.user_name;
this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA);
this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA);
this.confirm(this.loginType);
} else {
if (result.IsPasswordExpired) {
// alert("dont forget to handelpresentPasswordExpiredDialog() ");
// this.presentPasswordExpiredDialog(); *****
}
}
});
}
}
private handleAppUpdate(result) {
this.iosLink = result.IOSLink;
this.androidLink = result.AndroidLink;
if (this.platform.is('android')) {
private handleAppUpdate(result) {
this.iosLink = result.IOSLink;
this.androidLink = result.AndroidLink;
if (this.platform.is('android')) {
if (this.androidLink) {
window.open(this.androidLink, '_system');
window.open(this.androidLink, '_system');
}
} else if (this.platform.is('ios')) {
} else if (this.platform.is('ios')) {
if (this.iosLink) {
window.open(this.iosLink, '_system');
window.open(this.iosLink, '_system');
}
}
}
}
public checkAppUpdated() {
this.authService.checkApplicationVersion(() => {}).subscribe((result: CheckAppVersionResponse) => {
// tslint:disable-next-line: triple-equals
if (result.MessageStatus == 2 && result.ErrorType == 4) {
this.cs.presentAcceptDialog(result.ErrorEndUserMessage, () => {
this.handleAppUpdate(result);
});
// tslint:disable-next-line: triple-equals
} else if (result.MessageStatus == 1) {
this.checkUserAuthentication();
}
});
}
checkAccess(el: any) {
const data = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
this.loginType = el;
if (this.accessFromOutSide) {
this.checkAppUpdated();
} else {
public checkAppUpdated() {
this.authService.checkApplicationVersion(() => { }).subscribe((result: CheckAppVersionResponse) => {
// tslint:disable-next-line: triple-equals
if (!data == undefined ) {
this.confirm(this.loginType);
} else {
if (result.MessageStatus == 2 && result.ErrorType == 4) {
this.cs.presentAcceptDialog(result.ErrorEndUserMessage, () => {
this.handleAppUpdate(result);
});
// tslint:disable-next-line: triple-equals
} else if (result.MessageStatus == 1) {
this.checkUserAuthentication();
}
});
}
checkAccess(el: any, isDigitalID = false, buttonType?) {
const data = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
if (isDigitalID) {
this.button();
this.checkButtonType(buttonType);
}
else {
console.log(data);
this.loginType = el;
if (this.accessFromOutSide) {
this.checkAppUpdated();
} else {
// tslint:disable-next-line: triple-equals
if (!data == undefined) {
this.confirm(this.loginType);
} else {
this.checkAppUpdated();
}
}
}
}
}
async openDigitalId() {
const modal = await this.modalController.create({
component: DigitalIdComponent,
cssClass: 'digital-id-modal-css'
});
return await modal.present();
}
checkButtonType(typeNumber) {
let buttonSelected;
this.buttons.forEach(element => {
element.forEach(elementValue => {
if(typeNumber === elementValue.value){
buttonSelected = elementValue;
}
});
});
this.sharedData.setSharedData(true, "loginWithDigitalIDButton");
this.loginType = buttonSelected;
this.checkAppUpdated();
}
}
}

@ -1,4 +1,4 @@
<!-- <ion-content dir="ltr">
<ion-content *ngIf="userInfo.CompanyMainCompany == 'CS'" dir="ltr">
<img *ngIf="userInfo.PAYROLL_CODE === 'CS' " style="width: 100%; max-width: 100%;" src="../assets/imgs/IDTOP.png">
<img *ngIf="userInfo.PAYROLL_CODE !== 'CS' " style="width: 100%; max-width: 100%;" src="../assets/imgs/IDTOP_HMG.png.png">
<ion-grid>
@ -27,17 +27,9 @@
</ion-col>
</ion-row>
</ion-grid>
</ion-content>
<ion-footer>
<div class="centerDiv" style="margin-top: 20px !important;">
<ion-button class="button-login" (click)="dismiss()"><b>{{ts.trPK('general','close')}}</b></ion-button>
</div>
</ion-footer> -->
<ion-content dir="ltr">
<ion-content *ngIf="userInfo.CompanyMainCompany != 'CS'" dir="ltr">
<ion-grid>
<ion-row>
<ion-col size="3"></ion-col>
@ -48,22 +40,23 @@
</ion-row>
<ion-row style="padding: 0%;">
<ion-col style="text-align: center;font-weight: bold;font-family: 'WorkSans-Bold'; padding: 0%;">
<p style="font-size: 20px; padding: 0%;">191817</p>
<p style="font-size: 20px; padding: 0%;">{{userInfo.EMPLOYEE_NUMBER}}</p>
</ion-col>
</ion-row>
<ion-row>
<ion-col style="text-align: center;font-weight: bold;font-family: 'WorkSans-Bold'; padding: 0%;">
<p style="font-size: 20px; padding: 0%;">Enad Hilal Ahmed</p>
<p style="font-size: 20px; padding: 0%;">{{userInfo.EMPLOYEE_DISPLAY_NAME}}</p>
</ion-col>
</ion-row>
<ion-row style="padding: 0%;">
<ion-col style="text-align: center;font-weight: bold;font-family: 'WorkSans-Bold'; padding: 0%;">
<p style="font-size: 15px; padding: 0%;">Mobile Developer</p>
<p style="font-size: 15px; padding: 0%;">{{userInfo.JOB_NAME}}</p>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<img style="width: 50%; max-width: 100%; margin-left: 16%;" src="../assets/imgs/HMG_LOGO.png">
<img *ngIf="userInfo.CompanyImageURL" style="width: 90%; max-width: 100%; margin-left: 6%;" [src]="userInfo.CompanyBadge">
<img *ngIf="!userInfo.CompanyImageURL" style="width: 50%; max-width: 100%; margin-left: 16%;" src="../assets/imgs/HMG_LOGO.png">
</ion-col>
</ion-row>
<ion-row>

@ -16,6 +16,9 @@ export class DigitalIdComponent implements OnInit {
) { }
ngOnInit() {
if(JSON.parse(localStorage.getItem('digitalIDUser'))){
this.userInfo = JSON.parse(localStorage.getItem('digitalIDUser'));
}
console.log(this.userInfo);
}

@ -336,6 +336,8 @@ export class AuthenticationService {
user.TokenID = result.TokenID;
user.CompanyImageDescription=result.CompanyImageDescription;
user.CompanyImageURL=result.CompanyImageURL;
user.CompanyBadge = result.CompanyBadge;
user.CompanyMainCompany = result.CompanyMainCompany;
user.LogInTokenID = this.cs.sharedService.getSharedData(
AuthenticationService.LOGIN_DATA,
false

@ -78,6 +78,8 @@ MobileNumber:string;
LogInTokenID:string;
CompanyImageDescription: string;
CompanyImageURL: string;
CompanyMainCompany: string;
CompanyBadge: string;
SERVICE_DAYS:Number;
SERVICE_MONTHS:Number;
SERVICE_YEARS:Number;

@ -15,6 +15,8 @@ export class SMSCheckResponse extends Response {
public LogInTokenID : string;
public CompanyImageDescription:string;
public CompanyImageURL:string;
public CompanyMainCompany: string;
public CompanyBadge: string;
public EMPLOYEE_MOBILE_NUMBER:string;
public EMPLOYEE_NAME:string;
public Mohemm_Wifi_SSID:string;

@ -49,13 +49,17 @@
</app-button>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<ion-button *ngIf="userInfo" class="button-digital-id" (click)="testLogin()">
<p style="color: black;">{{ts.trPK('general','digital-id')}}</p>
<img [ngClass]=" direction === 'en' ? 'digital-id-en' : 'digital-id-ar'" src="../assets/imgs/ID_ico.png">
</ion-button>
</ion-col>
</ion-row>
</ion-grid>
</ion-content>
<ion-footer class="welcome-footer">
<ion-row class="ion-justify-content-center " *ngIf="user">
<ion-col [size]="12">

@ -65,4 +65,32 @@
.text1 {
line-height: 1.5;
}
}
.button-digital-id{
--background: white !important;
background: white !important;
white-space: normal;
color: white;
text-transform: capitalize;
min-height: 1.0cm;
--border-radius: 33px !important;
border-radius: 33px !important;
--min-height: 1.6cm !important;
width: 325px;
border: 1px solid black;
}
.digital-id-en{
color: black;
position: absolute;
right: 25px;
width: 10%;
}
.digital-id-ar{
color: black;
position: absolute;
left: 25px;
width: 10%;
}

@ -14,8 +14,9 @@ import { ConfirmLoginComponent } from 'src/app/authentication/confirm-login/conf
import * as moment from 'moment'
import { ButtonSettings } from '../button/models/button-settingsl';
import { Events } from '@ionic/angular';
import { Events, ModalController } from '@ionic/angular';
import { SharedDataService } from '../../services/shared-data-service/shared-data.service';
import { DigitalIdComponent } from "src/app/authentication/digital-id/digital-id.component";
@Component({
selector: "welcome-login",
@ -72,6 +73,7 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy {
logintype: any;
lastLoginDate: string;
user_name: string;
userInfo: any;
constructor(
public ts: TranslatorService,
@ -79,6 +81,7 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy {
public authservice: AuthenticationService,
public events: Events,
public sharedData: SharedDataService,
public modalController: ModalController,
) { }
ngOnInit() {
@ -97,6 +100,7 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy {
this.empname= localStorage.getItem("emp-name");
this.logintype= localStorage.getItem("login-type");
this.lastLoginDate= localStorage.getItem("login-at");
this.userInfo = JSON.parse(localStorage.getItem('digitalIDUser'));
@ -220,6 +224,21 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy {
this.loginWithUser.emit();
}
testLogin(){
let x = {
title: 'login,verify-with-whatsapp',
url: null,
icon: 'assets/icon/login/104.png',
settings: new ButtonSettings(true, true, true, true),
value: 4,
visible: true,
buttonClass: 'buttonClassWhite',
pClass: 'pClassMyFileIconBlack',
class: 'nationalIdIcon',
};
this.confimLogin.checkAccess(this.logintype, true, this.logintype);
}
// getDate(date: string) {
@ -233,5 +252,14 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy {
// alert(time)
return time;
}
async openDigitalId() {
const modal = await this.modalController.create({
component: DigitalIdComponent,
cssClass: 'digital-id-modal-css'
});
return await modal.present();
}
}

@ -1,7 +1,7 @@
import { EitService } from './../eit/services/eit.service';
import { Component, OnInit } from '@angular/core';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { Platform, MenuController, Events, ActionSheetController } from '@ionic/angular';
import { Platform, MenuController, Events, ActionSheetController, ModalController } from '@ionic/angular';
import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service';
import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user';
import { MenuService } from 'src/app/hmg-common/services/menu/menuservice.service';
@ -38,6 +38,7 @@ import { isThisISOWeek } from 'date-fns';
import { Router } from '@angular/router';
import { BackgroundGeolocation } from '@ionic-native/background-geolocation/ngx';
import { NFC, Ndef} from "@ionic-native/nfc/ngx"
import { DigitalIdComponent } from '../authentication/digital-id/digital-id.component';
@Component({
selector: 'app-home',
@ -156,6 +157,7 @@ export class HomePage implements OnInit {
public router: Router,
private platform: Platform,
public backgroundGeolocation: BackgroundGeolocation,
public modalController: ModalController,
private nfc: NFC
) {
this.events.subscribe('img-change', displayImg => {
@ -166,6 +168,7 @@ export class HomePage implements OnInit {
}
ngOnInit() {
let openDigitalIDCard = this.sharedData.getSharedData("loginWithDigitalIDButton", true);
this.platform.backButton.subscribeWithPriority(9999, () => {
if (this.router.isActive('/home', true)) {
this.common.openHome();
@ -179,6 +182,10 @@ export class HomePage implements OnInit {
this.events.subscribe('getNotCount', badge => {
this.notBadge = badge;
});
if(openDigitalIDCard === true){
console.log("DONE");
this.openDigitalId();
}
}
ionViewWillEnter() {
@ -767,4 +774,12 @@ public showAttendanceOptions() {
this.openPage(this.ticketRequestObject);
}
}
async openDigitalId() {
const modal = await this.modalController.create({
component: DigitalIdComponent,
cssClass: 'digital-id-modal-css'
});
return await modal.present();
}
}

@ -284,19 +284,21 @@
<ion-tabs>
<ion-tab-bar class="tabBar" slot="bottom" style="overflow-x: scroll;">
<ion-tab-bar class="tabBar" slot="bottom" style="overflow-x: scroll;" style="height: 100% !important;">
<!-- <ion-tab-button *ngFor='let action of actionBTN' [hidden]="action.isAvailable" > -->
<ion-tab-button *ngFor='let action of actionBTN; let i=index' [hidden]='!action.isAvailable'
(click)="selectAtion(action.name)" [ngClass]="i === 0 ? 'tabs-margin' : ''">
<img [src]="action.image">
<ion-label style="font-size: 12px;">{{action.name}}</ion-label>
<ion-label style="font-size: 12px; white-space: pre-wrap !important;" *ngIf="action.name !== 'RequestInformation'">{{action.name}}</ion-label>
<ion-label style="font-size: 12px; white-space: pre-wrap !important;" *ngIf="action.name === 'RequestInformation'">Request Information</ion-label>
</ion-tab-button>
<ion-tab-button (click)="skip()">
<img src="../assets/imgs/action-skip.png">
<img src="../assets/imgs/mohemm-action/Skip.png">
<ion-label style="font-size: 12px;">Skip</ion-label>
</ion-tab-button>

@ -144,22 +144,22 @@ export class WorkListMainItgComponent implements OnInit {
imageURL(actionName) {
if (actionName == "Approve") {
return "../assets/imgs/action-approve.png"
return "../assets/imgs/mohemm-action/Approve.png"
}
if (actionName == "Reject") {
return "../assets/imgs/action-reject.png"
return "../assets/imgs/mohemm-action/Reject.png"
}
if (actionName == "RequestInformation") {
return "../assets/imgs/action-info.png"
return "../assets/imgs/mohemm-action/info.png"
}
if (actionName == "Grant") {
return "../assets/imgs/action-info.png"
return "../assets/imgs/mohemm-action/info.png"
}
if (actionName == "Delegate") {
return "../assets/imgs/action-info.png"
return "../assets/imgs/mohemm-action/info.png"
}
if (actionName == "Answer") {
return "../assets/imgs/action-info.png"
return "../assets/imgs/mohemm-action/info.png"
}
}

@ -30,7 +30,7 @@
</ion-segment-button>
<ion-segment-button value="attach " [ngClass]="activeSegment == 'attach' ? 'active-Segment' : 'normal-Segment'">
<ion-segment-button value="attach" [ngClass]="activeSegment == 'attach' ? 'active-Segment' : 'normal-Segment'">
<ion-label class="no-padding-label">{{'worklistMain, attach-file' | translate}} </ion-label>
</ion-segment-button>
</ion-segment>
@ -649,40 +649,40 @@
<ion-tabs>
<ion-tab-bar class="tabBar" slot="bottom">
<ion-tab-bar class="tabBar" slot="bottom" style="height: 100% !important;">
<ion-tab-button *ngIf="approveDis" (click)="actionButton('APPROVED')">
<img src="../assets/imgs/action-approve.png">
<ion-label style="white-space: nowrap"> {{approve_label}}</ion-label>
<img src="../assets/imgs/mohemm-action/Approve.png">
<ion-label class = "action-btn"> {{approve_label}}</ion-label>
<!-- <ion-label> {{'worklistMain, approve' | translate}}</ion-label> -->
</ion-tab-button>
<ion-tab-button *ngIf="closeDis" (click)="actionButton('CLOSE')">
<img src="../assets/imgs/action-approve.png">
<img src="../assets/imgs/mohemm-action/Approve.png">
<!-- <ion-label> {{'worklistMain, approve' | translate}}</ion-label> -->
<ion-label style="white-space: nowrap"> {{close_label}}</ion-label>
<ion-label class = "action-btn"> {{close_label}}</ion-label>
</ion-tab-button>
<ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECTED')">
<img src="../assets/imgs/action-reject.png">
<ion-label style="white-space: nowrap"> {{reject_label}}</ion-label>
<img src="../assets/imgs/mohemm-action/Reject.png">
<ion-label class = "action-btn"> {{reject_label}}</ion-label>
<!-- <ion-label> {{'worklistMain, reject' | translate}}</ion-label> -->
</ion-tab-button>
<ion-tab-button *ngIf="requestDis" (click)="actionButton('REQUEST_INFO')">
<img src="../assets/imgs/action-info.png">
<ion-label style="white-space: nowrap"> {{reqInfo_label}}</ion-label>
<img src="../assets/imgs/mohemm-action/info.png">
<ion-label class = "action-btn"> {{reqInfo_label}}</ion-label>
<!-- <ion-label> {{'worklistMain, request' | translate}}</ion-label> -->
</ion-tab-button>
<ion-tab-button (click)="nextNotfification()">
<img src="../assets/imgs/action-skip.png">
<img src="../assets/imgs/mohemm-action/Skip.png">
<ion-label> {{'worklistMain, skip' | translate}}</ion-label>
</ion-tab-button>
<ion-tab-button [disabled]="moreDisabled" (click)="openMoreActions()">
<img src="../assets/imgs/action-more.png">
<img src="../assets/imgs/mohemm-action/More.png">
<ion-label> {{'worklistMain, more' | translate}}</ion-label>
</ion-tab-button>
</ion-tab-bar>

@ -110,7 +110,7 @@
}
.margin-left {
margin-left: 30px;
margin-left: 0px;
}
.active-Segment {
@ -134,4 +134,9 @@
text-transform: none;
--color-checked: none;
border: 0;
}
.action-btn {
white-space: pre-wrap;
font-size: 12px;
}

@ -164,13 +164,10 @@ export class WorklistMainMRComponent implements OnInit {
{
this.slides.slideTo(3);
}
console.log(" event.detail.value: " + event.detail.value);
}
public slideChanged(event: any) {
this.slides.getActiveIndex().then(index => {
console.log(index);
console.log(event);
if(index === 0)
{
this.activeSegment = 'info';
@ -187,7 +184,6 @@ export class WorklistMainMRComponent implements OnInit {
{
this.activeSegment = 'attach';
}
console.log(this.activeSegment);
});
}

@ -536,36 +536,36 @@
<ion-tabs>
<ion-tab-bar class="tabBar" slot="bottom">
<ion-tab-bar class="tabBar" slot="bottom" style="height: 100% !important;">
<ion-tab-button *ngIf="approveDis" (click)="actionButton('APPROVE')">
<img src="../assets/imgs/action-approve.png">
<ion-label style="white-space: nowrap"> {{approve_label}}</ion-label>
<img src="../assets/imgs/mohemm-action/Approve.png">
<ion-label class = "action-btn"> {{approve_label}}</ion-label>
</ion-tab-button>
<ion-tab-button *ngIf="closeDis" (click)="actionButton('CLOSE')">
<img src="../assets/imgs/action-approve.png">
<ion-label style="white-space: nowrap"> {{close_label}}</ion-label>
<img src="../assets/imgs/mohemm-action/Approve.png">
<ion-label class = "action-btn"> {{close_label}}</ion-label>
</ion-tab-button>
<ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECT')">
<img src="../assets/imgs/action-reject.png">
<ion-label style="white-space: nowrap"> {{reject_label}}</ion-label>
<img src="../assets/imgs/mohemm-action/Reject.png">
<ion-label class = "action-btn"> {{reject_label}}</ion-label>
</ion-tab-button>
<ion-tab-button *ngIf="requestDis" (click)="actionButton('REQUEST_INFO')">
<img src="../assets/imgs/action-info.png">
<ion-label style="white-space: nowrap"> {{reqInfo_label}}</ion-label>
<img src="../assets/imgs/mohemm-action/info.png">
<ion-label class = "action-btn"> {{reqInfo_label}}</ion-label>
</ion-tab-button>
<ion-tab-button (click)="nextNotfification()">
<img src="../assets/imgs/action-skip.png">
<ion-label> {{'worklistMain, skip' | translate}}</ion-label>
<img src="../assets/imgs/mohemm-action/Skip.png">
<ion-label class = "action-btn"> {{'worklistMain, skip' | translate}}</ion-label>
</ion-tab-button>
<ion-tab-button [disabled]="moreDisabled" (click)="openMoreActions()">
<img src="../assets/imgs/action-more.png">
<ion-label> {{'worklistMain, more' | translate}}</ion-label>
<img src="../assets/imgs/mohemm-action/More.png">
<ion-label class = "action-btn"> {{'worklistMain, more' | translate}}</ion-label>
</ion-tab-button>
</ion-tab-bar>
</ion-tabs>

@ -113,7 +113,7 @@
}
.margin-left {
margin-left: 30px;
margin-left: 0px;
}
.active-Segment {
@ -137,4 +137,8 @@
text-transform: none;
--color-checked: none;
border: 0;
}
.action-btn {
white-space: pre-wrap;
font-size: 12px;
}

@ -368,45 +368,45 @@
<ion-tabs>
<ion-tab-bar class="tabBar" slot="bottom">
<ion-tab-bar class="tabBar" slot="bottom" style="height: 100% !important;">
<ion-tab-button *ngIf="approveDis" (click)="actionButton('APPROVE')">
<img src="../assets/imgs/action-approve.png">
<img src="../assets/imgs/mohemm-action/Approve.png">
<!-- <ion-label> {{'worklistMain, approve' | translate}}</ion-label> -->
<ion-label style="white-space: nowrap"> {{approve_label}}</ion-label>
<ion-label class = "action-btn"> {{approve_label}}</ion-label>
</ion-tab-button>
<ion-tab-button *ngIf="closeDis" (click)="actionButton('CLOSE')">
<img src="../assets/imgs/action-approve.png">
<img src="../assets/imgs/mohemm-action/Approve.png">
<!-- <ion-label> {{'worklistMain, approve' | translate}}</ion-label> -->
<ion-label style="white-space: nowrap"> {{close_label}}</ion-label>
<ion-label class = "action-btn"> {{close_label}}</ion-label>
</ion-tab-button>
<ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECT')">
<img src="../assets/imgs/action-reject.png">
<img src="../assets/imgs/mohemm-action/Reject.png">
<!-- <ion-label> {{'worklistMain, reject' | translate}}</ion-label> -->
<ion-label style="white-space: nowrap"> {{reject_label}}</ion-label>
<ion-label class = "action-btn"> {{reject_label}}</ion-label>
</ion-tab-button>
<ion-tab-button *ngIf="requestDis" (click)="actionButton('REQUEST_INFO')">
<img src="../assets/imgs/action-info.png">
<img src="../assets/imgs/mohemm-action/info.png">
<!-- <ion-label> {{'worklistMain, request' | translate}}</ion-label> -->
<ion-label style="white-space: nowrap"> {{reqInfo_label}}</ion-label>
<ion-label class = "action-btn"> {{reqInfo_label}}</ion-label>
</ion-tab-button>
<ion-tab-button (click)="nextNotfification()">
<img src="../assets/imgs/action-skip.png">
<ion-label> {{'worklistMain, skip' | translate}}</ion-label>
<img src="../assets/imgs/mohemm-action/Skip.png">
<ion-label class = "action-btn"> {{'worklistMain, skip' | translate}}</ion-label>
</ion-tab-button>
<ion-tab-button [disabled]="moreDisabled" (click)="openMoreActions()">
<img src="../assets/imgs/action-more.png">
<ion-label> {{'worklistMain, more' | translate}}</ion-label>
<img src="../assets/imgs/mohemm-action/More.png">
<ion-label style="white-space: nowrap !important;"> {{'worklistMain, more' | translate}}</ion-label>
</ion-tab-button>
</ion-tab-bar>
</ion-tabs>

@ -110,7 +110,7 @@
}
.margin-left {
margin-left: 30px;
margin-left: 0px;
}
.active-Segment {
@ -134,4 +134,8 @@
text-transform: none;
--color-checked: none;
border: 0;
}
.action-btn {
white-space: pre-wrap;
font-size: 12px;
}

@ -439,41 +439,41 @@
<ion-tabs>
<ion-tab-bar class="tabBar" slot="bottom">
<ion-tab-bar class="tabBar" slot="bottom" style="height: 100% !important;">
<ion-tab-button *ngIf="approveDis" (click)="actionButton('APPROVED')">
<img src="../assets/imgs/action-approve.png">
<img src="../assets/imgs/mohemm-action/Approve.png">
<!-- <ion-label> {{'worklistMain, approve' | translate}}</ion-label> -->
<ion-label style="white-space: nowrap"> {{approve_label}}</ion-label>
<ion-label class = "action-btn"> {{approve_label}}</ion-label>
</ion-tab-button>
<ion-tab-button *ngIf="closeDis" (click)="actionButton('CLOSE')">
<img src="../assets/imgs/action-approve.png">
<img src="../assets/imgs/mohemm-action/Approve.png">
<!-- <ion-label> {{'worklistMain, approve' | translate}}</ion-label> -->
<ion-label style="white-space: nowrap"> {{close_label}}</ion-label>
<ion-label class = "action-btn"> {{close_label}}</ion-label>
</ion-tab-button>
<ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECTED')">
<img src="../assets/imgs/action-reject.png">
<img src="../assets/imgs/mohemm-action/Reject.png">
<!-- <ion-label > {{'worklistMain, reject' | translate}}</ion-label> -->
<ion-label style="white-space: nowrap"> {{reject_label}}</ion-label>
<ion-label class = "action-btn"> {{reject_label}}</ion-label>
</ion-tab-button>
<ion-tab-button *ngIf="requestDis" (click)="actionButton('REQUEST_INFO')">
<img src="../assets/imgs/action-info.png">
<img src="../assets/imgs/mohemm-action/info.png">
<!-- <ion-label > {{'worklistMain, request' | translate}}</ion-label> -->
<ion-label style="white-space: nowrap"> {{reqInfo_label}}</ion-label>
<ion-label class = "action-btn"> {{reqInfo_label}}</ion-label>
</ion-tab-button>
<ion-tab-button (click)="nextNotfification()">
<img src="../assets/imgs/action-skip.png">
<ion-label> {{'worklistMain, skip' | translate}}</ion-label>
<img src="../assets/imgs/mohemm-action/Skip.png">
<ion-label class = "action-btn"> {{'worklistMain, skip' | translate}}</ion-label>
</ion-tab-button>
<ion-tab-button [disabled]="moreDisabled" (click)="openMoreActions()">
<img src="../assets/imgs/action-more.png">
<ion-label> {{'worklistMain, more' | translate}}</ion-label>
<img src="../assets/imgs/mohemm-action/More.png">
<ion-label class = "action-btn"> {{'worklistMain, more' | translate}}</ion-label>
</ion-tab-button>

@ -325,4 +325,8 @@ ion-card{
text-transform: none;
--color-checked: none;
border: 0;
}
.action-btn {
white-space: pre-wrap;
font-size: 12px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 836 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 848 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 914 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 880 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 888 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Loading…
Cancel
Save