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