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, Input, OnInit } from '@angular/core';
import { NavigationEnd, Router } from '@angular/router';
import { NavigationEnd, NavigationStart, Router } from '@angular/router';
import { DailyWorkTask } from '../../../models/dailyworktask.model';
import { ProcessesService } from 'src/app/services/processes.service';
import { ModalController } from '@ionic/angular';
@@ -32,10 +32,16 @@ export class ExpedientePage implements OnInit {
const location = window.location
const pathname = location.pathname + location.search
this.LoadList();
this.router.events.forEach((event) => {
if (event instanceof NavigationEnd && event.url.startsWith(pathname)) {
this.LoadList();
if (event instanceof NavigationStart && event.url.startsWith(pathname)) {
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.refreshing()
} else {
this.LoadList()
}
}
});
@@ -74,14 +80,14 @@ export class ExpedientePage implements OnInit {
async refreshing() {
setTimeout(() => {
this.LoadList();
}, 1500);
}, 1000);
}
doRefresh(event) {
this.LoadList();
setTimeout(() => {
event.target.complete();
}, 2000);
}, 1000);
}
goBack() {