This commit is contained in:
tiago.kayaya
2021-06-28 15:45:49 +01:00
parent 5a1d746fd1
commit 86c2a2c3ce
5 changed files with 7 additions and 22 deletions
@@ -57,7 +57,7 @@ export class DiplomaPage implements OnInit {
} }
goBack() { goBack() {
if (window.innerWidth <= 800) { if (window.innerWidth < 801) {
this.router.navigate(['/home/gabinete-digital/diplomas']); this.router.navigate(['/home/gabinete-digital/diplomas']);
} else { } else {
let navigationExtras: NavigationExtras = { let navigationExtras: NavigationExtras = {
@@ -83,8 +83,6 @@ constructor(
} }
async LoadList(){ async LoadList(){
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise(); let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
console.log('diplomas', diplomas); console.log('diplomas', diplomas);
@@ -481,14 +481,12 @@ export class GabineteDigitalPage implements OnInit {
} }
openDiplomasPage(segment:string) { openDiplomasPage(segment:string) {
this.closeAllDesktopComponents();
if( window.innerWidth <= 801){ if( window.innerWidth <= 801){
let navigationExtras: NavigationExtras = { queryParams: {"segment": segment}}; let navigationExtras: NavigationExtras = { queryParams: {"segment": segment}};
this.router.navigate(['/home/gabinete-digital/diplomas'], navigationExtras); this.router.navigate(['/home/gabinete-digital/diplomas'], navigationExtras);
} }
else{ else{
this.closeAllDesktopComponents();
this.segment = segment; this.segment = segment;
let navigationExtras: NavigationExtras = { queryParams: {"diplomas": true,}}; let navigationExtras: NavigationExtras = { queryParams: {"diplomas": true,}};
this.router.navigate(['/home/gabinete-digital'], navigationExtras); this.router.navigate(['/home/gabinete-digital'], navigationExtras);
@@ -19,15 +19,6 @@
</ion-toolbar> </ion-toolbar>
</ion-header> </ion-header>
<ion-content> <ion-content>
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh()">
<ion-refresher-content
pullingIcon="chevron-down-circle-outline"
pullingText="deslize para actualizar"
refreshingSpinner="circles"
refreshingText="A actualizar...">
</ion-refresher-content>
</ion-refresher>
<div class="width-100 overflow-y-auto height-100" [ngSwitch]="segment"> <div class="width-100 overflow-y-auto height-100" [ngSwitch]="segment">
<div *ngIf="diplomasList"> <div *ngIf="diplomasList">
<ion-list *ngSwitchCase="'validar'"> <ion-list *ngSwitchCase="'validar'">
@@ -31,10 +31,9 @@ constructor(
} }
ngOnInit() { ngOnInit() {
this.LoadList();
this.router.events.forEach((event) => { this.router.events.forEach((event) => {
if(event instanceof NavigationEnd && event.url == this.router.url) { if(event instanceof NavigationEnd && event.url == this.router.url) {
this.doRefresh(); this.LoadList();
} }
}); });
} }
@@ -57,9 +56,12 @@ constructor(
} }
async LoadList(){ async LoadList(){
this.diplomasList = new Array();
console.log('OOOKAY');
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise(); let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
this.diplomasList = new Array();
console.log(diplomas); console.log(diplomas);
switch (this.segment) { switch (this.segment) {
@@ -168,16 +170,12 @@ constructor(
}); });
}); });
this.showLoader = false; this.showLoader = false;
break; break;
} }
} }
doRefresh() { doRefresh() {
this.LoadList(); this.LoadList();
setTimeout(() => {
//event.target.complete();
}, 2000);
} }
} }