mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Add logout
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
|
||||
|
||||
<ion-content class=" bg-blue">
|
||||
|
||||
<div class="profile-content">
|
||||
|
||||
<div class="d-flex justify-space-between align-center">
|
||||
<div class="go-back d-flex align-center" (click)="close()">
|
||||
<ion-icon class="icon" src="assets/images/icons-calendar-arrow-left.svg"></ion-icon> <div>Perfil</div>
|
||||
<ion-icon class="icon" src="assets/images/icons-calendar-arrow-left.svg"></ion-icon> <div>Perfil</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex " (click)="close()">
|
||||
<ion-icon class="icon" src="assets/images/icons-search-close.svg"></ion-icon>
|
||||
<ion-icon class="icon" src="assets/images/icons-search-close.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -55,18 +53,28 @@
|
||||
|
||||
|
||||
<ion-footer class=" footer-container ion-no-border bg-blue">
|
||||
<div class="d-flex justify-space-between">
|
||||
<ion-buttons slot="start" (click)="close()">
|
||||
<ion-button class="btn-cancel" fill="clear" color="#061b52" >
|
||||
<ion-label>Cancelar</ion-label>
|
||||
</ion-button>
|
||||
</ion-buttons>
|
||||
<ion-buttons slot="end" (click)="close()">
|
||||
<ion-button class="btn-ok" fill="clear" color="#fff" >
|
||||
<ion-label>Gravar</ion-label>
|
||||
</ion-button>
|
||||
</ion-buttons>
|
||||
|
||||
<div class="d-flex justify-center mb-10">
|
||||
<ion-buttons slot="start" (click)="logout()">
|
||||
<ion-button class="btn-cancel" fill="clear"style="background:#ffe0e0;" >
|
||||
<ion-label style="color:#d30a0a;">Terminar sessão</ion-label>
|
||||
</ion-button>
|
||||
</ion-buttons>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-space-between">
|
||||
|
||||
<ion-buttons slot="start" (click)="close()">
|
||||
<ion-button class="btn-cancel" fill="clear" color="#061b52" >
|
||||
<ion-label>Cancelar</ion-label>
|
||||
</ion-button>
|
||||
</ion-buttons>
|
||||
<ion-buttons slot="end" (click)="close()">
|
||||
<ion-button class="btn-ok" fill="clear" color="#fff" >
|
||||
<ion-label>Gravar</ion-label>
|
||||
</ion-button>
|
||||
</ion-buttons>
|
||||
|
||||
</div>
|
||||
|
||||
</ion-footer>
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { AnimationController, ModalController } from '@ionic/angular';
|
||||
import { User } from 'src/app/models/user.model';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
@@ -16,7 +17,8 @@ export class ProfileComponent implements OnInit {
|
||||
|
||||
constructor(private modalController:ModalController,
|
||||
private authService: AuthService,
|
||||
private animationController: AnimationController) {
|
||||
private animationController: AnimationController,
|
||||
private router: Router) {
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
|
||||
@@ -104,5 +106,9 @@ export class ProfileComponent implements OnInit {
|
||||
modal.present();
|
||||
}
|
||||
|
||||
logout() {
|
||||
this.router.navigate(['/']);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user