fix loader

This commit is contained in:
Peter Maquiran
2023-06-09 12:02:11 +01:00
parent 91588ebb24
commit 7f3cfdc55e
10 changed files with 58 additions and 41 deletions
@@ -33,11 +33,7 @@ export class DespachosPage implements OnInit {
this.router.events.forEach((event) => {
if (event instanceof NavigationStart && event.url.startsWith('/home/gabinete-digital?despachos=true')) {
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.LoadList()
} else {
this.LoadList()
}
this.LoadList()
}
});
@@ -43,11 +43,7 @@ export class DiplomasAssinarPage implements OnInit {
this.router.events.forEach((event) => {
if (event instanceof NavigationStart && '/home/gabinete-digital?diplomasassinar=true'.startsWith(event.url)) {
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.LoadList()
} else {
this.LoadList()
}
this.LoadList()
}
});
@@ -118,6 +114,7 @@ export class DiplomasAssinarPage implements OnInit {
this.skeletonLoader = true
await this.TaskService.loadDiplomas()
this.dynamicSearch()
this.skeletonLoader = false
}
@@ -77,7 +77,8 @@ export class DiplomasGerarPage implements OnInit {
this.skeletonLoader = true
this.TaskService.loadDiplomas()
await this.TaskService.loadDiplomas()
this.dynamicSearch()
this.skeletonLoader = false;
}
@@ -54,7 +54,9 @@ export class ExpedientesPrPage implements OnInit {
if (event instanceof NavigationStart &&
event.url.startsWith('/home/gabinete-digital?expedientespr=true') ||
event instanceof NavigationStart &&
event.url.startsWith('/home/gabinete-digital?expedientes-pr=true')) {
event.url.startsWith('/home/gabinete-digital?expedientes-pr=true' ) ||
event instanceof NavigationStart &&
event.url.startsWith('/home/gabinete-digital?expedientes=true' )) {
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.refreshing()
@@ -58,11 +58,7 @@ export class ExpedientsPage implements OnInit {
this.router.events.forEach((event) => {
if (event instanceof NavigationStart &&
event.url.startsWith('/home/gabinete-digital?expedientes=true')) {
if (window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.LoadList()
} else {
this.LoadList()
}
this.LoadList()
}
});
@@ -139,7 +139,7 @@ export class PedidosPage implements OnInit {
async LoadList() {
this.skeletonLoader = true;
if(this.segment == 'parecer') {
this.taskType = "Pedido de Parecer";
@@ -147,6 +147,8 @@ export class PedidosPage implements OnInit {
let parecer = [];
let parecerPr = [];
this.skeletonLoader = true;
try {
parecer = await this.processes.GetTasksList("Pedido de Parecer", false).toPromise();
parecerPr = await this.processes.GetTasksList("Pedido de Parecer do Presidente", false).toPromise();
@@ -174,6 +176,7 @@ export class PedidosPage implements OnInit {
}
else if(this.segment == 'deferimento') {
this.taskType = "Pedido de Deferimento";
this.skeletonLoader = true;
this.processes.GetTasksList("Pedido de Deferimento", false).subscribe(result => {
this.skeletonLoader = false
@@ -194,7 +197,7 @@ export class PedidosPage implements OnInit {
this.skeletonLoader = false
});
}
this.skeletonLoader = false
}
doRefresh(event) {