Fix login layout

This commit is contained in:
Peter Maquiran
2021-09-02 10:12:18 +01:00
parent 36fa6b1d2a
commit 3614a2eba7
10 changed files with 301 additions and 145 deletions
+15
View File
@@ -6,6 +6,7 @@ import { CustomTaskPipe } from '../pipes/custom-task.pipe';
import { ProcessesService } from '../services/processes.service'; import { ProcessesService } from '../services/processes.service';
import { DespachoStore } from '../store/despacho-store.service'; import { DespachoStore } from '../store/despacho-store.service';
import { LoaderService } from 'src/app/store/loader.service' import { LoaderService } from 'src/app/store/loader.service'
import { SessionStore } from '../store/session.service';
@Injectable({ @Injectable({
providedIn: 'root' 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) { sortArrayISODate(myArray: any) {
return myArray.sort(function(a, b) { return myArray.sort(function(a, b) {
return (a.CreateDate < b.CreateDate) ? -1 : ((a.CreateDate > b.CreateDate) ? 1 : 0); return (a.CreateDate < b.CreateDate) ? -1 : ((a.CreateDate > b.CreateDate) ? 1 : 0);
+2 -2
View File
@@ -103,7 +103,8 @@ export class HomePage implements OnInit {
ngOnInit() { ngOnInit() {
/* this.network.checkNetworkConnection; /* this.network.checkNetworkConnection;
this.network.checkNetworkDisconnection; */ 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')) { if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
this.webnotification.webconnection(); this.webnotification.webconnection();
this.webnotification.onReceviNotificationWeb(); this.webnotification.onReceviNotificationWeb();
@@ -165,7 +166,6 @@ export class HomePage implements OnInit {
'despachos', 'despachos',
() => { () => {
this.despachoRule.getList({updateStore: true}) this.despachoRule.getList({updateStore: true})
} }
) )
-3
View File
@@ -358,9 +358,6 @@ export class AgendaPage implements OnInit {
get CalendarCurrentDay ():any { get CalendarCurrentDay ():any {
/* console.log(this.viewDate.getDate(), '0_0') */
// console.log(this.viewDate.getDate(), '0_0')
return this.viewDate.getDate() return this.viewDate.getDate()
} }
+1 -1
View File
@@ -95,7 +95,7 @@ export class EventsPage implements OnInit {
this.platform.resize.subscribe(async () => { this.platform.resize.subscribe(async () => {
//console.log('Resize event detected'); //console.log('Resize event detected');
console.log('Resize event detected'); // console.log('Resize event detected');
}); });
@@ -33,7 +33,7 @@
</div> </div>
</div> </div>
<div class="main-content d-flex flex-column height-100 width" *ngIf="!SessionStore.hasPin || SessionStore.hasPin && SessionStore.user.LoginPreference == 'Pin' && !enterWithPassword " > <div class="main-content d-flex flex-column width" *ngIf="!SessionStore.hasPin || SessionStore.hasPin && SessionStore.user.LoginPreference == 'Pin' && !enterWithPassword " >
<div class="div-top-header"> <div class="div-top-header">
+119 -11
View File
@@ -15,7 +15,9 @@ ion-content{
height: 100vh; height: 100vh;
overflow: auto; overflow: auto;
background: white !important; background: white !important;
display: flex;
align-items: center;
justify-content: center;
} }
.wrapper{ .wrapper{
@@ -158,19 +160,15 @@ ion-item{
} }
.terminal { .terminal {
padding-top: 49px;
justify-content: center; justify-content: center;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center;
background-image: url(/assets/background/auth.svg); background-image: url(/assets/background/auth.svg);
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
width: 100%; width: 100%;
padding-bottom: 48px;
margin-bottom: -58px;
z-index: 100; z-index: 100;
margin-top: -80px; background-size: 610px;
} }
.clear{ .clear{
@@ -197,17 +195,16 @@ ion-item{
.main-content { .main-content {
width: 100vw; width: 100vw;
height: 100vh; /* background-color: white; */
background-color: white;
text-align: center; text-align: center;
align-items: center; align-items: center;
justify-content: center; /* justify-content: center; */
background-size: 686px 674px; background-size: 686px 674px;
background-position: center; background-position: center;
background-position-y: 110px; background-position-y: 110px;
background-repeat: no-repeat; background-repeat: no-repeat;
margin: auto; margin: auto;
justify-content: space-around; /* justify-content: space-around; */
} }
.voltar{ .voltar{
@@ -238,5 +235,116 @@ ion-item{
.pin-4 { .pin-4 {
z-index: 1000; z-index: 1000;
margin-bottom: 36px; 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;
}
} }
+41 -1
View File
@@ -32,7 +32,47 @@ export class InactivityPage implements OnInit {
public alertController: AlertController 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) { async presentAlert(message: string) {
const alert = await this.alertController.create({ const alert = await this.alertController.create({
+3 -3
View File
@@ -144,7 +144,7 @@ ion-item{
user-select: none; user-select: none;
} }
.title{ .title {
padding-top: 32px; padding-top: 32px;
} }
@@ -203,7 +203,7 @@ ion-item{
align-items: center; align-items: center;
justify-content: center; justify-content: center;
.msg-bottom-p{ .msg-bottom-p {
width: 220px; width: 220px;
position: absolute; position: absolute;
bottom: 0 !important; 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 { .msg-bottom-p {
padding-top: 20px; padding-top: 20px;
position: unset !important; position: unset !important;
+1 -3
View File
@@ -6,7 +6,6 @@ import { ToastService } from 'src/app/services/toast.service';
import { environment } from 'src/environments/environment'; import { environment } from 'src/environments/environment';
import { AlertController } from '@ionic/angular'; import { AlertController } from '@ionic/angular';
import { NotificationsService } from 'src/app/services/notifications.service'; import { NotificationsService } from 'src/app/services/notifications.service';
import { LocalstoreService } from 'src/app/store/localstore.service';
import { SessionStore } from 'src/app/store/session.service'; import { SessionStore } from 'src/app/store/session.service';
@Component({ @Component({
@@ -32,8 +31,7 @@ export class LoginPage implements OnInit {
private router: Router, private router: Router,
private authService: AuthService, private authService: AuthService,
private toastService: ToastService, private toastService: ToastService,
public alertController: AlertController, public alertController: AlertController
private localstoreService: LocalstoreService
) { ) {
} }
@@ -72,8 +72,6 @@ export class WebNotificationPopupService {
}); });
} }
}); });