mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +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 { NavigationEnd, NavigationExtras, Router } from '@angular/router';
|
||||
import { NavigationEnd, NavigationExtras, NavigationStart, Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-despachos',
|
||||
@@ -62,10 +62,15 @@ export class DespachosPage 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,7 +79,7 @@ export class DespachosPage implements OnInit {
|
||||
async refreshing() {
|
||||
setTimeout(() => {
|
||||
this.LoadList();
|
||||
}, 1500);
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
|
||||
Reference in New Issue
Block a user