mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
performance
This commit is contained in:
@@ -48,6 +48,13 @@ export class PedidosPage implements OnInit {
|
||||
hideSearchBtn: boolean = false;
|
||||
ordinance: string = 'old'
|
||||
|
||||
listSubscription : {
|
||||
delete(): void;
|
||||
}
|
||||
|
||||
|
||||
routerSubscription;
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
private processes:ProcessesService,
|
||||
@@ -61,7 +68,18 @@ export class PedidosPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
this.LoadList()
|
||||
|
||||
this.listSubscription = this.pedidosstore.registerCallback({
|
||||
id: import.meta.url,
|
||||
funx:() => {
|
||||
|
||||
this.dynamicSearch()
|
||||
}
|
||||
})
|
||||
this.dynamicSearch();
|
||||
|
||||
this.routerSubscription = this.router.events.subscribe((event) => {
|
||||
if(event instanceof NavigationStart && '/home/gabinete-digital?parecer=true'.startsWith(event.url) ||
|
||||
event instanceof NavigationStart && '/home/gabinete-digital?deferimento=true'.startsWith(event.url) ||
|
||||
event instanceof NavigationStart && '/home/gabinete-digital?pedidos=true'.startsWith(event.url)
|
||||
@@ -76,11 +94,16 @@ export class PedidosPage implements OnInit {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
this.dynamicSearch()
|
||||
window['gabinete-aside-refresh'] = () => {
|
||||
this.LoadList()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.listSubscription.delete()
|
||||
this.routerSubscription?.unsubscribe();
|
||||
}
|
||||
|
||||
reorderList(orderBy: string) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user