mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -50,6 +50,9 @@ export class EditEventPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
private router: Router,
|
||||
) {
|
||||
|
||||
|
||||
|
||||
this.isEventEdited = false;
|
||||
this.postEvent = this.navParams.get('event');
|
||||
this.caller = this.navParams.get('caller');
|
||||
|
||||
@@ -48,6 +48,7 @@ export class EditEventPage implements OnInit {
|
||||
private iab: InAppBrowser) {
|
||||
this.loadedEvent = new Event();
|
||||
this.loadedEvent.Body = new EventBody();
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<ion-content class="text-white">
|
||||
<div class="main-wrapper">
|
||||
<div class="wrapper" *ngIf="!hasSession || enterWithPassword">
|
||||
<div class="wrapper" *ngIf="!hasSession && !setPin || loginPreference == 'none' && !setPin ">
|
||||
|
||||
<div class="bg-1 d-flex justify-center align-center">
|
||||
<div class="bg-2 d-flex justify-center align-center">
|
||||
@@ -32,7 +32,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main-content height-100" *ngIf="hasSession && !enterWithPassword">
|
||||
<div class="main-content height-100" *ngIf="setPin || hasSession && loginPreference == 'pin' ">
|
||||
<div class=" align-center justify-center">
|
||||
<div class="div-top-header">
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
Entrar com senha
|
||||
</div>
|
||||
|
||||
<div *ngIf="setPint" class="voltar d-flex align-center justify-center pt-25 clear" (click)="clearCode()">
|
||||
<div class="voltar d-flex align-center justify-center pt-25 clear" (click)="clearCode()">
|
||||
Limpar
|
||||
</div>
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ export class LoginPage implements OnInit {
|
||||
hasPin: boolean
|
||||
loginPreference: string
|
||||
hasSession = false
|
||||
enterWithPassword = false
|
||||
setPin = false
|
||||
|
||||
|
||||
constructor(
|
||||
@@ -35,35 +35,37 @@ export class LoginPage implements OnInit {
|
||||
public alertController: AlertController
|
||||
) {
|
||||
|
||||
// App has session
|
||||
if(!localStorage.getItem('UserData')) {
|
||||
this.hasSession = false
|
||||
} else {
|
||||
this.hasSession = true
|
||||
// this.router.navigate(['/home/events']);
|
||||
}
|
||||
|
||||
let userData = JSON.parse(localStorage.getItem('UserData')) || {}
|
||||
|
||||
const loginPreference = userData?.loginPreference
|
||||
const pin = userData?.PIN
|
||||
|
||||
if (pin) {
|
||||
this.hasPin = true
|
||||
} else {
|
||||
this.hasPin = false
|
||||
}
|
||||
|
||||
if (loginPreference) {
|
||||
this.loginPreference = loginPreference
|
||||
|
||||
} else {
|
||||
this.loginPreference = ''
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {}
|
||||
ngOnInit() {
|
||||
|
||||
// App has session
|
||||
if(!localStorage.getItem('UserData')) {
|
||||
this.hasSession = false
|
||||
} else {
|
||||
this.hasSession = true
|
||||
// this.router.navigate(['/home/events']);
|
||||
}
|
||||
|
||||
let userData = JSON.parse(localStorage.getItem('UserData')) || {}
|
||||
|
||||
const loginPreference = userData?.loginPreference
|
||||
const pin = userData?.PIN
|
||||
|
||||
if (pin) {
|
||||
this.hasPin = true
|
||||
} else {
|
||||
this.hasPin = false
|
||||
}
|
||||
|
||||
if (loginPreference) {
|
||||
this.loginPreference = loginPreference
|
||||
|
||||
} else {
|
||||
this.loginPreference = ''
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Function to validade the login inputs
|
||||
validateUsername() {
|
||||
@@ -128,9 +130,9 @@ export class LoginPage implements OnInit {
|
||||
this.getToken();
|
||||
this.hasSession = true
|
||||
this.hasPin = false
|
||||
this.enterWithPassword = false
|
||||
this.setPin = true
|
||||
|
||||
if(!this.hasPin) {
|
||||
if(!this.hasPin || this.hasPin) {
|
||||
} else {
|
||||
this.router.navigate(['/home/events']);
|
||||
}
|
||||
@@ -180,7 +182,7 @@ export class LoginPage implements OnInit {
|
||||
|
||||
let userData = JSON.parse(localStorage.getItem('UserData')) || {}
|
||||
const pin = userData?.PIN
|
||||
|
||||
|
||||
//if( encrypted == pin) {
|
||||
|
||||
if( encrypted == localStorage.getItem('PIN')) {
|
||||
|
||||
Reference in New Issue
Block a user