mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
fix actions and draft data object
This commit is contained in:
@@ -70,7 +70,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
SessionStore = SessionStore
|
||||
expedienteTaskPipe = new ExpedienteTaskPipe();
|
||||
|
||||
|
||||
|
||||
customTaskPipe = new CustomTaskPipe()
|
||||
|
||||
@@ -86,7 +86,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||
|
||||
|
||||
hideSearchBtn: boolean = false;
|
||||
showSearch = true;
|
||||
searchSubject: string = '';
|
||||
@@ -160,21 +160,21 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
const ordinance = this.ordinance
|
||||
if(this.showSearch && this.searchSubject) {
|
||||
|
||||
|
||||
const AllProcess = this.TaskService.AllProcess.filter((task) => {
|
||||
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
|
||||
subject = subject.toLowerCase();
|
||||
return subject.includes(this.searchSubject.toLowerCase())
|
||||
})
|
||||
|
||||
|
||||
|
||||
if(ordinance == this.ordinance) {
|
||||
this.AllProcess = this.TaskService.reorderList(this.ordinance, AllProcess)
|
||||
.filter( task => this.TaskService.filter(task, this.filterName))
|
||||
}
|
||||
} else {
|
||||
const AllProcess = this.TaskService.AllProcess.filter( task => this.TaskService.filter(task, this.filterName))
|
||||
|
||||
|
||||
if(ordinance == this.ordinance) {
|
||||
this.AllProcess = this.TaskService.reorderList(this.ordinance, AllProcess)
|
||||
.filter( task => this.TaskService.filter(task, this.filterName))
|
||||
@@ -198,7 +198,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
(async () => {
|
||||
await this.loadAllProcesses()
|
||||
this.TaskService.registerCallback({
|
||||
@@ -208,12 +208,12 @@ export class GabineteDigitalPage implements OnInit {
|
||||
}
|
||||
})
|
||||
})();
|
||||
|
||||
|
||||
this.checkFilter();
|
||||
this.checkRoutes();
|
||||
this.dynamicSearch()
|
||||
|
||||
|
||||
|
||||
|
||||
const pathname = '/home/gabinete-digital'
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationEnd && event.url.includes(pathname) && !event.url.includes('/home/gabinete-digital/')) {
|
||||
@@ -230,13 +230,13 @@ export class GabineteDigitalPage implements OnInit {
|
||||
// this.LoadCounts();
|
||||
this.checkFilter()
|
||||
}
|
||||
|
||||
|
||||
this.mobile()
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
@@ -247,11 +247,11 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.scroll.nativeElement.addEventListener("scroll", (e)=> {
|
||||
this.changeTab()
|
||||
});
|
||||
|
||||
|
||||
} catch(error) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
} else {
|
||||
this.refresh = false
|
||||
}
|
||||
|
||||
|
||||
}, 100);
|
||||
}
|
||||
|
||||
@@ -291,14 +291,14 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.dynamicSearch()
|
||||
}
|
||||
// console.log('this.filterName', this.filterName)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
goto(url) {
|
||||
this.router.navigate([url])
|
||||
}
|
||||
|
||||
|
||||
goToProcess(serialNumber: string, workflowName: string, activityName: string) {
|
||||
|
||||
|
||||
@@ -349,7 +349,6 @@ export class GabineteDigitalPage implements OnInit {
|
||||
}
|
||||
|
||||
hideRefreshButton() {
|
||||
console.log(this.router.url)
|
||||
if (window.innerWidth < 701) {
|
||||
this.hideRefreshBtn = false;
|
||||
this.hideInMobile = false;
|
||||
@@ -363,7 +362,6 @@ export class GabineteDigitalPage implements OnInit {
|
||||
}
|
||||
|
||||
mobile() {
|
||||
console.log(this.router.url)
|
||||
if (window.innerWidth < 701 && this.router.url.includes('filter=')) {
|
||||
this.hideRefreshBtn = false;
|
||||
this.hideInMobile = false;
|
||||
@@ -375,7 +373,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
checkRoutes() {
|
||||
this.closeAllDesktopComponents();
|
||||
|
||||
|
||||
// console.log(this.router.url, this.router.url.includes('processes=true'))
|
||||
// alert('hello')s
|
||||
if (this.router.url.includes('processes=true')) {
|
||||
@@ -463,7 +461,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
}
|
||||
|
||||
async loadAllProcesses() {
|
||||
|
||||
|
||||
// this.skeletonLoader = true
|
||||
await this.TaskService.LoadTask()
|
||||
this.dynamicSearch()
|
||||
@@ -472,14 +470,14 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
|
||||
doRefreshAside() {
|
||||
|
||||
|
||||
try {
|
||||
window['gabinete-aside-refresh']()
|
||||
} catch(error) {}
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
this.loadAllProcesses();
|
||||
}, 1000)
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
@@ -494,7 +492,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
event?.target?.complete();
|
||||
} catch(error) {}
|
||||
} catch(error) {}
|
||||
|
||||
|
||||
}, 2000);
|
||||
}
|
||||
else {
|
||||
@@ -671,7 +669,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.segment = segment;
|
||||
|
||||
if (window.innerWidth < 701) {
|
||||
|
||||
|
||||
let navigationExtras: NavigationExtras = { queryParams: { "gerarDiplomas": true }}
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas-gerar'], navigationExtras);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user