mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
save
This commit is contained in:
@@ -55,8 +55,8 @@ constructor (
|
||||
private alertService: AlertService,
|
||||
private authService: AuthService,
|
||||
private router: Router,
|
||||
|
||||
) {
|
||||
|
||||
) {
|
||||
this.profile = 'mdgpr';
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
}
|
||||
@@ -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();
|
||||
@@ -104,7 +103,7 @@ goToDespachoPr(serialNumber:any){
|
||||
|
||||
let result = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||
console.log(result);
|
||||
|
||||
|
||||
let despachosPr;
|
||||
switch (this.loggeduser.Profile) {
|
||||
case 'MDGPR':
|
||||
@@ -115,9 +114,9 @@ goToDespachoPr(serialNumber:any){
|
||||
break;
|
||||
}
|
||||
console.log(despachosPr);
|
||||
|
||||
|
||||
despachosPr.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();
|
||||
@@ -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);
|
||||
@@ -223,9 +223,9 @@ async viewExpedientDetail(serialNumber:any) {
|
||||
taskStartDate: doc.CreateDate,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: doc.ApplicationId,
|
||||
FsId: doc.ApplicationId,
|
||||
FolderID: null,
|
||||
DocId: doc.SourceId,
|
||||
DocId: doc.SourceId,
|
||||
Subject: doc.SourceName
|
||||
},
|
||||
}
|
||||
@@ -245,7 +245,7 @@ async viewExpedientDetail(serialNumber:any) {
|
||||
this.LoadList();
|
||||
if(res['data']=='openDiscart'){
|
||||
console.log('open discart');
|
||||
|
||||
|
||||
// this.distartExpedientModal();
|
||||
|
||||
}
|
||||
@@ -262,13 +262,13 @@ async viewExpedientDetail(serialNumber:any) {
|
||||
taskStartDate: doc.CreateDate,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: doc.ApplicationId,
|
||||
FsId: doc.ApplicationId,
|
||||
FolderID: null,
|
||||
DocId: doc.SourceId,
|
||||
DocId: doc.SourceId,
|
||||
Subject: doc.SourceName
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
@@ -292,7 +292,7 @@ async viewExpedientDetail(serialNumber:any) {
|
||||
this.close();
|
||||
this.openMenu(); */
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ async viewExpedientDetail(serialNumber:any) {
|
||||
const doc = this.taskList[ this.dicIndex];
|
||||
|
||||
console.log(doc, this.dicIndex, this.taskList)
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
@@ -313,7 +313,7 @@ async viewExpedientDetail(serialNumber:any) {
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
this.LoadList();
|
||||
@@ -323,12 +323,12 @@ async viewExpedientDetail(serialNumber:any) {
|
||||
this.close();
|
||||
this.openMenu(); */
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
docIndex(index: number) {
|
||||
this.dicIndex = index;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ export class DespachosPage implements OnInit {
|
||||
deferimentoList:DailyWorkTask[] = [];
|
||||
|
||||
taskList:tasksList[] = [];
|
||||
|
||||
|
||||
taskType: string;
|
||||
serialNumber:string;
|
||||
totalDocs:any;
|
||||
@@ -51,7 +51,7 @@ export class DespachosPage implements OnInit {
|
||||
private authService: AuthService,
|
||||
private router: Router,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
) {
|
||||
) {
|
||||
this.profile = 'mdgpr';
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params["serialNumber"]) {
|
||||
@@ -72,7 +72,7 @@ export class DespachosPage implements OnInit {
|
||||
this.doRefresh();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
@@ -98,7 +98,7 @@ export class DespachosPage implements OnInit {
|
||||
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();
|
||||
@@ -115,16 +115,17 @@ export class DespachosPage implements OnInit {
|
||||
"FolderID": element.workflowInstanceDataFields.FolderID,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
}
|
||||
|
||||
|
||||
this.despachoList.push(task)
|
||||
|
||||
|
||||
});
|
||||
|
||||
this.despachoList = this.sortArrayISODate(this.despachoList).reverse()
|
||||
|
||||
this.despachoList.forEach( (element, index) => {
|
||||
|
||||
|
||||
// let aplicationId = element.workflowInstanceDataFields.SourceSecFsID;
|
||||
let FolderID = element['FolderID'];
|
||||
|
||||
@@ -167,9 +168,9 @@ export class DespachosPage implements OnInit {
|
||||
taskStartDate: doc.CreateDate,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: doc.ApplicationId,
|
||||
FsId: doc.ApplicationId,
|
||||
FolderID: null,
|
||||
DocId: doc.SourceId,
|
||||
DocId: doc.SourceId,
|
||||
Subject: doc.SourceName
|
||||
},
|
||||
}
|
||||
@@ -189,8 +190,8 @@ export class DespachosPage implements OnInit {
|
||||
this.LoadList();
|
||||
if(res['data']=='openDiscart'){
|
||||
console.log('open discart');
|
||||
|
||||
|
||||
|
||||
|
||||
// this.distartExpedientModal();
|
||||
|
||||
}
|
||||
@@ -207,13 +208,13 @@ export class DespachosPage implements OnInit {
|
||||
taskStartDate: doc.CreateDate,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: doc.ApplicationId,
|
||||
FsId: doc.ApplicationId,
|
||||
FolderID: null,
|
||||
DocId: doc.SourceId,
|
||||
DocId: doc.SourceId,
|
||||
Subject: doc.SourceName
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
@@ -241,7 +242,7 @@ export class DespachosPage implements OnInit {
|
||||
const doc = this.taskList[ this.dicIndex];
|
||||
|
||||
// console.log(doc, this.dicIndex, this.taskList)
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
@@ -252,7 +253,7 @@ export class DespachosPage implements OnInit {
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
this.LoadList();
|
||||
@@ -263,13 +264,12 @@ export class DespachosPage implements OnInit {
|
||||
this.close();
|
||||
this.openMenu(); */
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
docIndex(index: number) {
|
||||
this.dicIndex = index;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ serialNumber:string;
|
||||
}
|
||||
|
||||
async LoadList(){
|
||||
|
||||
|
||||
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||
this.diplomasList = new Array();
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -26,18 +26,12 @@ constructor(
|
||||
private alertService: AlertService,
|
||||
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) {
|
||||
@@ -55,23 +49,22 @@ constructor(
|
||||
async LoadList(){
|
||||
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) {
|
||||
case 'validar':
|
||||
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);
|
||||
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
||||
|
||||
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
@@ -79,15 +72,16 @@ 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);
|
||||
this.diplomasList = this.sortArrayISODate(this.diplomasList).reverse();
|
||||
|
||||
|
||||
});
|
||||
this.showLoader = false;
|
||||
break;
|
||||
@@ -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,25 +101,25 @@ 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);
|
||||
this.diplomasList = this.sortArrayISODate(this.diplomasList).reverse();
|
||||
|
||||
|
||||
});
|
||||
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);
|
||||
|
||||
@@ -32,8 +32,8 @@ 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();
|
||||
}
|
||||
@@ -41,7 +41,7 @@ export class ExpedientesPrPage implements OnInit {
|
||||
ngOnInit() {
|
||||
|
||||
const pathname = window.location.pathname
|
||||
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||
this.refreshing();
|
||||
@@ -76,13 +76,14 @@ export class ExpedientesPrPage implements OnInit {
|
||||
"DocumentsQty": 0,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
}
|
||||
this.taskslist.push(task);
|
||||
});
|
||||
console.log(this.taskslist);
|
||||
this.showLoader = false;
|
||||
});
|
||||
|
||||
|
||||
break;
|
||||
case 'PR':
|
||||
this.processes.GetTasksList("Expediente do Presidente", false).subscribe(result => {
|
||||
@@ -103,13 +104,14 @@ export class ExpedientesPrPage implements OnInit {
|
||||
"DocumentsQty": 0,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
}
|
||||
this.taskslist.push(task);
|
||||
});
|
||||
console.log(this.taskslist);
|
||||
this.showLoader = false;
|
||||
});
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -149,4 +151,3 @@ export class ExpedientesPrPage implements OnInit {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -31,9 +31,9 @@ export class ExpedientsPage implements OnInit {
|
||||
private processes:ProcessesService,
|
||||
private modalController: ModalController,
|
||||
private alertService: AlertService,
|
||||
private router: Router,
|
||||
private router: Router,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
) {
|
||||
) {
|
||||
this.profile = 'mdgpr';
|
||||
|
||||
}
|
||||
@@ -42,7 +42,7 @@ export class ExpedientsPage implements OnInit {
|
||||
//Inicializar segment
|
||||
this.segment = "expedientes";
|
||||
this.LoadList();
|
||||
|
||||
|
||||
const pathname = window.location.pathname
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||
@@ -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 {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ import { PedidoPage } from 'src/app/pages/gabinete-digital/pedidos/pedido/pedido
|
||||
styleUrls: ['./pedidos.page.scss'],
|
||||
})
|
||||
export class PedidosPage implements OnInit {
|
||||
|
||||
|
||||
//profile:string;
|
||||
|
||||
@ViewChild(CalendarComponent) myCal: CalendarComponent;
|
||||
@@ -25,7 +25,7 @@ export class PedidosPage implements OnInit {
|
||||
taskslist:DailyWorkTask[];
|
||||
parecerList:any[];
|
||||
fulltask:any;
|
||||
|
||||
|
||||
parecerListResult:tasksList[] = [];
|
||||
deferimentoListResult:tasksList[] = [];
|
||||
|
||||
@@ -39,11 +39,11 @@ export class PedidosPage implements OnInit {
|
||||
@Output() openPedido:EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
private router: Router,
|
||||
private processes:ProcessesService,
|
||||
private modalController: ModalController,
|
||||
private alertService: AlertService,
|
||||
) {
|
||||
) {
|
||||
this.profile = 'mdgpr';
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ export class PedidosPage implements OnInit {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
this.LoadList();
|
||||
}
|
||||
@@ -101,16 +101,17 @@ export class PedidosPage implements OnInit {
|
||||
"FolderID": element.workflowInstanceDataFields.FolderID,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
}
|
||||
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;
|
||||
|
||||
|
||||
this.deferimentoList = new Array();
|
||||
let res = result.reverse();
|
||||
res.forEach(element => {
|
||||
@@ -133,7 +134,7 @@ export class PedidosPage implements OnInit {
|
||||
}
|
||||
this.deferimentoList.push(task);
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -168,4 +169,3 @@ export class PedidosPage implements OnInit {
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user