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']);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { NavigationExtras, Router } from '@angular/router';
|
||||
import { NavigationEnd, NavigationExtras, Router } from '@angular/router';
|
||||
import { DailyWorkTask, tasksList } from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { formatDate } from '@angular/common';
|
||||
@@ -18,10 +18,10 @@ export class DiplomasAssinarPage implements OnInit {
|
||||
showLoader: boolean;
|
||||
totalDocs:any;
|
||||
serialNumber:string;
|
||||
|
||||
|
||||
@Input() profile:string;
|
||||
@Input() segment:string;
|
||||
|
||||
|
||||
constructor(
|
||||
private processes:ProcessesService,
|
||||
private modalController: ModalController,
|
||||
@@ -29,11 +29,16 @@ export class DiplomasAssinarPage implements OnInit {
|
||||
private router: Router,
|
||||
) {
|
||||
}
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
this.LoadList();
|
||||
const pathname = window.location.pathname;
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||
this.refreshing();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
goToDiploma(serialNumber:any){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
@@ -42,16 +47,22 @@ export class DiplomasAssinarPage implements OnInit {
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas-assinar/diploma-assinar'], navigationExtras);
|
||||
}
|
||||
|
||||
|
||||
async refreshing() {
|
||||
setTimeout(() => {
|
||||
this.LoadList();
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
this.LoadList();
|
||||
setTimeout(() => {
|
||||
event.target.complete();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
|
||||
async LoadList(){
|
||||
|
||||
|
||||
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||
this.diplomasList = new Array();
|
||||
let diplomasAssinar = diplomas.reverse().filter(data => data.activityInstanceName == "Assinar Diploma");
|
||||
@@ -94,7 +105,7 @@ export class DiplomasAssinarPage implements OnInit {
|
||||
});
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
|
||||
goBack() {
|
||||
this.router.navigate(['/home/gabinete-digital']);
|
||||
// window.history.back()
|
||||
|
||||
@@ -33,19 +33,16 @@ export class ExpedientePage implements OnInit {
|
||||
private processes:ProcessesService,
|
||||
private modalController: ModalController,
|
||||
private alertService: AlertService,
|
||||
private router: Router,
|
||||
) {
|
||||
private router: Router,
|
||||
) {
|
||||
this.profile = 'mdgpr';
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.LoadList();
|
||||
|
||||
const pathname = window.location.pathname
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||
this.LoadList();
|
||||
this.refreshing();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -83,6 +80,12 @@ export class ExpedientePage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
async refreshing() {
|
||||
setTimeout(() => {
|
||||
this.LoadList();
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
this.LoadList();
|
||||
setTimeout(() => {
|
||||
@@ -99,4 +102,3 @@ export class ExpedientePage implements OnInit {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -33,16 +33,15 @@ export class ExpedientesPrPage implements OnInit {
|
||||
private modalController: ModalController,
|
||||
private alertService: AlertService,
|
||||
private authService: AuthService,
|
||||
private router: Router,
|
||||
) {
|
||||
private router: Router,
|
||||
) {
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
const pathname = window.location.pathname
|
||||
|
||||
const pathname = window.location.pathname;
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||
this.refreshing();
|
||||
@@ -78,7 +77,7 @@ export class ExpedientesPrPage implements OnInit {
|
||||
console.log(this.taskslist);
|
||||
this.showLoader = false;
|
||||
});
|
||||
|
||||
|
||||
break;
|
||||
case 'PR':
|
||||
this.processes.GetTasksList("Expediente do Presidente", false).subscribe(result => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { ActivatedRoute, NavigationEnd, NavigationExtras, Router } from '@angular/router';
|
||||
import { CalendarComponent } from 'ionic2-calendar';
|
||||
|
||||
import { DailyWorkTask, tasksList } from '../../../models/dailyworktask.model';
|
||||
@@ -24,7 +24,7 @@ export class PedidosPage implements OnInit {
|
||||
taskslist:DailyWorkTask[];
|
||||
parecerList:any[];
|
||||
fulltask:any;
|
||||
|
||||
|
||||
parecerListResult:tasksList[] = [];
|
||||
deferimentoListResult:tasksList[] = [];
|
||||
|
||||
@@ -36,29 +36,30 @@ export class PedidosPage implements OnInit {
|
||||
@Output() openExpedientDetail:EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
private router: Router,
|
||||
private processes:ProcessesService,
|
||||
private modalController: ModalController,
|
||||
private alertService: AlertService,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
//Inicializar segment
|
||||
) {
|
||||
//Inicializar segment
|
||||
this.segment = 'parecer';
|
||||
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params['deferimento'] == 'true') {
|
||||
this.segment = 'deferimento';
|
||||
} else if (params['parecer'] == 'true') {
|
||||
this.segment = 'parecer';
|
||||
}
|
||||
|
||||
this.LoadList();
|
||||
});
|
||||
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
const pathname = window.location.pathname;
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||
this.refreshing();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
goBack() {
|
||||
@@ -123,15 +124,15 @@ export class PedidosPage implements OnInit {
|
||||
}
|
||||
this.parecerList.push(task);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
else if(this.segment == 'deferimento') {
|
||||
this.taskType = "Pedido de Deferimento";
|
||||
this.processes.GetTasksList("Pedido de Deferimento", false).subscribe(result => {
|
||||
this.taskslist = result;
|
||||
|
||||
|
||||
console.log(result);
|
||||
|
||||
|
||||
this.deferimentoList = new Array();
|
||||
let res = result.reverse();
|
||||
res.forEach(element => {
|
||||
@@ -153,11 +154,17 @@ export class PedidosPage implements OnInit {
|
||||
}
|
||||
this.deferimentoList.push(task);
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
refreshing() {
|
||||
setTimeout(() => {
|
||||
this.LoadList();
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
this.LoadList();
|
||||
setTimeout(() => {
|
||||
@@ -167,4 +174,3 @@ export class PedidosPage implements OnInit {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ export class PendentesPage implements OnInit {
|
||||
private alertService: AlertService,
|
||||
private router: Router,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
) {
|
||||
){
|
||||
this.pendentesList = new Array();
|
||||
this.profile = 'mdgpr';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user