This commit is contained in:
tiago.kayaya
2021-07-05 13:49:16 +01:00
parent 25c325a8ad
commit 11c74ed7fc
6 changed files with 2 additions and 90 deletions
@@ -137,7 +137,6 @@ export class PedidoPage implements OnInit {
"activityInstanceName": res.activityInstanceName,
"Status": res.workflowInstanceDataFields.Status,
}
console.log(this.task);
}
let thedate = new Date(res.taskStartDate);
@@ -150,7 +149,6 @@ export class PedidoPage implements OnInit {
this.cc = users.filter(user=>{
return user.Type == 'CC';
});
console.log(users);
});
this.getDocumentDetails(res.workflowInstanceDataFields.FolderID, '361');
});
@@ -160,13 +158,11 @@ export class PedidoPage implements OnInit {
this.processes.GetDocumentDetails(forlderId,applicationId).subscribe(res=>{
this.attachments = res.Documents;
// console.log(res['Documents']);
console.log(this.attachments);
})
}
viewDocument(docId:string){
this.processes.GetDocumentUrl(docId, '361').subscribe(res=>{
console.log(res);
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
const browser = this.iab.create(url,"_blank");
browser.show();
@@ -255,7 +251,6 @@ export class PedidoPage implements OnInit {
sendExpedienteToPending() {
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
console.log(res);
this.goBack();
});
}
@@ -101,8 +101,6 @@ export class PedidosPage implements OnInit {
let parecerPr = await this.processes.GetTasksList("Pedido de Parecer do Presidente", false).toPromise();
let allParecer = parecer.concat(parecerPr).reverse();
console.log(allParecer);
this.parecerList = new Array();
allParecer.forEach(element => {
@@ -125,7 +123,6 @@ export class PedidosPage implements OnInit {
}
this.parecerList.push(task);
});
console.log(this.parecerList);
}
else if(this.segment == 'deferimento') {
@@ -156,11 +153,9 @@ export class PedidosPage implements OnInit {
}
this.deferimentoList.push(task);
});
console.log(this.deferimentoList);
});
}
console.log(this.taskType);
}
doRefresh(event) {
@@ -86,7 +86,6 @@ export class DespachosPage implements OnInit {
}
openExpedientDetailPage(data){
console.log(data);
this.openExpedientDetail.emit(data);
}
@@ -44,14 +44,12 @@ export class ExpedientsPage implements OnInit {
this.LoadList();
this.router.events.forEach((event) => {
if(event instanceof NavigationEnd && event.url == this.router.url) {
this.doRefresh();
this.LoadList();
}
});
}
segmentChanged(){
console.log(this.segment);
this.LoadList();
}
@@ -66,7 +64,6 @@ export class ExpedientsPage implements OnInit {
LoadList(){
this.processes.GetTasksList("Expediente", false).subscribe(result => {
console.log(result);
this.taskslist = new Array();
let res = result.reverse().filter(data => data.workflowInstanceDataFields.Status == "Active");
res.forEach(element => {
@@ -86,12 +83,10 @@ export class ExpedientsPage implements OnInit {
}
this.taskslist.push(task);
});
console.log(this.taskslist);
});
}
doRefresh() {
console.log('refresh expedientes1');
this.LoadList();
}
@@ -102,7 +102,6 @@ export class PedidosPage implements OnInit {
}
this.parecerList.push(task);
});
console.log(this.parecerList);
}
else if(this.segment == 'deferimento') {
@@ -110,8 +109,6 @@ export class PedidosPage implements OnInit {
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 => {
@@ -134,11 +131,9 @@ export class PedidosPage implements OnInit {
}
this.deferimentoList.push(task);
});
console.log(this.deferimentoList);
});
}
console.log(this.taskType);
}
doRefresh() {
@@ -152,7 +147,6 @@ export class PedidosPage implements OnInit {
}
async viewPedidoDetail(serialNumber:any) {
console.log(this.profile);
const modal = await this.modalController.create({
component: PedidoPage,
@@ -48,7 +48,7 @@ export class PendentesPage implements OnInit {
this.router.events.forEach((event) => {
if(event instanceof NavigationEnd && event.url == this.router.url) {
this.doRefresh();
this.LoadList();
}
});
}
@@ -57,10 +57,6 @@ export class PendentesPage implements OnInit {
this.LoadList();
}
notImplemented(){
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
}
openExpedientDetailPage(data){
console.log(data);
this.openExpedientDetail.emit(data);
@@ -69,9 +65,7 @@ export class PendentesPage implements OnInit {
async LoadList(){
this.showLoader = true;
this.pendentesList = [];
console.log('clear');
let despachos = await this.processes.GetTasksList("Despacho", false).toPromise();
let pareceres = await this.processes.GetTasksList("Pedido de Parecer", false).toPromise();
let deferimentos = await this.processes.GetTasksList("Pedido de Deferimento", false).toPromise();
@@ -85,7 +79,6 @@ export class PendentesPage implements OnInit {
let ApplicationId = element.workflowInstanceDataFields.ApplicationId;
this.processes.GetDocumentDetails(DocId, '361').subscribe(res=>{
this.totalDocs = res.DocumentsTotal;
console.log(res.DocumentsTotal);
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();
@@ -132,12 +125,7 @@ export class PendentesPage implements OnInit {
doRefresh() {
console.log('Refresh pendentes');
this.LoadList();
setTimeout(() => {
}, 2000);
}
async viewTaskDetails(serialNumber:string, workflowName:string) {
@@ -152,60 +140,6 @@ export class PendentesPage implements OnInit {
this.router.navigate(['/home/gabinete-digital/expediente',serialNumber,'gabinete-digital']);
}
}
async openDespacho(serialNumber:string){
const modal = await this.modalController.create({
component: DespachoPage,
componentProps:{
enterAnimation: "",
serialNumber: serialNumber,
profile: this.profile,
},
cssClass: 'modal modal-desktop',
});
await modal.present();
modal.onDidDismiss().then((res)=>{
console.log('refresh list');
this.LoadList();
});
}
async openPedido(serialNumber:string){
const modal = await this.modalController.create({
component: PedidoPage,
componentProps:{
enterAnimation: "",
serialNumber: serialNumber,
profile: this.profile,
},
cssClass: 'modal modal-desktop',
});
await modal.present();
modal.onDidDismiss().then((res)=>{
console.log('refresh list');
this.LoadList();
});
}
async viewExpedientDetail(serialNumber:any) {
console.log(this.profile);
const modal = await this.modalController.create({
component: ExpedienteDetailPage,
componentProps:{
enterAnimation: "",
serialNumber: serialNumber,
profile: this.profile,
},
cssClass: 'modal modal-desktop',
});
await modal.present();
modal.onDidDismiss().then((res)=>{
console.log('refresh list');
this.LoadList();
});
}
}