This commit is contained in:
tiago.kayaya
2021-07-01 12:36:53 +01:00
9 changed files with 64 additions and 40 deletions
@@ -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() {
+3 -3
View File
@@ -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>
+33 -31
View File
@@ -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')) {
@@ -117,6 +117,8 @@ export class EditEventToApprovePage implements OnInit {
) {
this.isEventEdited = false;
alert('nice!!___')
}
ngOnInit() {
@@ -40,7 +40,7 @@
</div>
<div class="ion-input-class flex-grow-1">
<mat-form-field floatLabel="never" class="width-100" >
<mat-form-field appearance="none" floatLabel="never" class="width-100 " >
<mat-select placeholder="Selecione agenda*" [(ngModel)]="postEvent.CalendarName" >
<mat-option value="Oficial">
Oficial
@@ -62,7 +62,7 @@
</div>
<div class="ion-input-class flex-grow-1">
<mat-form-field floatLabel="never" class="width-100" required>
<mat-form-field appearance="none" floatLabel="never" class="width-100" required>
<!-- <input matInput type="text" > -->
<mat-select placeholder="Selecione o tipo de evento*" matInput [(ngModel)]="postEvent.Categories[0]" >
<mat-option value="Reunião">
@@ -91,7 +91,7 @@
</div>
<div class="ion-input-class flex-grow-1">
<mat-form-field floatLabel="never" class="date-hour-picker">
<mat-form-field appearance="none" floatLabel="never" floatLabel="never" class="date-hour-picker">
<input matInput [ngxMatDatetimePicker]="picker1"
placeholder="Choose a date"
[formControl]="dateControlStart"
@@ -119,7 +119,7 @@
</div>
<div class="ion-input-class flex-grow-1">
<mat-form-field floatLabel="never" class="date-hour-picker">
<mat-form-field appearance="none" floatLabel="never" floatLabel="never" class="date-hour-picker">
<input matInput [ngxMatDatetimePicker]="fim"
placeholder="Choose a date"
[formControl]="dateControlEnd"
@@ -147,7 +147,7 @@
</div>
<div class="ion-input-class flex-grow-1">
<mat-form-field floatLabel="never" class="width-100" value="false" interface="action-sheet" required>
<mat-form-field appearance="none" floatLabel="never" class="width-100" value="false" interface="action-sheet" required>
<mat-select placeholder="Selecione repetição*" [(ngModel)]="postEvent.IsRecurring">
<mat-option value="false">
Não se repete
@@ -201,4 +201,10 @@ ion-content{
.close-button {
display: block !important;
}
}
.materia-top {
padding-top: 7px;
}
@@ -122,6 +122,8 @@ export class EditEventToApproveComponent implements OnInit {
private animationController: AnimationController,
private toastService: ToastService,
) {
// Edit event to approve
alert('nice!!___')
this.serialNumber = this.navParams.get('serialNumber');