mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
improve links
This commit is contained in:
@@ -35,7 +35,7 @@ export class AllProcessesPage implements OnInit {
|
||||
deplomasStore = DeplomasStore
|
||||
|
||||
AllProcess = []
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'Todos' = 'Todos'
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
@@ -53,16 +53,39 @@ export class AllProcessesPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
this.updateAllProcess()
|
||||
this.checkFilter();
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationStart && event.url.startsWith('/home/gabinete-digital')) {
|
||||
if (window.location.pathname.startsWith('/home/gabinete-digital')) {
|
||||
this.refreshing();
|
||||
this.checkFilter();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
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') {
|
||||
this.filterName = 'Para hoje'
|
||||
} else if (filter == 'OverdueTasks') {
|
||||
this.filterName = 'OverdueTasks'
|
||||
} else if (filter == 'New') {
|
||||
this.filterName = 'Novos'
|
||||
} else if (filter == 'unread') {
|
||||
this.filterName = 'Não lidos'
|
||||
} else {
|
||||
console.log('filter', filter)
|
||||
}
|
||||
|
||||
}
|
||||
doRefresh(event) {
|
||||
if (event) {
|
||||
setTimeout(() => {
|
||||
|
||||
Reference in New Issue
Block a user