This commit is contained in:
Peter Maquiran
2021-07-17 14:02:05 +01:00
parent 133e3ad122
commit b1c165bf87
23 changed files with 240 additions and 142 deletions
@@ -1,5 +1,5 @@
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
import { NavigationEnd, NavigationExtras, Router } from '@angular/router';
import { NavigationEnd, NavigationExtras, NavigationStart, Router } from '@angular/router';
import { CalendarComponent } from 'ionic2-calendar';
import { DailyWorkTask } from '../../../models/dailyworktask.model';
@@ -39,13 +39,19 @@ export class ExpedientesPrPage implements OnInit {
ngOnInit() {
this.LoadList();
this.router.events.forEach((event) => {
if (event instanceof NavigationEnd &&
if (event instanceof NavigationStart &&
event.url.startsWith('/home/gabinete-digital?expedientespr=true') ||
event instanceof NavigationEnd &&
event instanceof NavigationStart &&
event.url.startsWith('/home/gabinete-digital?expedientes-pr=true')) {
this.LoadList();
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.refreshing()
} else {
this.LoadList()
}
}
});
@@ -122,7 +128,7 @@ export class ExpedientesPrPage implements OnInit {
refreshing() {
setTimeout(() => {
this.LoadList();
}, 1500);
}, 1000);
}
doRefresh(event) {