mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
save
This commit is contained in:
@@ -14,7 +14,7 @@ import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discar
|
||||
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { DespachoPage } from 'src/app/pages/gabinete-digital/despachos/despacho/despacho.page';
|
||||
import { NavigationExtras, Router } from '@angular/router';
|
||||
import { NavigationEnd, NavigationExtras, Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-despachos',
|
||||
@@ -51,14 +51,25 @@ export class DespachosPage implements OnInit {
|
||||
private alertService: AlertService,
|
||||
private authService: AuthService,
|
||||
private router: Router,
|
||||
) {
|
||||
) {
|
||||
this.profile = 'mdgpr';
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
//Inicializar segment
|
||||
this.segment = "despachos";
|
||||
this.LoadList();
|
||||
const pathname = window.location.pathname;
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||
this.refreshing();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async refreshing() {
|
||||
setTimeout(() => {
|
||||
this.LoadList();
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
@@ -71,13 +82,13 @@ export class DespachosPage implements OnInit {
|
||||
}
|
||||
|
||||
async LoadList() {
|
||||
|
||||
|
||||
let result = await this.processes.GetTasksList("Despacho", false).toPromise();
|
||||
//let despachos = result.reverse().filter(data => data.activityInstanceName == "Despacho (Paralelo)");
|
||||
this.despachoList = new Array();
|
||||
|
||||
await result.forEach( (element, index) => {
|
||||
|
||||
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
||||
@@ -99,7 +110,7 @@ export class DespachosPage implements OnInit {
|
||||
this.despachoList = this.sortArrayISODate(this.despachoList).reverse()
|
||||
|
||||
this.despachoList.forEach( (element, index) => {
|
||||
|
||||
|
||||
// let aplicationId = element.workflowInstanceDataFields.SourceSecFsID;
|
||||
let FolderID = element['FolderID'];
|
||||
|
||||
@@ -139,5 +150,5 @@ export class DespachosPage implements OnInit {
|
||||
goToList() {
|
||||
this.router.navigate(['/home/gabinete-digital/despachos']);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user