mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
Fix
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<app-header></app-header>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh()">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
|
||||
@@ -4,7 +4,7 @@ import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { ApproveEventModalPage } from './approve-event-modal/approve-event-modal.page';
|
||||
import { NavigationEnd, Router } from '@angular/router';
|
||||
import { NavigationEnd, NavigationStart, Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-event-list',
|
||||
@@ -36,14 +36,17 @@ export class EventListPage implements OnInit {
|
||||
ngOnInit() {
|
||||
this.segment = 'MDGPR';
|
||||
|
||||
this.refreshing();
|
||||
|
||||
const location = window.location
|
||||
const pathname = location.pathname + location.search
|
||||
|
||||
this.LoadToApproveEvents();
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationEnd && event.url.startsWith(pathname)) {
|
||||
this.LoadToApproveEvents();
|
||||
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
|
||||
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
|
||||
this.doRefresh()
|
||||
} else {
|
||||
this.LoadToApproveEvents()
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -114,15 +117,16 @@ export class EventListPage implements OnInit {
|
||||
refreshing() {
|
||||
setTimeout(() => {
|
||||
this.LoadToApproveEvents();
|
||||
}, 1500);
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
this.LoadToApproveEvents();
|
||||
doRefresh() {
|
||||
|
||||
setTimeout(() => {
|
||||
event.target.complete();
|
||||
}, 2000);
|
||||
this.LoadToApproveEvents();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
close(){
|
||||
this.modalController.dismiss(null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user