fix filter change

This commit is contained in:
Peter Maquiran
2023-04-17 17:23:26 +01:00
parent bd13431c6a
commit b4bc286557
5 changed files with 29 additions and 39 deletions
@@ -281,22 +281,15 @@ export class GabineteDigitalPage implements OnInit {
checkFilter() {
const params: any = new Proxy(new URLSearchParams(window.location.search), {
get: (searchParams: any, prop: any) => searchParams.get(prop),
});
const filter = params.filter
if(filter == 'ForToDay') {
if(this.router.url.includes('ForToDay')) {
this.filterName = 'Para hoje'
} else if (filter == 'OverdueTasks') {
} else if (this.router.url.includes('OverdueTasks')) {
this.filterName = 'OverdueTasks'
} else if (filter == 'New') {
} else if (this.router.url.includes('New')) {
this.filterName = 'Novos'
} else if (filter == 'unread') {
} else if (this.router.url.includes('unread')) {
this.filterName = 'Não lidos'
} else {
console.log('filter', filter)
}
}
@@ -443,7 +436,7 @@ export class GabineteDigitalPage implements OnInit {
checkRoutes() {
this.closeAllDesktopComponents();
if (this.router.url == '/home/gabinete-digital?processes=true') {
if (this.router.url == 'processes=true') {
this.openAllProcessesPage();
this.selectedElement = 'allProcessesTag';
}