|
|
|
|
@ -19,6 +19,7 @@ import * as moment from 'moment';
|
|
|
|
|
import { CheckAppVersionResponse } from 'src/app/hmg-common/services/authentication/models/check-app-version.response';
|
|
|
|
|
import { NFC } from "@ionic-native/nfc/ngx";
|
|
|
|
|
import { DigitalIdComponent } from '../digital-id/digital-id.component';
|
|
|
|
|
import { AppUpdateComponent } from '../app-update/app-update.component';
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'app-confirm-login',
|
|
|
|
|
@ -455,16 +456,25 @@ export class ConfirmLoginComponent implements OnInit {
|
|
|
|
|
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
|
|
|
|
|
this.appUpdate(result.ErrorEndUserMessage, result);
|
|
|
|
|
} else if (result.MessageStatus == 1) {
|
|
|
|
|
this.checkUserAuthentication();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async appUpdate(msg, result) {
|
|
|
|
|
const modal = await this.modalController.create({
|
|
|
|
|
component: AppUpdateComponent,
|
|
|
|
|
cssClass: 'app-update-modal-css',
|
|
|
|
|
componentProps: {'msg':msg}
|
|
|
|
|
});
|
|
|
|
|
modal.onDidDismiss().then((data) => {
|
|
|
|
|
this.handleAppUpdate(result);
|
|
|
|
|
});
|
|
|
|
|
return await modal.present();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
checkAccess(el: any, isDigitalID = false, buttonType?) {
|
|
|
|
|
const data = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
|
|
|
|
|
if (isDigitalID) {
|
|
|
|
|
|