mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
add go back
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user