diff --git a/src/app/shared/headers/header-no-search/header-no-search-routing.module.ts b/src/app/shared/headers/header-no-search/header-no-search-routing.module.ts deleted file mode 100644 index 6e1f8a04c..000000000 --- a/src/app/shared/headers/header-no-search/header-no-search-routing.module.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; - -import { HeaderNoSearchPage } from './header-no-search.page'; - -const routes: Routes = [ - { - path: '', - component: HeaderNoSearchPage - }, { - path: 'profile', - loadChildren: () => import('./profile/profile.module').then( m => m.ProfilePageModule) - } - -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule], -}) -export class HeaderNoSearchPageRoutingModule {} diff --git a/src/app/shared/headers/header-no-search/header-no-search.module.ts b/src/app/shared/headers/header-no-search/header-no-search.module.ts deleted file mode 100644 index e9ecd8556..000000000 --- a/src/app/shared/headers/header-no-search/header-no-search.module.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import { IonicModule } from '@ionic/angular'; - -import { HeaderNoSearchPageRoutingModule } from './header-no-search-routing.module'; - -import { HeaderNoSearchPage } from './header-no-search.page'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - IonicModule, - HeaderNoSearchPageRoutingModule - ], - exports: [HeaderNoSearchPage], - declarations: [HeaderNoSearchPage] -}) -export class HeaderNoSearchPageModule {} diff --git a/src/app/shared/headers/header-no-search/header-no-search.page.html b/src/app/shared/headers/header-no-search/header-no-search.page.html deleted file mode 100644 index e4be665c1..000000000 --- a/src/app/shared/headers/header-no-search/header-no-search.page.html +++ /dev/null @@ -1,69 +0,0 @@ -
- - -
- - - -
- - {{loggeduser.Profile}} -
-
- -
-
- - -
- -
- - Início -
- -
- - Agenda -
- -
- - Gabinete -
- -
- - Acções -
- - -
- - Chat -
- -
- -
- - -
- - {{profileLabel(loggeduser.Profile)}} -
-
-
- - -
- -
diff --git a/src/app/shared/headers/header-no-search/header-no-search.page.scss b/src/app/shared/headers/header-no-search/header-no-search.page.scss deleted file mode 100644 index 5f8417188..000000000 --- a/src/app/shared/headers/header-no-search/header-no-search.page.scss +++ /dev/null @@ -1,67 +0,0 @@ -@import '~src/function.scss'; - -.div-top-header{ - margin: 0 em(20px); - // background-color: #0782c9; - padding-top: em(15px); - border: 0!important; -} - -.div-logo{ - background: transparent; - width: em(140px); - justify-content: center; - display: flex; -} -.div-logo img{ - width: 100%; - margin: 0px auto; -} -.div-profile{ - width: 45px; - height: 45px; - font-size: 45px; - justify-content: flex-end; - display: flex; - background-color: transparent; - justify-content: center; - align-items: center; - overflow: hidden; - - .icon{ - position: relative; - border: none !important; - } - - .profile-text{ - font-size: 20px; - font-weight: 300; - width: fit-content; - position: absolute; - } -} - -.desktop{ - display: none; -} - -@media only screen and (min-width: 1366px) { - - .mobile{ - display: none !important; - } - .desktop{ - display: block; - } - -} - -.tab{ - height: 65px; - cursor: pointer; - user-select: none; -} - -.active{ - border-top: 7px solid white; -} diff --git a/src/app/shared/headers/header-no-search/header-no-search.page.spec.ts b/src/app/shared/headers/header-no-search/header-no-search.page.spec.ts deleted file mode 100644 index 8b820d37c..000000000 --- a/src/app/shared/headers/header-no-search/header-no-search.page.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { IonicModule } from '@ionic/angular'; - -import { HeaderNoSearchPage } from './header-no-search.page'; - -describe('HeaderNoSearchPage', () => { - let component: HeaderNoSearchPage; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ HeaderNoSearchPage ], - imports: [IonicModule.forRoot()] - }).compileComponents(); - - fixture = TestBed.createComponent(HeaderNoSearchPage); - component = fixture.componentInstance; - fixture.detectChanges(); - })); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/shared/headers/header-no-search/header-no-search.page.ts b/src/app/shared/headers/header-no-search/header-no-search.page.ts deleted file mode 100644 index 21a69fac9..000000000 --- a/src/app/shared/headers/header-no-search/header-no-search.page.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { AnimationController, ModalController } from '@ionic/angular'; -import { Router } from '@angular/router'; -import { LoginUserRespose } from 'src/app/models/user.model'; -import { ProfilePage } from 'src/app/modals/profile/profile.page'; -import { SessionStore } from 'src/app/store/session.service'; - - -@Component({ - selector: 'app-header-no-search', - templateUrl: './header-no-search.page.html', - styleUrls: ['./header-no-search.page.scss'], -}) -export class HeaderNoSearchPage implements OnInit { - - loggeduser: LoginUserRespose; - SessionStore = SessionStore - - constructor(private modalController: ModalController, - private animationController: AnimationController, - private router: Router) { - - this.loggeduser = SessionStore.user; - } - - ngOnInit() { - } - - async openProfile() { - - 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: ProfilePage, - cssClass: 'model profile-modal', - componentProps: { - } - }); - return await modal.present(); - } - - changeRoute(path){ - this.router.navigateByUrl(path) - } - - locationPathname(): string { - return window.location.pathname - } - - - profileLabel(text) { - if (text == 'MDGPR') { - return 'MD' - } else if (text=='PR') { - return text - } else { - return 'UN' - } - } - -} diff --git a/src/app/shared/headers/header-no-search/profile/profile-routing.module.ts b/src/app/shared/headers/header-no-search/profile/profile-routing.module.ts deleted file mode 100644 index 3b21e8195..000000000 --- a/src/app/shared/headers/header-no-search/profile/profile-routing.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; - -import { ProfileComponent } from './profile.page'; - -const routes: Routes = [ - { - path: '', - component: ProfileComponent - } -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule], -}) -export class ProfilePageRoutingModule {} diff --git a/src/app/shared/headers/header-no-search/profile/profile.module.ts b/src/app/shared/headers/header-no-search/profile/profile.module.ts deleted file mode 100644 index fba2e4bfa..000000000 --- a/src/app/shared/headers/header-no-search/profile/profile.module.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import { IonicModule } from '@ionic/angular'; - -import { ProfilePageRoutingModule } from './profile-routing.module'; - -import { ProfileComponent } from './profile.page'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - IonicModule, - ProfilePageRoutingModule - ], - declarations: [ProfileComponent] -}) -export class ProfilePageModule {} diff --git a/src/app/shared/headers/header-no-search/profile/profile.page.html b/src/app/shared/headers/header-no-search/profile/profile.page.html deleted file mode 100644 index f57d93beb..000000000 --- a/src/app/shared/headers/header-no-search/profile/profile.page.html +++ /dev/null @@ -1,82 +0,0 @@ - - -
- -
-
-
Perfil
-
- - -
- -
-
- -
-
- -
-
Dados Perfil
-
{{loggeduser.RoleDescription}}
- -
- - - -
- - - -
- -
- -
-
- -
- - diff --git a/src/app/shared/headers/header-no-search/profile/profile.page.scss b/src/app/shared/headers/header-no-search/profile/profile.page.scss deleted file mode 100644 index acab1b075..000000000 --- a/src/app/shared/headers/header-no-search/profile/profile.page.scss +++ /dev/null @@ -1,64 +0,0 @@ -.profile-content{ - padding: 20px 20px; -} - -.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; -} \ No newline at end of file diff --git a/src/app/shared/headers/header-no-search/profile/profile.page.spec.ts b/src/app/shared/headers/header-no-search/profile/profile.page.spec.ts deleted file mode 100644 index e3f18689f..000000000 --- a/src/app/shared/headers/header-no-search/profile/profile.page.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import { IonicModule } from '@ionic/angular'; - -import { ProfileComponent } from './profile.page'; - -describe('ProfilePage', () => { - let component: ProfileComponent; - let fixture: ComponentFixture; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [ ProfileComponent ], - imports: [IonicModule.forRoot()] - }).compileComponents(); - - fixture = TestBed.createComponent(ProfileComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - })); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/shared/headers/header-no-search/profile/profile.page.ts b/src/app/shared/headers/header-no-search/profile/profile.page.ts deleted file mode 100644 index 6a2a5029c..000000000 --- a/src/app/shared/headers/header-no-search/profile/profile.page.ts +++ /dev/null @@ -1,158 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { Router } from '@angular/router'; -import { AnimationController, ModalController } from '@ionic/angular'; -import { LoginUserRespose } 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-profile', - templateUrl: './profile.page.html', - styleUrls: ['./profile.page.scss'], -}) -export class ProfileComponent implements OnInit { - - loggeduser: LoginUserRespose; - 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(()=> { - this.router.navigateByUrl('/', { replaceUrl: true }); - },100) - - } - - 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 = '' - } - - } - -} diff --git a/src/app/store/session.service.ts b/src/app/store/session.service.ts index d2e8f225e..3e480e7bc 100644 --- a/src/app/store/session.service.ts +++ b/src/app/store/session.service.ts @@ -58,6 +58,7 @@ class SessionService { setInativity(value: boolean) { this._user.Inactivity = value + this._user.UrlBeforeInactivity = '' this.save() }