add go back

This commit is contained in:
Peter Maquiran
2023-06-11 15:59:05 +01:00
parent acb79bb62e
commit e6fc2f19f2
2 changed files with 27 additions and 27 deletions
@@ -1,12 +1,9 @@
import { Component, OnInit} from '@angular/core';
import { customTask} from '../../../models/dailyworktask.model';
import { ProcessesService } from 'src/app/services/processes.service';
import { AuthService } from 'src/app/services/auth.service';
import { LoginUserRespose } from 'src/app/models/user.model';
import { NavigationStart, Router } from '@angular/router';
import { DespachosprStore } from 'src/app/store/despachospr-store.service';
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
import { SortService } from 'src/app/services/functions/sort.service';
import { SessionStore } from 'src/app/store/session.service';
import { environment } from 'src/environments/environment';
import { TaskService } from 'src/app/services/task.service'
@@ -33,12 +30,13 @@ export class DespachosPrPage implements OnInit {
list = []
hideSearchBtn: boolean = false;
ordinance: string = 'old'
listSubscription : {
delete(): void;
}
constructor (
private processes:ProcessesService,
private authService: AuthService,
private router: Router,
private sortService: SortService,
public TaskService: TaskService,
public ThemeService: ThemeService,
@@ -48,21 +46,23 @@ constructor (
ngOnInit() {
// this.LoadList()
this.router.events.forEach((event) => {
if (event instanceof NavigationStart &&
event.url.startsWith('/home/gabinete-digital?despachospr=true')) {
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.refreshing()
} else {
this.LoadList()
}
}
});
this.LoadList()
this.dynamicSearch();
this.listSubscription = this.despachosprstore.registerCallback({
id: import.meta.url,
funx:() => {
this.dynamicSearch()
this.LoadList()
}
})
}
ngOnDestroy() {
this.listSubscription.delete()
}
changeFilterName(filterName) {