diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 48f48bcb9..5bf13e9e9 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -108,6 +108,10 @@ const routes: Routes = [ path: 'deploma-options', loadChildren: () => import('./shared/popover/deploma-options/deploma-options.module').then( m => m.DeplomaOptionsPageModule) }, + { + path: 'pin', + loadChildren: () => import('./shared/pin/pin.module').then( m => m.PinPageModule) + }, /* { path: 'chat', diff --git a/src/app/shared/chat/messages/messages.page.ts b/src/app/shared/chat/messages/messages.page.ts index 67e8530d6..67eb8769e 100644 --- a/src/app/shared/chat/messages/messages.page.ts +++ b/src/app/shared/chat/messages/messages.page.ts @@ -6,7 +6,7 @@ import { AuthService } from 'src/app/services/auth.service'; import { ChatService } from 'src/app/services/chat.service'; import { ChatOptionsPopoverPage } from 'src/app/shared/popover/chat-options-popover/chat-options-popover.page'; import { MessagesOptionsPage } from 'src/app/shared/popover/messages-options/messages-options.page'; -import { ProfileComponent } from '../../headers/header-no-search/profile/profile.component'; +import { ProfileComponent } from '../../headers/header-no-search/profile/profile.page'; import { ContactsPage } from '../new-group/contacts/contacts.page'; @Component({ diff --git a/src/app/shared/gabinete-digital/despachos/despachos.page.ts b/src/app/shared/gabinete-digital/despachos/despachos.page.ts index ccfcd8fb3..1f78121fc 100644 --- a/src/app/shared/gabinete-digital/despachos/despachos.page.ts +++ b/src/app/shared/gabinete-digital/despachos/despachos.page.ts @@ -258,7 +258,7 @@ export class DespachosPage implements OnInit { const doc = this.taskList[ this.dicIndex]; - console.log(doc, this.dicIndex, this.taskList) + // console.log(doc, this.dicIndex, this.taskList) const modal = await this.modalController.create({ component: DiscartExpedientModalPage, diff --git a/src/app/shared/header/header.page.ts b/src/app/shared/header/header.page.ts index e2cd2967c..d3eab0f65 100644 --- a/src/app/shared/header/header.page.ts +++ b/src/app/shared/header/header.page.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { AnimationController, ModalController } from '@ionic/angular'; import { SearchPage } from 'src/app/pages/search/search.page'; import { Router } from '@angular/router'; -import { ProfileComponent } from '../headers/header-no-search/profile/profile.component'; +import { ProfileComponent } from '../headers/header-no-search/profile/profile.page'; import { AuthService } from 'src/app/services/auth.service'; import { User } from 'src/app/models/user.model'; 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 index bff5b2f69..6e1f8a04c 100644 --- 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 @@ -1,17 +1,21 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; - -import { HeaderNoSearchPage } from './header-no-search.page'; - -const routes: Routes = [ - { - path: '', - component: HeaderNoSearchPage +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 {} +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class HeaderNoSearchPageRoutingModule {} 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 index f793c1c79..cc42609fe 100644 --- 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 @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { AnimationController, ModalController } from '@ionic/angular'; import { SearchPage } from 'src/app/pages/search/search.page'; import { MenuController } from '@ionic/angular'; -import { ProfileComponent } from './profile/profile.component'; +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'; 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 new file mode 100644 index 000000000..3b21e8195 --- /dev/null +++ b/src/app/shared/headers/header-no-search/profile/profile-routing.module.ts @@ -0,0 +1,17 @@ +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.component.html b/src/app/shared/headers/header-no-search/profile/profile.component.html deleted file mode 100644 index 68d4c6269..000000000 --- a/src/app/shared/headers/header-no-search/profile/profile.component.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - Perfil - - - - - - - - - - - - - - - - Dados Perfil - {{loggeduser.RoleDescription}} - {{loggeduser.Email}} - - - - - Preferência Login - - - - - Impressão Digital - - - - PIN - - - - - - - - - - - - - - - - - Cancelar - - - - - Gravar - - - - - - \ No newline at end of file diff --git a/src/app/shared/headers/header-no-search/profile/profile.component.ts b/src/app/shared/headers/header-no-search/profile/profile.component.ts deleted file mode 100644 index f9a966148..000000000 --- a/src/app/shared/headers/header-no-search/profile/profile.component.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ModalController } from '@ionic/angular'; -import { User } from 'src/app/models/user.model'; -import { AuthService } from 'src/app/services/auth.service'; - -@Component({ - selector: 'app-profile', - templateUrl: './profile.component.html', - styleUrls: ['./profile.component.scss'], -}) -export class ProfileComponent implements OnInit { - - loggeduser: User; - - constructor(private modalController:ModalController, - private authService: AuthService) { - this.loggeduser = authService.ValidatedUser; - - console.log(this.loggeduser.RoleDescription) - } - - ngOnInit() {} - - close(){ - this.modalController.dismiss(); - } - -} 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 new file mode 100644 index 000000000..fba2e4bfa --- /dev/null +++ b/src/app/shared/headers/header-no-search/profile/profile.module.ts @@ -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 { 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 new file mode 100644 index 000000000..50682e210 --- /dev/null +++ b/src/app/shared/headers/header-no-search/profile/profile.page.html @@ -0,0 +1,68 @@ + + + + + + + + + Perfil + + + + + + + + + + + + + + + Dados Perfil + {{loggeduser.RoleDescription}} + {{loggeduser.Email}} + + + + Preferência Login + + + + + + Impressão Digital + + + + + PIN + + + + + + + + + + + + + + + + Cancelar + + + + + Gravar + + + + + + \ No newline at end of file diff --git a/src/app/shared/headers/header-no-search/profile/profile.component.scss b/src/app/shared/headers/header-no-search/profile/profile.page.scss similarity index 100% rename from src/app/shared/headers/header-no-search/profile/profile.component.scss rename to src/app/shared/headers/header-no-search/profile/profile.page.scss diff --git a/src/app/shared/headers/header-no-search/profile/profile.component.spec.ts b/src/app/shared/headers/header-no-search/profile/profile.page.spec.ts similarity index 71% rename from src/app/shared/headers/header-no-search/profile/profile.component.spec.ts rename to src/app/shared/headers/header-no-search/profile/profile.page.spec.ts index d50b2595b..e3f18689f 100644 --- a/src/app/shared/headers/header-no-search/profile/profile.component.spec.ts +++ b/src/app/shared/headers/header-no-search/profile/profile.page.spec.ts @@ -1,13 +1,13 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { IonicModule } from '@ionic/angular'; -import { ProfileComponent } from './profile.component'; +import { ProfileComponent } from './profile.page'; -describe('ProfileComponent', () => { +describe('ProfilePage', () => { let component: ProfileComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ ProfileComponent ], imports: [IonicModule.forRoot()] 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 new file mode 100644 index 000000000..912823371 --- /dev/null +++ b/src/app/shared/headers/header-no-search/profile/profile.page.ts @@ -0,0 +1,68 @@ +import { Component, OnInit } from '@angular/core'; +import { AnimationController, ModalController } from '@ionic/angular'; +import { User } from 'src/app/models/user.model'; +import { AuthService } from 'src/app/services/auth.service'; +import { PinPage } from 'src/app/shared/pin/pin.page'; + +@Component({ + selector: 'app-profile', + templateUrl: './profile.page.html', + styleUrls: ['./profile.page.scss'], +}) +export class ProfileComponent implements OnInit { + + loggeduser: User; + + constructor(private modalController:ModalController, + private authService: AuthService, + private animationController: AnimationController) { + + this.loggeduser = authService.ValidatedUser; + + console.log(this.loggeduser.RoleDescription) + } + + 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: { + } + }); + return await modal.present(); + } + + +} diff --git a/src/app/shared/pin/pin-routing.module.ts b/src/app/shared/pin/pin-routing.module.ts new file mode 100644 index 000000000..cbdcf08ab --- /dev/null +++ b/src/app/shared/pin/pin-routing.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { PinPage } from './pin.page'; + +const routes: Routes = [ + { + path: '', + component: PinPage + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class PinPageRoutingModule {} diff --git a/src/app/shared/pin/pin.module.ts b/src/app/shared/pin/pin.module.ts new file mode 100644 index 000000000..f6465fe53 --- /dev/null +++ b/src/app/shared/pin/pin.module.ts @@ -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 { PinPageRoutingModule } from './pin-routing.module'; + +import { PinPage } from './pin.page'; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + PinPageRoutingModule + ], + declarations: [PinPage] +}) +export class PinPageModule {} diff --git a/src/app/shared/pin/pin.page.html b/src/app/shared/pin/pin.page.html new file mode 100644 index 000000000..370972f55 --- /dev/null +++ b/src/app/shared/pin/pin.page.html @@ -0,0 +1,26 @@ + + + + Digite o PIN novo + + + + 1 2 3 + + + + 4 5 6 + + + + 7 8 9 + + + + 0 + + + + + + diff --git a/src/app/shared/pin/pin.page.scss b/src/app/shared/pin/pin.page.scss new file mode 100644 index 000000000..998b5fe9a --- /dev/null +++ b/src/app/shared/pin/pin.page.scss @@ -0,0 +1,35 @@ +:host{ + text-align: center; + align-items: center; + display: flex; + justify-content: center; + background-image: url("/assets/background/auth.svg"); + background-size: 686px 674px; + background-position: center; + background-position-y: 0px; + background-repeat: no-repeat; +} + + +.circle{ + color: white; + width: 85px; + height: 85px; + display: flex; + align-items: center; + justify-content: center; + font-size: 19pt; + background: #44b5ea; + border-radius: 56px; + margin-left: 10px; + margin-bottom: 10px; +} + +.title{ + padding-top: 32px; +} + +.terminal { + padding-top: 112px; + margin-left: -9px; +} \ No newline at end of file diff --git a/src/app/shared/pin/pin.page.spec.ts b/src/app/shared/pin/pin.page.spec.ts new file mode 100644 index 000000000..d050c34c0 --- /dev/null +++ b/src/app/shared/pin/pin.page.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { PinPage } from './pin.page'; + +describe('PinPage', () => { + let component: PinPage; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ PinPage ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(PinPage); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/shared/pin/pin.page.ts b/src/app/shared/pin/pin.page.ts new file mode 100644 index 000000000..c77d7cf8c --- /dev/null +++ b/src/app/shared/pin/pin.page.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-pin', + templateUrl: './pin.page.html', + styleUrls: ['./pin.page.scss'], +}) +export class PinPage implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/assets/background/auth.svg b/src/assets/background/auth.svg new file mode 100644 index 000000000..c20251421 --- /dev/null +++ b/src/assets/background/auth.svg @@ -0,0 +1,6 @@ + + + + + +