mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
save
This commit is contained in:
@@ -2,7 +2,7 @@ import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angu
|
||||
import { Router } from '@angular/router';
|
||||
import { CalendarComponent } from 'ionic2-calendar';
|
||||
|
||||
import { DailyWorkTask, tasksList } from '../../../models/dailyworktask.model';
|
||||
import { DailyWorkTask } from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { formatDate } from '@angular/common';
|
||||
import { LoadingService } from 'src/app/services/loading.service';
|
||||
@@ -10,9 +10,6 @@ import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { ExpedienteDetailPage } from 'src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { PedidoPage } from 'src/app/pages/gabinete-digital/pedidos/pedido/pedido.page';
|
||||
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
||||
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-pedidos',
|
||||
@@ -27,10 +24,6 @@ export class PedidosPage implements OnInit {
|
||||
|
||||
taskslist:DailyWorkTask[];
|
||||
parecerList:DailyWorkTask[];
|
||||
|
||||
parecerListResult:tasksList[] = [];
|
||||
deferimentoListResult:tasksList[] = [];
|
||||
|
||||
deferimentoList:DailyWorkTask[];
|
||||
taskType: string;
|
||||
serialNumber:string;
|
||||
@@ -39,9 +32,6 @@ export class PedidosPage implements OnInit {
|
||||
@Input() segment:string;
|
||||
@Output() openExpedientDetail:EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
loadedAttachments:any;
|
||||
dicIndex = 0;
|
||||
|
||||
constructor(
|
||||
private processes:ProcessesService,
|
||||
private modalController: ModalController,
|
||||
@@ -72,9 +62,7 @@ export class PedidosPage implements OnInit {
|
||||
this.taskType = "Pedido de Parecer";
|
||||
this.processes.GetTasksList("Pedido de Parecer", false).subscribe(result => {
|
||||
console.log(result);
|
||||
|
||||
this.parecerListResult =result;
|
||||
|
||||
|
||||
this.parecerList = new Array();
|
||||
let res = result.reverse();
|
||||
res.forEach(element => {
|
||||
@@ -99,8 +87,6 @@ export class PedidosPage implements OnInit {
|
||||
this.taskType = "Pedido de Deferimento";
|
||||
this.processes.GetTasksList("Pedido de Deferimento", false).subscribe(result => {
|
||||
console.log(result);
|
||||
|
||||
this.deferimentoListResult =result;
|
||||
|
||||
this.deferimentoList = new Array();
|
||||
let res = result.reverse();
|
||||
@@ -158,137 +144,5 @@ export class PedidosPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
async openExpedientActionsModal(taskAction: any, task: any) {
|
||||
//this.modalController.dismiss();
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
|
||||
let doc: tasksList;
|
||||
|
||||
if (this.segment == 'parecer') {
|
||||
doc = this.parecerListResult[ this.dicIndex];
|
||||
} else if (this.segment == 'deferimento') {
|
||||
doc = this.deferimentoListResult[ this.dicIndex];
|
||||
}
|
||||
|
||||
task = {
|
||||
serialNumber: doc.serialNumber,
|
||||
taskStartDate: doc.taskStartDate,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: doc.workflowInstanceDataFields.SourceSecFsID,
|
||||
FolderID: null,
|
||||
DocId: doc.workflowInstanceDataFields.SourceID,
|
||||
Subject: doc.workflowInstanceFolio
|
||||
},
|
||||
}
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ExpedientTaskModalPage,
|
||||
componentProps: {
|
||||
taskAction: taskAction,
|
||||
task: task,
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
console.log(res['data']);
|
||||
if(res['data']=='openDiscart'){
|
||||
console.log('open discart');
|
||||
|
||||
// this.distartExpedientModal();
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
async openBookMeetingModal(task: any) {
|
||||
|
||||
|
||||
let doc: tasksList;
|
||||
|
||||
if (this.segment == 'parecer') {
|
||||
doc = this.parecerListResult[ this.dicIndex];
|
||||
} else if (this.segment == 'deferimento') {
|
||||
doc = this.deferimentoListResult[ this.dicIndex];
|
||||
}
|
||||
|
||||
task = {
|
||||
serialNumber: doc.serialNumber,
|
||||
taskStartDate: doc.taskStartDate,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: doc.workflowInstanceDataFields.SourceSecFsID,
|
||||
FolderID: null,
|
||||
DocId: doc.workflowInstanceDataFields.SourceID,
|
||||
Subject: doc.workflowInstanceFolio
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800) {
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: BookMeetingModalPage,
|
||||
componentProps: {
|
||||
task: task,
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
|
||||
}
|
||||
|
||||
async distartExpedientModal(){
|
||||
|
||||
let doc: tasksList;
|
||||
|
||||
if (this.segment == 'parecer') {
|
||||
doc = this.parecerListResult[ this.dicIndex];
|
||||
} else if (this.segment == 'deferimento') {
|
||||
doc = this.deferimentoListResult[ this.dicIndex];
|
||||
}
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
serialNumber: doc.serialNumber,
|
||||
folderId: doc.workflowInstanceDataFields.FolderID,
|
||||
action: 'complete',
|
||||
},
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
if(res['data']=='close'){
|
||||
//this.close();
|
||||
/* console.log('2Expedient Discard closed2');
|
||||
this.close();
|
||||
this.openMenu(); */
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user