|
|
|
|
@ -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) {
|
|
|
|
|
@ -234,4 +253,13 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
|
|
return time;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async openDigitalId() {
|
|
|
|
|
const modal = await this.modalController.create({
|
|
|
|
|
component: DigitalIdComponent,
|
|
|
|
|
cssClass: 'digital-id-modal-css'
|
|
|
|
|
});
|
|
|
|
|
return await modal.present();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|