This commit is contained in:
Peter Maquiran
2021-07-17 19:12:13 +01:00
parent 6664dfed73
commit 841a0967a9
3 changed files with 9 additions and 5 deletions
@@ -1,5 +1,5 @@
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
import { NavigationEnd, Router } from '@angular/router';
import { NavigationEnd, NavigationStart, Router } from '@angular/router';
import { CalendarComponent } from 'ionic2-calendar';
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
import { DailyWorkTask } from '../../../models/dailyworktask.model';
@@ -44,14 +44,17 @@ export class PendentesPage implements OnInit {
this.LoadList();
this.router.events.forEach((event) => {
if (event instanceof NavigationEnd &&
if (event instanceof NavigationStart &&
event.url.startsWith('/home/gabinete-digital?pendentes=true')) {
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.doRefresh()
} else {
this.LoadList()
}
}
});
}