|
|
|
|
@ -17,7 +17,6 @@ import { ButtonSettings } from '../button/models/button-settingsl';
|
|
|
|
|
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";
|
|
|
|
|
import { BusinessCardComponent } from "src/app/authentication/business-card/business-card.component";
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: "welcome-login",
|
|
|
|
|
@ -97,11 +96,11 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
|
|
|
|
|
|
|
console.log( "this.user in welcome login"+ JSON.stringify(this.user));
|
|
|
|
|
|
|
|
|
|
// if (this.user && this.user.BusinessCardPrivilege) {
|
|
|
|
|
// this.showBusinessCard = true
|
|
|
|
|
// } else {
|
|
|
|
|
// this.showBusinessCard = false;
|
|
|
|
|
// }
|
|
|
|
|
if (this.user && this.user.BusinessCardPrivilege) {
|
|
|
|
|
this.showBusinessCard = true
|
|
|
|
|
} else {
|
|
|
|
|
this.showBusinessCard = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.userName = localStorage.getItem("user");
|
|
|
|
|
this.password = localStorage.getItem("password");
|
|
|
|
|
@ -111,6 +110,7 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
|
|
this.lastLoginDate= localStorage.getItem("login-at");
|
|
|
|
|
this.userInfo = JSON.parse(localStorage.getItem('digitalIDUser'));
|
|
|
|
|
this.userBusiness = JSON.parse(localStorage.getItem('bussiness-card-info'));
|
|
|
|
|
console.log('userBusiness' + this.userBusiness);
|
|
|
|
|
// this.userBusiness = this.cs.sharedService.getSharedData('bussiness-card-info', false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -236,7 +236,11 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
loginWithDigitalID(){
|
|
|
|
|
this.confimLogin.checkAccess(this.logintype, true, this.logintype);
|
|
|
|
|
this.confimLogin.checkAccess(this.logintype, true, this.logintype, false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
loginWithBusinessCard() {
|
|
|
|
|
this.confimLogin.checkAccess(this.logintype, false, this.logintype, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -261,16 +265,4 @@ export class WelcomeComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
|
|
return await modal.present();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async openBusinessCard() {
|
|
|
|
|
const modal = await this.modalController.create({
|
|
|
|
|
component: BusinessCardComponent,
|
|
|
|
|
cssClass: 'digital-id-modal-css',
|
|
|
|
|
componentProps: {
|
|
|
|
|
'userInfo': this.userBusiness
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return await modal.present();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|