mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
add go back
This commit is contained in:
@@ -1,12 +1,9 @@
|
|||||||
import { Component, OnInit} from '@angular/core';
|
import { Component, OnInit} from '@angular/core';
|
||||||
import { customTask} from '../../../models/dailyworktask.model';
|
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 { LoginUserRespose } from 'src/app/models/user.model';
|
||||||
import { NavigationStart, Router } from '@angular/router';
|
import { NavigationStart, Router } from '@angular/router';
|
||||||
import { DespachosprStore } from 'src/app/store/despachospr-store.service';
|
import { DespachosprStore } from 'src/app/store/despachospr-store.service';
|
||||||
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
|
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 { SessionStore } from 'src/app/store/session.service';
|
||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
import { TaskService } from 'src/app/services/task.service'
|
import { TaskService } from 'src/app/services/task.service'
|
||||||
@@ -33,12 +30,13 @@ export class DespachosPrPage implements OnInit {
|
|||||||
list = []
|
list = []
|
||||||
hideSearchBtn: boolean = false;
|
hideSearchBtn: boolean = false;
|
||||||
ordinance: string = 'old'
|
ordinance: string = 'old'
|
||||||
|
listSubscription : {
|
||||||
|
delete(): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
private processes:ProcessesService,
|
|
||||||
private authService: AuthService,
|
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private sortService: SortService,
|
|
||||||
public TaskService: TaskService,
|
public TaskService: TaskService,
|
||||||
public ThemeService: ThemeService,
|
public ThemeService: ThemeService,
|
||||||
|
|
||||||
@@ -48,21 +46,23 @@ constructor (
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
// this.LoadList()
|
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.dynamicSearch();
|
this.dynamicSearch();
|
||||||
|
|
||||||
|
this.listSubscription = this.despachosprstore.registerCallback({
|
||||||
|
id: import.meta.url,
|
||||||
|
funx:() => {
|
||||||
|
|
||||||
|
this.dynamicSearch()
|
||||||
|
this.LoadList()
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnDestroy() {
|
||||||
|
this.listSubscription.delete()
|
||||||
}
|
}
|
||||||
|
|
||||||
changeFilterName(filterName) {
|
changeFilterName(filterName) {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user