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:
@@ -14,7 +14,7 @@ import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discar
|
||||
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { DespachoPage } from 'src/app/pages/gabinete-digital/despachos/despacho/despacho.page';
|
||||
import { ActivatedRoute, NavigationEnd, NavigationExtras, Router } from '@angular/router';
|
||||
import { ActivatedRoute, NavigationEnd, NavigationExtras, NavigationStart, Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-despachos',
|
||||
@@ -67,11 +67,16 @@ export class DespachosPage implements OnInit {
|
||||
ngOnInit() {
|
||||
//Inicializar segment
|
||||
this.segment = "despachos";
|
||||
this.LoadList();
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationEnd &&
|
||||
if (event instanceof NavigationStart &&
|
||||
event.url.startsWith('/home/gabinete-digital?despachos=true')) {
|
||||
this.LoadList();
|
||||
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
|
||||
this.doRefresh()
|
||||
} else {
|
||||
this.LoadList()
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -138,11 +143,11 @@ export class DespachosPage implements OnInit {
|
||||
}
|
||||
|
||||
doRefresh() {
|
||||
this.LoadList();
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
//event.target.complete();
|
||||
}, 2000);
|
||||
this.LoadList();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
// old
|
||||
|
||||
Reference in New Issue
Block a user