fix loader

This commit is contained in:
Peter Maquiran
2023-02-02 10:37:17 +01:00
parent ac23c085fb
commit 0036ce6ab2
29 changed files with 125 additions and 61 deletions
+1 -1
View File
@@ -20,7 +20,7 @@
<!-- <ion-content class="main " ng-controller="AppController"> -->
<ion-content ng-controller="AppController">
<ion-refresher slot="fixed" (ionRefresh)="doRefresh()">
<ion-refresher slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-refresher-content>
</ion-refresher-content>
</ion-refresher>
+8 -2
View File
@@ -126,13 +126,19 @@ export class EventsPage implements OnInit {
}
}
doRefresh() {
doRefresh(event) {
if (event) {
setTimeout(() => {
event.target.complete();
}, 2000);
}
this.RefreshEvents();
this.LoadList();
}
onSegmentChange() {
this.doRefresh();
this.RefreshEvents();
this.LoadList();
}
@@ -10,7 +10,7 @@
<ion-label *ngIf="loggeduser.Profile =='PR'" >Despachos</ion-label>
</div>
<div class="theicon btn-refresh">
<button class="btn-no-color" (click)="doRefresh()">
<button class="btn-no-color" (click)="doRefresh($event)">
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
</div>
@@ -20,7 +20,7 @@
</div> -->
</ion-header>
<ion-content>
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh()">
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-refresher-content
pullingIcon="chevron-down-circle-outline"
pullingText="deslize para actualizar"
@@ -84,7 +84,7 @@ export class DespachosPrPage implements OnInit {
this.router.events.forEach((event) => {
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
if (window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.doRefresh()
this.LoadList()
} else {
this.LoadList()
}
@@ -223,8 +223,12 @@ export class DespachosPrPage implements OnInit {
})
}
doRefresh() {
doRefresh(event) {
if (event) {
setTimeout(() => {
event.target.complete();
}, 2000);
}
setTimeout(() => {
this.LoadList();
}, 1000)
@@ -162,7 +162,8 @@ export class PedidoPage implements OnInit {
let thedate = new Date(res.taskStartDate);
this.customDate = this.days[thedate.getDay()] + ", " + thedate.getDate() + " de " + (this.months[thedate.getMonth()]);
this.processes.GetTaskParticipants(res.workflowInstanceDataFields.FolderID).subscribe(users => {
this.processes.GetTaskParticipants(res.workflowInstanceDataFields.FolderID).subscribe((users = []) => {
this.updateProcessInterveners(users)
this.intervenientes = users.filter(user => {
return user.Type == 'I';