From 3614a2eba7e48dbdd0bc98feeb8ddfbcecc09d2a Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Thu, 2 Sep 2021 10:12:18 +0100 Subject: [PATCH] Fix login layout --- src/app/Rules/despacho.service.ts | 15 + src/app/home/home.page.ts | 4 +- src/app/pages/agenda/agenda.page.ts | 3 - src/app/pages/events/events.page.ts | 2 +- src/app/pages/inactivity/inactivity.page.html | 2 +- src/app/pages/inactivity/inactivity.page.scss | 366 ++++++++++++------ src/app/pages/inactivity/inactivity.page.ts | 42 +- src/app/pages/login/login.page.scss | 6 +- src/app/pages/login/login.page.ts | 4 +- .../web-notification-popup.service.ts | 2 - 10 files changed, 301 insertions(+), 145 deletions(-) diff --git a/src/app/Rules/despacho.service.ts b/src/app/Rules/despacho.service.ts index 1d07c2698..d6356b8a2 100644 --- a/src/app/Rules/despacho.service.ts +++ b/src/app/Rules/despacho.service.ts @@ -6,6 +6,7 @@ import { CustomTaskPipe } from '../pipes/custom-task.pipe'; import { ProcessesService } from '../services/processes.service'; import { DespachoStore } from '../store/despacho-store.service'; import { LoaderService } from 'src/app/store/loader.service' +import { SessionStore } from '../store/session.service'; @Injectable({ providedIn: 'root' }) @@ -225,6 +226,20 @@ export class DespachoService { } + async getListPr() { + let result = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise(); + + let despachosPr; + switch (SessionStore.user.Profile) { + case 'MDGPR': + despachosPr = result.reverse().filter(data => data.activityInstanceName == "Tarefa de Despacho"); + break; + case 'PR': + despachosPr = result.reverse().filter(data => data.activityInstanceName == "Concluir Despacho"); + break; + } + } + sortArrayISODate(myArray: any) { return myArray.sort(function(a, b) { return (a.CreateDate < b.CreateDate) ? -1 : ((a.CreateDate > b.CreateDate) ? 1 : 0); diff --git a/src/app/home/home.page.ts b/src/app/home/home.page.ts index 71a17b5a8..681b4155e 100644 --- a/src/app/home/home.page.ts +++ b/src/app/home/home.page.ts @@ -103,7 +103,8 @@ export class HomePage implements OnInit { ngOnInit() { /* this.network.checkNetworkConnection; this.network.checkNetworkDisconnection; */ - console.log('Active route ', this.router.url) + // console.log('Active route ', this.router.url) + if (this.platform.is('desktop') || this.platform.is('mobileweb')) { this.webnotification.webconnection(); this.webnotification.onReceviNotificationWeb(); @@ -165,7 +166,6 @@ export class HomePage implements OnInit { 'despachos', () => { this.despachoRule.getList({updateStore: true}) - } ) diff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts index eb2b3f70c..6cfc2ee4a 100644 --- a/src/app/pages/agenda/agenda.page.ts +++ b/src/app/pages/agenda/agenda.page.ts @@ -358,9 +358,6 @@ export class AgendaPage implements OnInit { get CalendarCurrentDay ():any { - /* console.log(this.viewDate.getDate(), '0_0') */ - // console.log(this.viewDate.getDate(), '0_0') - return this.viewDate.getDate() } diff --git a/src/app/pages/events/events.page.ts b/src/app/pages/events/events.page.ts index a3a986157..021e447cc 100644 --- a/src/app/pages/events/events.page.ts +++ b/src/app/pages/events/events.page.ts @@ -95,7 +95,7 @@ export class EventsPage implements OnInit { this.platform.resize.subscribe(async () => { //console.log('Resize event detected'); - console.log('Resize event detected'); + // console.log('Resize event detected'); }); diff --git a/src/app/pages/inactivity/inactivity.page.html b/src/app/pages/inactivity/inactivity.page.html index 5c971a7cd..b9e70878a 100644 --- a/src/app/pages/inactivity/inactivity.page.html +++ b/src/app/pages/inactivity/inactivity.page.html @@ -33,7 +33,7 @@ -
+
diff --git a/src/app/pages/inactivity/inactivity.page.scss b/src/app/pages/inactivity/inactivity.page.scss index b7c588f44..8756fb1f0 100644 --- a/src/app/pages/inactivity/inactivity.page.scss +++ b/src/app/pages/inactivity/inactivity.page.scss @@ -1,77 +1,79 @@ @import '~src/function.scss'; :host, app-login { - ion-content { - background: linear-gradient(180deg, #42B9FE 0%, #0782C9 100%) !important; - } + ion-content { + background: linear-gradient(180deg, #42B9FE 0%, #0782C9 100%) !important; + } } ion-content{ background-color: white !important; } .main-wrapper{ - background: linear-gradient(180deg, #42B9FE 0%, #0782C9 100%) !important; - display: flex; - width: 100vw; - height: 100vh; - overflow: auto; - background: white !important; - + background: linear-gradient(180deg, #42B9FE 0%, #0782C9 100%) !important; + display: flex; + width: 100vw; + height: 100vh; + overflow: auto; + background: white !important; + display: flex; + align-items: center; + justify-content: center; } .wrapper{ - /* width: 400px; */ - height: auto; - padding: 0 !important; - /* margin: auto !important; */ - overflow: auto; - width: 100%; - background: linear-gradient(180deg, #42B9FE 0%, #0782C9 100%) !important; + /* width: 400px; */ + height: auto; + padding: 0 !important; + /* margin: auto !important; */ + overflow: auto; + width: 100%; + background: linear-gradient(180deg, #42B9FE 0%, #0782C9 100%) !important; } .logo{ - width: 400px; - height: 400px; - background-position: center; - background-repeat: no-repeat; + width: 400px; + height: 400px; + background-position: center; + background-repeat: no-repeat; } .bg-1{ - width: 250px; - height: 250px; - overflow: auto; - border-radius: 50%; - background: #4cb9f825; - margin: auto; - .bg-2{ - width: 225px; - height: 225px; - overflow: auto; - border-radius: 50%; - background: #61bdf2b4; - margin: auto; - .bg-3{ - width: 200px; - height: 200px; - overflow: auto; - border-radius: 50%; - background: #96d3f8be; - margin: auto; - .bg-4{ - width: 175px; - height: 175px; - overflow: auto; - border-radius: 50%; - background: rgba(255, 255, 255, 0.918); - padding: 15px; - margin: auto; + width: 250px; + height: 250px; + overflow: auto; + border-radius: 50%; + background: #4cb9f825; + margin: auto; + .bg-2{ + width: 225px; + height: 225px; + overflow: auto; + border-radius: 50%; + background: #61bdf2b4; + margin: auto; + .bg-3{ + width: 200px; + height: 200px; + overflow: auto; + border-radius: 50%; + background: #96d3f8be; + margin: auto; + .bg-4{ + width: 175px; + height: 175px; + overflow: auto; + border-radius: 50%; + background: rgba(255, 255, 255, 0.918); + padding: 15px; + margin: auto; - .bg-4 img{ - width: 100%; - } - } - } - } + .bg-4 img{ + width: 100%; + } + } + } + } } .div-logo{ width: 200px !important; @@ -133,110 +135,216 @@ ion-item{ .circle{ - color: white; - width: 70px; - height: 70px; - display: flex; - align-items: center; - justify-content: center; - font-size: 19pt; - background: #44b5ea; - border-radius: 56px; - margin-bottom: 15px; - user-select: none; - margin-right: 15px; - margin-left: 15px; + color: white; + width: 70px; + height: 70px; + display: flex; + align-items: center; + justify-content: center; + font-size: 19pt; + background: #44b5ea; + border-radius: 56px; + margin-bottom: 15px; + user-select: none; + margin-right: 15px; + margin-left: 15px; } .title{ - padding-top: 32px; - z-index: 1000; - height: unset !important; - position: relative; - top: -30px; + padding-top: 32px; + z-index: 1000; + height: unset !important; + position: relative; + top: -30px; } .terminal { - padding-top: 49px; - justify-content: center; - display: flex; - flex-direction: column; - align-items: center; - background-image: url(/assets/background/auth.svg); - background-position: center; - background-repeat: no-repeat; - width: 100%; - padding-bottom: 48px; - margin-bottom: -58px; - z-index: 100; - margin-top: -80px; + justify-content: center; + display: flex; + flex-direction: column; + background-image: url(/assets/background/auth.svg); + background-position: center; + background-repeat: no-repeat; + width: 100%; + z-index: 100; + background-size: 610px; } .clear{ - color: #44b5ea; - font-size: 12pt; - z-index: 1000; + color: #44b5ea; + font-size: 12pt; + z-index: 1000; } .dot-active{ - background: #44b5ea; + background: #44b5ea; } .dot{ - width: 25px; - height: 25px; - margin: 0 10px 0 0; - border: 3px solid #44b5ea; - box-sizing: border-box; - border-radius: 50px; - -webkit-border-radius: 50px; - -moz-border-radius: 50px; - -ms-border-radius: 50px; - -o-border-radius: 50px; + width: 25px; + height: 25px; + margin: 0 10px 0 0; + border: 3px solid #44b5ea; + box-sizing: border-box; + border-radius: 50px; + -webkit-border-radius: 50px; + -moz-border-radius: 50px; + -ms-border-radius: 50px; + -o-border-radius: 50px; } .main-content { - width: 100vw; - height: 100vh; - background-color: white; - text-align: center; - align-items: center; - justify-content: center; - background-size: 686px 674px; - background-position: center; - background-position-y: 110px; - background-repeat: no-repeat; - margin: auto; - justify-content: space-around; + width: 100vw; + /* background-color: white; */ + text-align: center; + align-items: center; + /* justify-content: center; */ + background-size: 686px 674px; + background-position: center; + background-position-y: 110px; + background-repeat: no-repeat; + margin: auto; + /* justify-content: space-around; */ } .voltar{ - user-select: none; + user-select: none; } .msg-bottom{ - width: 100%; - color: #fff; - align-items: center; - justify-content: center; + width: 100%; + color: #fff; + align-items: center; + justify-content: center; - .msg-bottom-p{ - width: 220px; - position: absolute; - bottom: 0 !important; - text-align: center; - } + .msg-bottom-p{ + width: 220px; + position: absolute; + bottom: 0 !important; + text-align: center; + } } @media only screen and (max-height: 746px){ - .msg-bottom-p { - padding-top: 20px; - position: unset !important; - } + .msg-bottom-p { + padding-top: 20px; + position: unset !important; + } } .pin-4 { - z-index: 1000; - margin-bottom: 36px; + z-index: 1000; + margin-bottom: 107px; +} + + + +@media only screen and (min-height: 168px) { + .circle{ + width: 60px; + height: 60px; + margin-bottom: 7px; + margin-right: 7px; + margin-left: 7px; + } + .terminal{ + margin-top: -33px !important; + } + + .pin-4 { + position: relative; + top: 49px; + } + + .clear { + padding-top: 10px !important; + } + + .div-top-header { + position: unset ; + top: unset ; + } +} + +@media only screen and (min-height: 640px) { + .circle{ + width: 60px; + height: 60px; + margin-bottom: 9px; + margin-right: 9px; + margin-left: 9px; + } + .terminal{ + margin-top: -33px !important; + } + + .pin-4 { + position: relative; + top: 49px; + } + +} + +@media only screen and (min-height: 667px) { + .circle{ + width: 60px; + height: 60px; + margin-bottom: 7px; + margin-right: 7px; + margin-left: 7px; + } + .terminal{ + margin-top: 0px !important; + } + + .clear { + padding-top: 25px !important; + } +} + +@media only screen and (min-height: 731px) { + .circle{ + width: 63px; + height: 63px; + margin-bottom: 10px; + margin-right: 10px; + margin-left: 10px; + } + .terminal{ + margin-top: -33px !important; + } + + .pin-4 { + position: relative; + top: 35px; + } + + .div-top-header { + position: absolute !important; + top: 0px !important; + } + + +} + +@media only screen and (min-height: 832px) { + .circle{ + width: 65px; + height: 65px; + margin-bottom: 15px; + margin-right: 15px; + margin-left: 15px; + } + .terminal{ + margin-top: -33px !important; + } + + .pin-4 { + position: relative; + top: unset !important; + margin-bottom: 107px; + } + + } diff --git a/src/app/pages/inactivity/inactivity.page.ts b/src/app/pages/inactivity/inactivity.page.ts index 74437d4ea..223409792 100644 --- a/src/app/pages/inactivity/inactivity.page.ts +++ b/src/app/pages/inactivity/inactivity.page.ts @@ -32,7 +32,47 @@ export class InactivityPage implements OnInit { public alertController: AlertController ) {} - ngOnInit() {} + loop = false + + ngOnInit() { + + + // window.addEventListener('resize', (event) => { + // if(this.router.url != '/login') return false + + // if(this.loop == false) { + // this.loop = true + // this.runloop() + // } + + // }, true); + + } + + runloop() { + // const containerHeight = 651 + + // let circleHeight = document.querySelector('.circle')['offsetHeight'] + // let circleWidth = document.querySelector('.circle')['offsetWidth'] + // console.log(window.innerHeight, ' < ', containerHeight) + + // console.log(circleHeight) + + // document.querySelectorAll('.circle').forEach(e=>{ + // e['style']['height'] = (circleHeight -1 )+'px' + // e['style']['width'] = (circleWidth -1 )+'px' + // }) + + + // if( window.innerHeight< containerHeight) { + // setTimeout(()=>{ + // this.runloop() + // }, 100) + // } else { + // this.loop = false + // } + + } async presentAlert(message: string) { const alert = await this.alertController.create({ diff --git a/src/app/pages/login/login.page.scss b/src/app/pages/login/login.page.scss index 88f9eae74..103042085 100644 --- a/src/app/pages/login/login.page.scss +++ b/src/app/pages/login/login.page.scss @@ -144,7 +144,7 @@ ion-item{ user-select: none; } -.title{ +.title { padding-top: 32px; } @@ -203,7 +203,7 @@ ion-item{ align-items: center; justify-content: center; - .msg-bottom-p{ + .msg-bottom-p { width: 220px; position: absolute; bottom: 0 !important; @@ -211,7 +211,7 @@ ion-item{ } } -@media only screen and (max-height: 746px){ +@media only screen and (max-height: 746px) { .msg-bottom-p { padding-top: 20px; position: unset !important; diff --git a/src/app/pages/login/login.page.ts b/src/app/pages/login/login.page.ts index ee388ca95..f1a0441f4 100644 --- a/src/app/pages/login/login.page.ts +++ b/src/app/pages/login/login.page.ts @@ -6,7 +6,6 @@ import { ToastService } from 'src/app/services/toast.service'; import { environment } from 'src/environments/environment'; import { AlertController } from '@ionic/angular'; import { NotificationsService } from 'src/app/services/notifications.service'; -import { LocalstoreService } from 'src/app/store/localstore.service'; import { SessionStore } from 'src/app/store/session.service'; @Component({ @@ -32,8 +31,7 @@ export class LoginPage implements OnInit { private router: Router, private authService: AuthService, private toastService: ToastService, - public alertController: AlertController, - private localstoreService: LocalstoreService + public alertController: AlertController ) { } diff --git a/src/app/services/notification/web-notification-popup.service.ts b/src/app/services/notification/web-notification-popup.service.ts index 406761332..48c8e83da 100644 --- a/src/app/services/notification/web-notification-popup.service.ts +++ b/src/app/services/notification/web-notification-popup.service.ts @@ -71,8 +71,6 @@ export class WebNotificationPopupService { }) }); - - } });