This commit is contained in:
Tiago Kayaya
2020-08-28 15:44:03 +01:00
7 changed files with 35 additions and 8 deletions
+10
View File
@@ -42,6 +42,16 @@ const routes: Routes = [
]
},
{
path: 'login',
children: [
{
path:'',
loadChildren: ()=> import('../pages/login/login.module').then(m => m.LoginPageModule)
},
]
},
{
path: 'agenda',
children: [
+6 -1
View File
@@ -6,6 +6,7 @@ import { CalModalPage } from '../cal-modal/cal-modal.page';
import { EventsService } from 'src/app/services/events.service';
import { Event } from '../../models/event.model';
import { Router, NavigationEnd } from '@angular/router';
import { AlertService } from 'src/app/services/alert.service';
@Component({
selector: 'app-agenda',
@@ -45,7 +46,8 @@ export class AgendaPage implements OnInit {
@Inject(LOCALE_ID) private locale: string,
private modalCtrl: ModalController,
private eventService: EventsService,
private router: Router
private router: Router,
private alertCrontroller: AlertService
) {}
ngOnInit() {
@@ -176,5 +178,8 @@ export class AgendaPage implements OnInit {
ev.target.complete();
}, 2000);
}
showAlert(){
this.alertCrontroller.presentAlert("Funcionalidade em desenvolvimento.");
}
}
+5
View File
@@ -1,5 +1,10 @@
<ion-header translucent="true">
<ion-toolbar>
<ion-buttons slot="start">
<button (click)="logout()" class="ion-icon-logout">
<ion-icon name="log-out-outline">Sair</ion-icon>
</button>
</ion-buttons>
<!-- customized TOGGLE button -->
<label class="switch"><input type="checkbox" id="togBtn">
<div class="slider round">
+1 -1
View File
@@ -243,4 +243,4 @@
.slider.round:before {
border-radius: 50%;
border: 1px solid #e16817;
}
}
+9 -2
View File
@@ -6,7 +6,7 @@ import { Router } from '@angular/router';
import { ActivatedRoute, NavigationEnd } from '@angular/router';
import { formatDate } from '@angular/common';
import { AlertService } from 'src/app/services/alert.service';
import { AuthService } from 'src/app/services/auth.service';
@Component({
selector: 'app-events',
@@ -41,7 +41,8 @@ export class EventsPage implements OnInit {
constructor(private eventService: EventsService,
private router: Router,
public activatedRoute: ActivatedRoute,
private alertController: AlertService) { }
private alertController: AlertService,
private authService: AuthService) { }
ngOnInit() {
//Inicializar segment
@@ -118,5 +119,11 @@ export class EventsPage implements OnInit {
this.alertController.presentAlert("Funcionalidade em desenvolvimento!");
}
logout()
{
this.authService.ValidatedUser.BasicAuthKey = "";
this.router.navigate(['/home/login']);
}
}
+2 -2
View File
@@ -2,6 +2,6 @@ export const environment = {
production: true,
apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/v1/api/',
domain: 'gabinetedigital.local',
defaultuser: 'paulo.pinto',
defaultuserpwd: 'tabteste@006'
defaultuser: '',
defaultuserpwd: ''
};
+2 -2
View File
@@ -6,8 +6,8 @@ export const environment = {
production: false,
apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/v2/api/',
domain: 'gabinetedigital.local',
defaultuser: 'paulo.pinto',
defaultuserpwd: 'tabteste@006'
defaultuser: '',
defaultuserpwd: ''
};
/*