mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
save
This commit is contained in:
@@ -8,6 +8,7 @@ export class DailyWorkTask{
|
||||
DocumentsQty:any;
|
||||
WorkflowName:string;
|
||||
activityInstanceName: string;
|
||||
Status: string;
|
||||
}
|
||||
|
||||
export class tasksList{
|
||||
|
||||
@@ -110,6 +110,7 @@ export class ViewEventPage implements OnInit {
|
||||
}
|
||||
|
||||
loadEvent(){
|
||||
const loader = this.toastService.loading();
|
||||
this.eventsService.getEvent(this.eventId).subscribe(res => {
|
||||
this.loadedEvent = res;
|
||||
|
||||
@@ -117,6 +118,7 @@ export class ViewEventPage implements OnInit {
|
||||
|
||||
/* this.today = new Date(res.StartDate);
|
||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]); */
|
||||
loader.remove()
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -84,6 +84,7 @@ export class DiplomasAssinarPage implements OnInit {
|
||||
"DocId": element.workflowInstanceDataFields.DocId,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
},
|
||||
@@ -99,6 +100,7 @@ export class DiplomasAssinarPage implements OnInit {
|
||||
"DocId": element.workflowInstanceDataFields.DocId,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
});
|
||||
|
||||
@@ -25,6 +25,10 @@ constructor(
|
||||
private activatedRoute: ActivatedRoute,
|
||||
) {
|
||||
this.diplomasList = [];
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.segment = 'validar';
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
console.log('Cria');
|
||||
@@ -36,10 +40,6 @@ constructor(
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
const pathname = window.location.pathname
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
@@ -172,6 +172,7 @@ constructor(
|
||||
"DocId": element.workflowInstanceDataFields.DocIdDiferimento,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
this.diplomasList = removeDuplicate(this.diplomasList);
|
||||
@@ -203,6 +204,7 @@ constructor(
|
||||
"DocId": element.workflowInstanceDataFields.DocIdDiferimento,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
this.diplomasList = removeDuplicate(this.diplomasList);
|
||||
|
||||
@@ -72,6 +72,7 @@ export class ExpedientePage implements OnInit {
|
||||
"DocumentsQty": 0,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
}
|
||||
this.taskslist.push(task);
|
||||
});
|
||||
|
||||
@@ -161,6 +161,7 @@ export class ExpedientePrPage implements OnInit {
|
||||
"DocId": res.workflowInstanceDataFields.DocIdD,
|
||||
"WorkflowName": res.workflowDisplayName,
|
||||
"activityInstanceName": res.activityInstanceName,
|
||||
"Status": res.workflowInstanceDataFields.Status,
|
||||
}
|
||||
|
||||
console.log('task', this.task);
|
||||
|
||||
@@ -71,6 +71,7 @@ export class ExpedientesPrPage implements OnInit {
|
||||
"DocumentsQty": 0,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
}
|
||||
this.taskslist.push(task);
|
||||
});
|
||||
@@ -98,6 +99,7 @@ export class ExpedientesPrPage implements OnInit {
|
||||
"DocumentsQty": 0,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
}
|
||||
this.taskslist.push(task);
|
||||
});
|
||||
|
||||
@@ -81,7 +81,7 @@ export class PendentesPage implements OnInit {
|
||||
"CreateDate": taskDate,
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": 0,
|
||||
"DocumentsQty": element.totalDocuments,
|
||||
"DocId": element.workflowInstanceDataFields.DocIdDiferimento,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
@@ -90,6 +90,8 @@ export class PendentesPage implements OnInit {
|
||||
this.pendentesList.push(task);
|
||||
this.pendentesList = removeDuplicate( this.pendentesList)
|
||||
this.pendentesList = this.sortArrayISODate(this.pendentesList);
|
||||
console.log(this.pendentesList);
|
||||
|
||||
});
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,6 @@ ngOnInit() {
|
||||
this.LoadList();
|
||||
|
||||
const pathname = window.location.pathname
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||
this.doRefresh();
|
||||
@@ -134,6 +133,7 @@ goToDespachoPr(serialNumber:any){
|
||||
"FolderID": element.workflowInstanceDataFields.FolderID,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
}
|
||||
|
||||
this.despachoList.push(task);
|
||||
|
||||
@@ -115,6 +115,7 @@ export class DespachosPage implements OnInit {
|
||||
"FolderID": element.workflowInstanceDataFields.FolderID,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
}
|
||||
|
||||
this.despachoList.push(task)
|
||||
@@ -272,4 +273,3 @@ export class DespachosPage implements OnInit {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -87,6 +87,7 @@ serialNumber:string;
|
||||
"FolderID": element.workflowInstanceDataFields.FolderID,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
},
|
||||
@@ -107,6 +108,7 @@ serialNumber:string;
|
||||
"FolderID": element.workflowInstanceDataFields.FolderID,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
});
|
||||
|
||||
@@ -27,17 +27,11 @@ constructor(
|
||||
private router: Router,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
const pathname = window.location.pathname
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||
this.refreshing();
|
||||
}
|
||||
});
|
||||
this.refreshing();
|
||||
}
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
@@ -56,6 +50,8 @@ constructor(
|
||||
this.diplomasList = [];
|
||||
console.log(this.diplomasList);
|
||||
|
||||
console.log(this.segment);
|
||||
|
||||
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||
|
||||
switch (this.segment) {
|
||||
@@ -63,10 +59,7 @@ constructor(
|
||||
let diplomasValidar = diplomas.filter(data => data.activityInstanceName == "Revisar Diploma");
|
||||
console.log(diplomasValidar);
|
||||
|
||||
diplomasValidar.forEach(async element => {
|
||||
let DocId = element.workflowInstanceDataFields.FolderID;
|
||||
let ApplicationId = element.workflowInstanceDataFields.ApplicationId;
|
||||
this.totalDocs = await this.getTotalDocs(DocId);
|
||||
diplomasValidar.forEach(element => {
|
||||
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
@@ -79,10 +72,11 @@ constructor(
|
||||
"CreateDate": taskDate,
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": this.totalDocs,
|
||||
"DocumentsQty": element.totalDocuments,
|
||||
"DocId": element.workflowInstanceDataFields.DocIdDiferimento,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
this.diplomasList = removeDuplicate(this.diplomasList);
|
||||
@@ -95,9 +89,6 @@ constructor(
|
||||
this.diplomasList = new Array();
|
||||
let diplomasAssinados = diplomas.reverse().filter(data => data.activityInstanceName == "Diploma Assinado");
|
||||
diplomasAssinados.forEach(async element => {
|
||||
let DocId = element.workflowInstanceDataFields.FolderID;
|
||||
let ApplicationId = element.workflowInstanceDataFields.ApplicationId;
|
||||
this.totalDocs = await this.getTotalDocs(DocId);
|
||||
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
@@ -110,10 +101,11 @@ constructor(
|
||||
"CreateDate": taskDate,
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": this.totalDocs,
|
||||
"DocumentsQty": element.totalDocuments,
|
||||
"DocId": element.workflowInstanceDataFields.DocIdDiferimento,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
this.diplomasList = removeDuplicate(this.diplomasList);
|
||||
@@ -122,13 +114,12 @@ constructor(
|
||||
});
|
||||
this.showLoader = false;
|
||||
break;
|
||||
default:
|
||||
console.log('No segment provided!');
|
||||
break;
|
||||
}
|
||||
}
|
||||
async getTotalDocs(DocId:any){
|
||||
let res = await this.processes.GetDocumentDetails(DocId, '361').toPromise();
|
||||
console.log(res.DocumentsTotal);
|
||||
return res.DocumentsTotal;
|
||||
}
|
||||
|
||||
sortArrayISODate(myArray: any) {
|
||||
return myArray.sort(function(a, b) {
|
||||
return (a.CreateDate < b.CreateDate) ? -1 : ((a.CreateDate > b.CreateDate) ? 1 : 0);
|
||||
|
||||
@@ -76,6 +76,7 @@ export class ExpedientesPrPage implements OnInit {
|
||||
"DocumentsQty": 0,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
}
|
||||
this.taskslist.push(task);
|
||||
});
|
||||
@@ -103,6 +104,7 @@ export class ExpedientesPrPage implements OnInit {
|
||||
"DocumentsQty": 0,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
}
|
||||
this.taskslist.push(task);
|
||||
});
|
||||
@@ -149,4 +151,3 @@ export class ExpedientesPrPage implements OnInit {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -82,6 +82,7 @@ export class ExpedientsPage implements OnInit {
|
||||
"DocumentsQty": 0,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
}
|
||||
this.taskslist.push(task);
|
||||
});
|
||||
@@ -97,4 +98,3 @@ export class ExpedientsPage implements OnInit {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -101,6 +101,7 @@ export class PedidosPage implements OnInit {
|
||||
"FolderID": element.workflowInstanceDataFields.FolderID,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
}
|
||||
this.parecerList.push(task);
|
||||
});
|
||||
@@ -168,4 +169,3 @@ export class PedidosPage implements OnInit {
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user