mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
changes in profile
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { EditProfilePage } from './edit-profile.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: EditProfilePage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class EditProfilePageRoutingModule {}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { EditProfilePageRoutingModule } from './edit-profile-routing.module';
|
||||
|
||||
import { EditProfilePage } from './edit-profile.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
EditProfilePageRoutingModule
|
||||
],
|
||||
declarations: [EditProfilePage]
|
||||
})
|
||||
export class EditProfilePageModule {}
|
||||
@@ -0,0 +1,76 @@
|
||||
<ion-content class=" bg-blue">
|
||||
<div class="btn-close d-flex" (click)="close()">
|
||||
<ion-icon class="icon" src="assets/images/icons-search-close.svg"></ion-icon>
|
||||
</div>
|
||||
|
||||
<div class="profile-content width-100">
|
||||
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<!-- <div class="d-flex " (click)="close()">
|
||||
<ion-icon class="icon" src="assets/images/icons-search-close.svg"></ion-icon>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<div >
|
||||
<div class="d-flex align-center">
|
||||
<ion-icon class="profile-pic" src="assets/images/icons-default-profile.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="profile-info">
|
||||
<div class="label-text">Dados Perfil</div>
|
||||
<div class="user-role">{{loggeduser.RoleDescription}}</div>
|
||||
<div class="email">{{loggeduser.Email}}</div>
|
||||
</div>
|
||||
|
||||
<div class="login-preference" (mouseover)="checkState()" (click)="checkState()">
|
||||
<div class="preference">Preferência Login</div>
|
||||
|
||||
<ion-row>
|
||||
<ion-col class="align-center d-flex">
|
||||
<div class="d-flex align-center" (click)="LoginPreferenceMethod('pin')">
|
||||
<ion-checkbox [checked]="userLoginPreference=='pin' " class="checkBox" ></ion-checkbox>
|
||||
PIN
|
||||
</div>
|
||||
|
||||
</ion-col>
|
||||
<ion-col class="align-center d-flex">
|
||||
<div (click)="addFingerprint()" class="d-flex align-center">
|
||||
<ion-checkbox class="checkBox" [checked]="false"></ion-checkbox>
|
||||
Impressão Digital
|
||||
</div>
|
||||
</ion-col>
|
||||
|
||||
</ion-row>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-center mt-10">
|
||||
<button (click)="addPin()" class="btn-ok buttonSize" fill="clear" color="#fff" >
|
||||
<ion-label>Alterar PIN</ion-label>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
|
||||
<ion-footer class=" footer-container ion-no-border bg-blue">
|
||||
|
||||
<div class="d-flex justify-space-between">
|
||||
|
||||
<ion-buttons slot="start" (click)="close()">
|
||||
<button class="btn-cancel" fill="clear" color="#061b52" >
|
||||
<ion-label>Cancelar</ion-label>
|
||||
</button>
|
||||
</ion-buttons>
|
||||
<ion-buttons slot="end" (click)="close()">
|
||||
<button class="btn-ok" fill="clear" color="#fff" >
|
||||
<ion-label>Gravar</ion-label>
|
||||
</button>
|
||||
</ion-buttons>
|
||||
</div>
|
||||
|
||||
</ion-footer>
|
||||
@@ -0,0 +1,73 @@
|
||||
.btn-close{
|
||||
padding: 20px 20px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.profile-content{
|
||||
width: 100% !important;
|
||||
padding: 0px 20px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.icon{
|
||||
font-size: 35px;
|
||||
}
|
||||
|
||||
.go-back{
|
||||
font-family: Roboto;
|
||||
font-size: 25px;
|
||||
.icon{
|
||||
margin-right: 7px;
|
||||
}
|
||||
}
|
||||
|
||||
.profile-pic{
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
border-radius: 20px;
|
||||
margin: 0px auto;
|
||||
}
|
||||
|
||||
.profile-info{
|
||||
.label-text{
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.user-role{
|
||||
background-color: white;
|
||||
border-radius: 5px;
|
||||
padding: 12px;
|
||||
font-family: Roboto;
|
||||
font-size: 13px;
|
||||
color: black;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.email {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.login-preference{
|
||||
margin-top: 44px;
|
||||
|
||||
.preference{
|
||||
font-family: Roboto;
|
||||
font-size: 15px;
|
||||
margin-bottom: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.checkBox{
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.buttonSize {
|
||||
width: 100% !important;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { EditProfilePage } from './edit-profile.page';
|
||||
|
||||
describe('EditProfilePage', () => {
|
||||
let component: EditProfilePage;
|
||||
let fixture: ComponentFixture<EditProfilePage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ EditProfilePage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(EditProfilePage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,161 @@
|
||||
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';
|
||||
import { FingerprintPage } from 'src/app/shared/fingerprint/fingerprint.page';
|
||||
import { PinPage } from 'src/app/shared/pin/pin.page';
|
||||
import { LocalstoreService } from 'src/app/store/localstore.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-edit-profile',
|
||||
templateUrl: './edit-profile.page.html',
|
||||
styleUrls: ['./edit-profile.page.scss'],
|
||||
})
|
||||
export class EditProfilePage implements OnInit {
|
||||
|
||||
loggeduser: User;
|
||||
userLoginPreference = ''
|
||||
|
||||
constructor(private modalController:ModalController,
|
||||
private authService: AuthService,
|
||||
private animationController: AnimationController,
|
||||
private router: Router,
|
||||
private localstoreService: LocalstoreService
|
||||
) {
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
|
||||
console.log(this.loggeduser.RoleDescription)
|
||||
|
||||
this.checkState()
|
||||
}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
close() {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
async addPin() {
|
||||
const enterAnimation = (baseEl: any) => {
|
||||
const backdropAnimation = this.animationController.create()
|
||||
.addElement(baseEl.querySelector('ion-backdrop')!)
|
||||
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
|
||||
|
||||
const wrapperAnimation = this.animationController.create()
|
||||
.addElement(baseEl.querySelector('.modal-wrapper')!)
|
||||
.keyframes([
|
||||
{ offset: 0, opacity: '1', right: '-100%' },
|
||||
{ offset: 1, opacity: '1', right: '0px' }
|
||||
]);
|
||||
|
||||
return this.animationController.create()
|
||||
.addElement(baseEl)
|
||||
.easing('ease-out')
|
||||
.duration(500)
|
||||
.addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
}
|
||||
|
||||
const leaveAnimation = (baseEl: any) => {
|
||||
return enterAnimation(baseEl).direction('reverse');
|
||||
}
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
enterAnimation,
|
||||
leaveAnimation,
|
||||
component: PinPage,
|
||||
cssClass: 'model profile-modal',
|
||||
componentProps: {
|
||||
}
|
||||
});
|
||||
|
||||
modal.present();
|
||||
}
|
||||
|
||||
|
||||
async addFingerprint() {
|
||||
const enterAnimation = (baseEl: any) => {
|
||||
const backdropAnimation = this.animationController.create()
|
||||
.addElement(baseEl.querySelector('ion-backdrop')!)
|
||||
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
|
||||
|
||||
const wrapperAnimation = this.animationController.create()
|
||||
.addElement(baseEl.querySelector('.modal-wrapper')!)
|
||||
.keyframes([
|
||||
{ offset: 0, opacity: '1', right: '-100%' },
|
||||
{ offset: 1, opacity: '1', right: '0px' }
|
||||
]);
|
||||
|
||||
return this.animationController.create()
|
||||
.addElement(baseEl)
|
||||
.easing('ease-out')
|
||||
.duration(500)
|
||||
.addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
}
|
||||
|
||||
const leaveAnimation = (baseEl: any) => {
|
||||
return enterAnimation(baseEl).direction('reverse');
|
||||
}
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
enterAnimation,
|
||||
leaveAnimation,
|
||||
component: FingerprintPage,
|
||||
cssClass: 'model profile-modal',
|
||||
componentProps: {
|
||||
}
|
||||
});
|
||||
|
||||
modal.present();
|
||||
}
|
||||
|
||||
logout() {
|
||||
// clear local storage
|
||||
window.localStorage.clear();
|
||||
|
||||
setTimeout(()=>{
|
||||
window.location.pathname = '/'
|
||||
location.reload();
|
||||
}, 1000)
|
||||
|
||||
|
||||
}
|
||||
|
||||
LoginPreferenceMethod(type: string) {
|
||||
|
||||
let userData = this.localstoreService.get('UserData', {})
|
||||
|
||||
if (userData.hasOwnProperty('loginPreference')) {
|
||||
if (userData.loginPreference != type) {
|
||||
if (type) {
|
||||
userData.loginPreference = type
|
||||
}
|
||||
} else {
|
||||
userData.loginPreference = 'none'
|
||||
}
|
||||
|
||||
} else {
|
||||
userData.loginPreference = 'none'
|
||||
}
|
||||
|
||||
|
||||
this.localstoreService.set('UserData', userData)
|
||||
}
|
||||
|
||||
checkState() {
|
||||
|
||||
let userData = this.localstoreService.get('UserData', {})
|
||||
|
||||
if (userData.hasOwnProperty('loginPreference')) {
|
||||
this.userLoginPreference = userData.loginPreference
|
||||
} else {
|
||||
this.userLoginPreference = ''
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,6 +7,10 @@ const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: ProfilePage
|
||||
},
|
||||
{
|
||||
path: 'edit-profile',
|
||||
loadChildren: () => import('./edit-profile/edit-profile.module').then( m => m.EditProfilePageModule)
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@@ -1,82 +1,71 @@
|
||||
<ion-content class=" bg-blue">
|
||||
|
||||
<div class="profile-header width-100">
|
||||
<div class="div-logo">
|
||||
<div class="logo height-fit-content">
|
||||
<img class="img" src='assets/images/logo-no-bg.png' alt='logo'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-close d-flex" (click)="close()">
|
||||
<ion-icon class="icon" src="assets/images/icons-search-close.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<!-- <div class="d-flex " (click)="close()">
|
||||
<ion-icon class="icon" src="assets/images/icons-search-close.svg"></ion-icon>
|
||||
</div> -->
|
||||
<div class="profile-title d-flex justify-content-center width-100">
|
||||
<ion-label >{{loggeduser.RoleDescription}}</ion-label>
|
||||
</div>
|
||||
|
||||
<div >
|
||||
<div class="d-flex align-center">
|
||||
<ion-icon class="profile-pic" name="add-circle-outline"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="profile-info">
|
||||
<div class="label-text">Dados Perfil</div>
|
||||
<div class="user-role">{{loggeduser.RoleDescription}}</div>
|
||||
<div class="email">{{loggeduser.Email}}</div>
|
||||
</div>
|
||||
|
||||
<div class="login-preference" (mouseover)="checkState()" (click)="checkState()">
|
||||
<div class="preference">Preferência Login</div>
|
||||
|
||||
<ion-row>
|
||||
<ion-col class="align-center d-flex">
|
||||
<div class="d-flex align-center" (click)="LoginPreferenceMethod('pin')">
|
||||
<ion-checkbox [checked]="userLoginPreference=='pin' " class="checkBox" ></ion-checkbox>
|
||||
PIN
|
||||
</div>
|
||||
|
||||
</ion-col>
|
||||
<ion-col class="align-center d-flex">
|
||||
<div (click)="addFingerprint()" class="d-flex align-center">
|
||||
<ion-checkbox class="checkBox" [checked]="false"></ion-checkbox>
|
||||
Impressão Digital
|
||||
</div>
|
||||
</ion-col>
|
||||
|
||||
</ion-row>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-center mt-10">
|
||||
<ion-buttons slot="start" class="buttonSize" (click)="logout()" >
|
||||
<ion-button class="btn-cancel buttonSize" fill="clear" style="background:#ffe0e0;" >
|
||||
<div class="d-flex mt-10 width-100">
|
||||
<ion-buttons slot="start" class="buttonSize" >
|
||||
<button (click)="logout()" class="btn-delete" fill="clear" style="background:#ffe0e0;" >
|
||||
<ion-label style="color:#d30a0a;">Terminar sessão</ion-label>
|
||||
</ion-button>
|
||||
</button>
|
||||
<button (click)="editProfile()" class="btn-cancel" fill="clear" color="#fff" >
|
||||
<ion-label>Editar Perfil</ion-label>
|
||||
</button>
|
||||
</ion-buttons>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
</div>
|
||||
<div class="notifications-content">
|
||||
<ion-label>2 novas notificações</ion-label>
|
||||
<ion-list>
|
||||
<div class="item cursor-pointer ion-no-padding ion-no-margin" lines="none">
|
||||
<div class="item-content width-100">
|
||||
<div class="notification-item">
|
||||
<img class="notification-icon" slot="end" src="assets/images/icons-default-agenda.svg" >
|
||||
</div>
|
||||
<div class="approve-event-time">
|
||||
<p>08:00</p>
|
||||
<p>09:00</p>
|
||||
</div>
|
||||
<div class="approve-event-detail">
|
||||
<p>Luanda | Palácio Presidencial</p>
|
||||
<h3>Almoço de Família</h3>
|
||||
</div>
|
||||
<div class="notification-label"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item cursor-pointer ion-no-padding ion-no-margin" lines="none">
|
||||
<div class="item-content width-100">
|
||||
<div class="notification-item">
|
||||
<img class="notification-icon" slot="end" src="assets/images/icons-correspondencias.svg" >
|
||||
</div>
|
||||
<div class="approve-event-time">
|
||||
<p>28-07-21</p>
|
||||
<p>09:00</p>
|
||||
</div>
|
||||
<div class="approve-event-detail">
|
||||
<h3>Relatório FMI</h3>
|
||||
<p>Luanda | Palácio Presidencial</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ion-list>
|
||||
|
||||
<div class="d-flex justify-center mt-10">
|
||||
<ion-button (click)="addPin()" class="btn-ok buttonSize" fill="clear" color="#fff" >
|
||||
<ion-label>Alterar PIN</ion-label>
|
||||
</ion-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
|
||||
<!-- <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>
|
||||
|
||||
</ion-footer> -->
|
||||
|
||||
@@ -1,64 +1,114 @@
|
||||
.profile-content{
|
||||
.profile-header{
|
||||
margin: 0 em(20px);
|
||||
// background-color: #0782c9;
|
||||
padding: 20px 20px;
|
||||
border: 0!important;
|
||||
overflow: auto;
|
||||
|
||||
.div-logo{
|
||||
background: transparent;
|
||||
width: calc(100% - 40px) !important;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
float: left;
|
||||
|
||||
.logo{
|
||||
width: 140px;
|
||||
.img{
|
||||
width: 100%;
|
||||
margin: 0px auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn-close{
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
float: left;
|
||||
}
|
||||
.profile-content{
|
||||
padding: 20px 20px;
|
||||
}
|
||||
|
||||
.icon{
|
||||
font-size: 35px;
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
.go-back{
|
||||
font-family: Roboto;
|
||||
font-size: 25px;
|
||||
.icon{
|
||||
margin-right: 7px;
|
||||
}
|
||||
.profile-title{
|
||||
font-weight: 300;
|
||||
font-size: 20px !important;
|
||||
margin-bottom: 40px !important;
|
||||
}
|
||||
|
||||
.profile-pic{
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
border-radius: 20px;
|
||||
margin: 0px auto;
|
||||
.line{
|
||||
width: 100% !important;
|
||||
margin-top: 15px;
|
||||
border-top: 1px solid #d8d8d8;
|
||||
}
|
||||
|
||||
.profile-info{
|
||||
.label-text{
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.user-role{
|
||||
background-color: white;
|
||||
border-radius: 5px;
|
||||
padding: 12px;
|
||||
font-family: Roboto;
|
||||
font-size: 13px;
|
||||
color: black;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.email {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.btn-delete{
|
||||
width: 40% !important;
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
.login-preference{
|
||||
margin-top: 44px;
|
||||
|
||||
.preference{
|
||||
font-family: Roboto;
|
||||
font-size: 15px;
|
||||
margin-bottom: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.checkBox{
|
||||
margin-right: 10px;
|
||||
}
|
||||
.btn-cancel{
|
||||
width: 40% !important;
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
|
||||
.buttonSize {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
ion-list{
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.notifications-content{
|
||||
padding: 0px 20px;
|
||||
.item{
|
||||
display: flex;
|
||||
border-radius: 15px;
|
||||
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.07);
|
||||
border: solid 1px #e9e9e9;
|
||||
background-color: var(--white);
|
||||
margin: 0 auto;
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
color: #000;
|
||||
overflow: hidden;
|
||||
|
||||
border: 1px solid blue;
|
||||
|
||||
.notification-item{
|
||||
width: fit-content;
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
padding: 0 !important;
|
||||
overflow: auto;
|
||||
|
||||
|
||||
}
|
||||
.notification-icon{
|
||||
font-size: 35px !important;
|
||||
}
|
||||
.approve-event-time{
|
||||
width: fit-content !important;
|
||||
float: left;
|
||||
}
|
||||
.approve-event-detail{
|
||||
width: calc(100% - 115px) !important;
|
||||
float: left;
|
||||
}
|
||||
.notification-label{
|
||||
float: right;
|
||||
width: 5px;
|
||||
height: 100%;
|
||||
border-radius: 0% 100% 100% 0%;
|
||||
background-color: #ffb703;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.item-inner{
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import { AuthService } from 'src/app/services/auth.service';
|
||||
import { FingerprintPage } from 'src/app/shared/fingerprint/fingerprint.page';
|
||||
import { PinPage } from 'src/app/shared/pin/pin.page';
|
||||
import { LocalstoreService } from 'src/app/store/localstore.service';
|
||||
import { EditProfilePage } from './edit-profile/edit-profile.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-profile',
|
||||
@@ -37,80 +38,7 @@ export class ProfilePage implements OnInit {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
async addPin() {
|
||||
const enterAnimation = (baseEl: any) => {
|
||||
const backdropAnimation = this.animationController.create()
|
||||
.addElement(baseEl.querySelector('ion-backdrop')!)
|
||||
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
|
||||
|
||||
const wrapperAnimation = this.animationController.create()
|
||||
.addElement(baseEl.querySelector('.modal-wrapper')!)
|
||||
.keyframes([
|
||||
{ offset: 0, opacity: '1', right: '-100%' },
|
||||
{ offset: 1, opacity: '1', right: '0px' }
|
||||
]);
|
||||
|
||||
return this.animationController.create()
|
||||
.addElement(baseEl)
|
||||
.easing('ease-out')
|
||||
.duration(500)
|
||||
.addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
}
|
||||
|
||||
const leaveAnimation = (baseEl: any) => {
|
||||
return enterAnimation(baseEl).direction('reverse');
|
||||
}
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
enterAnimation,
|
||||
leaveAnimation,
|
||||
component: PinPage,
|
||||
cssClass: 'model profile-modal',
|
||||
componentProps: {
|
||||
}
|
||||
});
|
||||
|
||||
modal.present();
|
||||
}
|
||||
|
||||
|
||||
async addFingerprint() {
|
||||
const enterAnimation = (baseEl: any) => {
|
||||
const backdropAnimation = this.animationController.create()
|
||||
.addElement(baseEl.querySelector('ion-backdrop')!)
|
||||
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
|
||||
|
||||
const wrapperAnimation = this.animationController.create()
|
||||
.addElement(baseEl.querySelector('.modal-wrapper')!)
|
||||
.keyframes([
|
||||
{ offset: 0, opacity: '1', right: '-100%' },
|
||||
{ offset: 1, opacity: '1', right: '0px' }
|
||||
]);
|
||||
|
||||
return this.animationController.create()
|
||||
.addElement(baseEl)
|
||||
.easing('ease-out')
|
||||
.duration(500)
|
||||
.addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
}
|
||||
|
||||
const leaveAnimation = (baseEl: any) => {
|
||||
return enterAnimation(baseEl).direction('reverse');
|
||||
}
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
enterAnimation,
|
||||
leaveAnimation,
|
||||
component: FingerprintPage,
|
||||
cssClass: 'model profile-modal',
|
||||
componentProps: {
|
||||
}
|
||||
});
|
||||
|
||||
modal.present();
|
||||
}
|
||||
notImplemented(){}
|
||||
|
||||
logout() {
|
||||
// clear local storage
|
||||
@@ -121,28 +49,6 @@ export class ProfilePage implements OnInit {
|
||||
location.reload();
|
||||
}, 1000)
|
||||
|
||||
|
||||
}
|
||||
|
||||
LoginPreferenceMethod(type: string) {
|
||||
|
||||
let userData = this.localstoreService.get('UserData', {})
|
||||
|
||||
if (userData.hasOwnProperty('loginPreference')) {
|
||||
if (userData.loginPreference != type) {
|
||||
if (type) {
|
||||
userData.loginPreference = type
|
||||
}
|
||||
} else {
|
||||
userData.loginPreference = 'none'
|
||||
}
|
||||
|
||||
} else {
|
||||
userData.loginPreference = 'none'
|
||||
}
|
||||
|
||||
|
||||
this.localstoreService.set('UserData', userData)
|
||||
}
|
||||
|
||||
checkState() {
|
||||
@@ -157,4 +63,41 @@ export class ProfilePage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
async editProfile() {
|
||||
|
||||
const enterAnimation = (baseEl: any) => {
|
||||
const backdropAnimation = this.animationController.create()
|
||||
.addElement(baseEl.querySelector('ion-backdrop')!)
|
||||
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
|
||||
|
||||
const wrapperAnimation = this.animationController.create()
|
||||
.addElement(baseEl.querySelector('.modal-wrapper')!)
|
||||
.keyframes([
|
||||
{ offset: 0, opacity: '1', right: '-100%' },
|
||||
{ offset: 1, opacity: '1', right: '0px' }
|
||||
]);
|
||||
|
||||
return this.animationController.create()
|
||||
.addElement(baseEl)
|
||||
.easing('ease-out')
|
||||
.duration(500)
|
||||
.addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
}
|
||||
|
||||
const leaveAnimation = (baseEl: any) => {
|
||||
return enterAnimation(baseEl).direction('reverse');
|
||||
}
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
enterAnimation,
|
||||
leaveAnimation,
|
||||
component: EditProfilePage,
|
||||
cssClass: 'model profile-modal',
|
||||
componentProps: {
|
||||
}
|
||||
});
|
||||
return await modal.present();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
|
||||
<div class="conteiner-box px-20 height-100 overflow-y-auto" ng-swipe-up="swipe($event)">
|
||||
@@ -36,9 +36,9 @@
|
||||
<div class="text">A sua Agenda</div>
|
||||
</div>
|
||||
<button class="btn-no-color" [routerLink]="['/home/agenda']">
|
||||
<ion-icon
|
||||
class="icon-next"
|
||||
slot="end"
|
||||
<ion-icon
|
||||
class="icon-next"
|
||||
slot="end"
|
||||
src="assets/images/icons-arrow-circle-arrow-right.svg"
|
||||
></ion-icon>
|
||||
</button>
|
||||
@@ -46,8 +46,7 @@
|
||||
<div class="content">
|
||||
<ion-list>
|
||||
<ion-item class="cursor-pointer" lines="none" *ngFor="let event of toDayEventStorage.eventsList"
|
||||
(click)="goToEvent(event.EventId)"
|
||||
>
|
||||
(click)="goToEvent(event.EventId)">
|
||||
<div class="d-flex content-{{loggeduser.Profile}}-{{event.CalendarName}}">
|
||||
|
||||
<div class="schedule-time">
|
||||
@@ -64,7 +63,7 @@
|
||||
</ion-item>
|
||||
|
||||
</ion-list>
|
||||
<!--
|
||||
<!--
|
||||
<div class="resume">
|
||||
<div class="title">
|
||||
Resumo para Amnahã
|
||||
@@ -75,7 +74,7 @@
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="schedule">
|
||||
<div class="schedule-header">
|
||||
<div class="title">
|
||||
@@ -100,10 +99,10 @@
|
||||
<div class="location">{{ task.workflowInstanceDataFields.Sender }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item >
|
||||
</ion-item>
|
||||
|
||||
</ion-list>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
</ion-content>
|
||||
|
||||
@@ -6,6 +6,7 @@ import { ProfileComponent } from './profile/profile.page';
|
||||
import { Router } from '@angular/router';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { User } from 'src/app/models/user.model';
|
||||
import { ProfilePage } from 'src/app/modals/profile/profile.page';
|
||||
@Component({
|
||||
selector: 'app-header-no-search',
|
||||
templateUrl: './header-no-search.page.html',
|
||||
@@ -14,12 +15,12 @@ import { User } from 'src/app/models/user.model';
|
||||
export class HeaderNoSearchPage implements OnInit {
|
||||
|
||||
loggeduser: User;
|
||||
|
||||
|
||||
constructor(private modalController: ModalController,
|
||||
private menu: MenuController,
|
||||
private animationController: AnimationController,
|
||||
private router: Router,
|
||||
authService: AuthService) {
|
||||
authService: AuthService) {
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
}
|
||||
@@ -51,12 +52,12 @@ export class HeaderNoSearchPage implements OnInit {
|
||||
const leaveAnimation = (baseEl: any) => {
|
||||
return enterAnimation(baseEl).direction('reverse');
|
||||
}
|
||||
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
enterAnimation,
|
||||
leaveAnimation,
|
||||
component: ProfileComponent,
|
||||
component: ProfilePage,
|
||||
cssClass: 'model profile-modal',
|
||||
componentProps: {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="120" height="120" viewBox="0 0 120 120">
|
||||
<defs>
|
||||
<filter id="b8vhf9zcla" width="111.2%" height="106.5%" x="-5.6%" y="-3.3%" filterUnits="objectBoundingBox">
|
||||
<feOffset in="SourceAlpha" result="shadowOffsetOuter1"/>
|
||||
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="7.5"/>
|
||||
<feColorMatrix in="shadowBlurOuter1" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.490302666 0"/>
|
||||
</filter>
|
||||
<circle id="u6jbltuc9c" cx="60" cy="60" r="60"/>
|
||||
<path id="ggtp3ri2hb" d="M25 0h350c13.807 0 25 11.193 25 25v664H0V25C0 11.193 11.193 0 25 0z"/>
|
||||
</defs>
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<g>
|
||||
<path fill="#0782C9" d="M0 75H1024V708H0z" transform="translate(-764 -120)"/>
|
||||
<g fill="#0782C9">
|
||||
<path d="M0 0H1024V150H0z" transform="translate(-764 -120)"/>
|
||||
</g>
|
||||
<g>
|
||||
<g transform="translate(-764 -120) translate(624) matrix(1 0 0 -1 0 689)">
|
||||
<use fill="#000" filter="url(#b8vhf9zcla)" xlink:href="#ggtp3ri2hb"/>
|
||||
<use fill="#0782C9" xlink:href="#ggtp3ri2hb"/>
|
||||
</g>
|
||||
<g transform="translate(-764 -120) translate(624) translate(140 120)">
|
||||
<rect width="120" height="120" fill="#FFF" fill-opacity=".6" rx="60"/>
|
||||
<g>
|
||||
<mask id="e5tuzk8b4d" fill="#fff">
|
||||
<use xlink:href="#u6jbltuc9c"/>
|
||||
</mask>
|
||||
<path fill="#42B9FE" fill-opacity=".7" d="M60 28c15.464 0 28 13.431 28 30 0 10.406-4.945 19.574-12.454 24.955C92.175 89.521 104 106.317 104 126c0 25.405-19.7 46-44 46s-44-20.595-44-46c0-19.683 11.825-36.48 28.454-43.046C36.944 77.574 32 68.406 32 58c0-16.569 12.536-30 28-30z" mask="url(#e5tuzk8b4d)"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -408,10 +408,10 @@ $app-theme: mat-light-theme((
|
||||
}
|
||||
|
||||
.approve-event-time{
|
||||
width: 33px;
|
||||
float: left;
|
||||
}
|
||||
.approve-event-time p{
|
||||
width: 33px;
|
||||
font-family: Roboto;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
|
||||
Reference in New Issue
Block a user