mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
save
This commit is contained in:
@@ -96,7 +96,7 @@ export class CreateProcessPage implements OnInit {
|
||||
this.task = this.navParams.get('task');
|
||||
|
||||
console.log('task', this.task)
|
||||
|
||||
|
||||
this.taskType = this.navParams.get('taskAction');
|
||||
|
||||
this.postData = new Despacho();
|
||||
@@ -115,7 +115,7 @@ export class CreateProcessPage implements OnInit {
|
||||
SubjectTypes: this.selectedTypes,
|
||||
NumberPDPP: this.task.workflowInstanceDataFields.DispatchNumber,
|
||||
};
|
||||
|
||||
|
||||
this.postData.DispatchFolder = this.dispatchFolder;
|
||||
this.postData.UsersSelected = this.participants;
|
||||
/* By Default TypeDeadline should be 'Normal' */
|
||||
@@ -134,7 +134,7 @@ export class CreateProcessPage implements OnInit {
|
||||
setTimeout(() => {
|
||||
this.selectedTypes = ['99999850'];
|
||||
}, 500);
|
||||
|
||||
|
||||
console.log(this.postData.DispatchFolder.SubjectTypes);
|
||||
this.taskDate = new Date(this.task.taskStartDate);
|
||||
}
|
||||
@@ -154,7 +154,7 @@ export class CreateProcessPage implements OnInit {
|
||||
//this.router.navigate(['/home/gabinete-digital/expediente']);
|
||||
this.modalController.dismiss(null);
|
||||
}
|
||||
|
||||
|
||||
getSubjectType() {
|
||||
this.processes.GetSubjectType().subscribe(res=>{
|
||||
console.log(res);
|
||||
@@ -163,7 +163,7 @@ export class CreateProcessPage implements OnInit {
|
||||
}
|
||||
cancelTask() {
|
||||
this.modalController.dismiss(null);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -193,7 +193,7 @@ export class CreateProcessPage implements OnInit {
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
async saveTask() {
|
||||
|
||||
this.injectValidation()
|
||||
@@ -201,7 +201,7 @@ export class CreateProcessPage implements OnInit {
|
||||
|
||||
if(this.Form.invalid) return false
|
||||
|
||||
|
||||
|
||||
if(this.postData.Priority=='99999861') {
|
||||
this.dispatchFolder.DeadlineType = 'Normal';
|
||||
}
|
||||
@@ -214,10 +214,10 @@ export class CreateProcessPage implements OnInit {
|
||||
else if(this.postData.Priority=='99999864') {
|
||||
this.dispatchFolder.DeadlineType = 'Urgentíssimo';
|
||||
}
|
||||
|
||||
|
||||
let attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||
console.log(attendees);
|
||||
|
||||
|
||||
attendees = attendees.map(function(val) {
|
||||
return {
|
||||
UserEmail: val.EmailAddress,
|
||||
@@ -239,7 +239,7 @@ export class CreateProcessPage implements OnInit {
|
||||
|
||||
switch (this.loggeduser.Profile) {
|
||||
case 'MDGPR':
|
||||
|
||||
|
||||
switch (this.taskType) {
|
||||
case '0':
|
||||
this.postData = {
|
||||
@@ -260,7 +260,7 @@ export class CreateProcessPage implements OnInit {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
case '1':
|
||||
this.postData = {
|
||||
@@ -272,17 +272,17 @@ export class CreateProcessPage implements OnInit {
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
console.log(this.postData);
|
||||
|
||||
|
||||
try {
|
||||
await this.processes.postParecer(this.postData).toPromise();
|
||||
this.FinalizarParecer('Pedido de Parecer enviado');
|
||||
loader.remove()
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
case '2':
|
||||
this.postData = {
|
||||
@@ -294,12 +294,12 @@ export class CreateProcessPage implements OnInit {
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
console.log(this.postData);
|
||||
|
||||
|
||||
try {
|
||||
await this.processes.postDeferimento(this.postData).toPromise();
|
||||
this.FinalizarDeferimento('Pedido de deferimento enviado');
|
||||
loader.remove()
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
loader.remove()
|
||||
@@ -307,9 +307,9 @@ export class CreateProcessPage implements OnInit {
|
||||
break;
|
||||
}
|
||||
this.modalController.dismiss();
|
||||
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case 'PR':
|
||||
switch (this.taskType) {
|
||||
case '0':
|
||||
@@ -322,7 +322,7 @@ export class CreateProcessPage implements OnInit {
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
console.log('this.postData', this.postData, this.taskType);
|
||||
|
||||
|
||||
try {
|
||||
await this.processes.postDespatcho(this.postData).toPromise();
|
||||
loader.remove()
|
||||
@@ -331,7 +331,7 @@ export class CreateProcessPage implements OnInit {
|
||||
loader.remove()
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
case '1':
|
||||
this.postData = {
|
||||
@@ -343,18 +343,18 @@ export class CreateProcessPage implements OnInit {
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
console.log(this.postData);
|
||||
|
||||
|
||||
try {
|
||||
await this.processes.postParecer(this.postData).toPromise();
|
||||
this.executado();
|
||||
loader.remove()
|
||||
this.toastService.successMessage('Pedido de Parecer criado');
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
loader.remove()
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
case '2':
|
||||
this.postData = {
|
||||
@@ -366,18 +366,18 @@ export class CreateProcessPage implements OnInit {
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
console.log(this.postData);
|
||||
|
||||
|
||||
try {
|
||||
await this.processes.postDeferimento(this.postData).toPromise();
|
||||
this.executado();
|
||||
loader.remove()
|
||||
this.toastService.successMessage('Pedido de Deferimento criado');
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
loader.remove()
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
this.modalController.dismiss();
|
||||
@@ -391,21 +391,21 @@ export class CreateProcessPage implements OnInit {
|
||||
let body;
|
||||
|
||||
if(this.task.activityInstanceName =='Tarefa de Despacho' || this.task.activityInstanceName =='Reexecutar Despacho') {
|
||||
|
||||
|
||||
body = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
"serialNumber": this.task.serialNumber,
|
||||
"action": "Conhecimento",
|
||||
"ActionTypeId": 104,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": '',
|
||||
},
|
||||
"AttachmentList" :null,
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(this.task.activityInstanceName =='Concluir Despacho' || this.task.activityInstanceName == 'Concluir Parecer') {
|
||||
|
||||
|
||||
body = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
"serialNumber": this.task.serialNumber,
|
||||
"action": "Despacho",
|
||||
"ActionTypeId": 94,
|
||||
"dataFields": {
|
||||
@@ -424,40 +424,40 @@ export class CreateProcessPage implements OnInit {
|
||||
}
|
||||
|
||||
async FinalizarDespacho(message?) {
|
||||
|
||||
|
||||
let body;
|
||||
|
||||
if(this.task.activityInstanceName =='Tarefa de Despacho' ||
|
||||
if(this.task.activityInstanceName =='Tarefa de Despacho' ||
|
||||
this.task.activityInstanceName =='Reexecutar Despacho') {
|
||||
|
||||
|
||||
body = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
"serialNumber": this.task.serialNumber,
|
||||
"action": "Conhecimento",
|
||||
"ActionTypeId": 104,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": '',
|
||||
},
|
||||
"AttachmentList" :null,
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(this.task.activityInstanceName =='Concluir Despacho' ||
|
||||
this.task.activityInstanceName == 'Concluir Parecer' ||
|
||||
else if(this.task.activityInstanceName =='Concluir Despacho' ||
|
||||
this.task.activityInstanceName == 'Concluir Parecer' ||
|
||||
this.task.activityInstanceName =='Concluir Deferimento' ||
|
||||
this.task.activityInstanceName =='Reapreciar Deferimento'
|
||||
) {
|
||||
|
||||
|
||||
body = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
"serialNumber": this.task.serialNumber,
|
||||
"action": "Despacho",
|
||||
"ActionTypeId": 94,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": '',
|
||||
},
|
||||
"AttachmentList" :null,
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(body);
|
||||
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.toastService.successMessage(message);
|
||||
@@ -473,8 +473,8 @@ export class CreateProcessPage implements OnInit {
|
||||
if(this.task.activityInstanceName =='Concluir Deferimento' ||
|
||||
this.task.activityInstanceName =='Reapreciar Deferimento'
|
||||
){
|
||||
body = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
body = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
"action": "Parecer",
|
||||
"ActionTypeId": 92,
|
||||
"dataFields": {
|
||||
@@ -483,9 +483,9 @@ export class CreateProcessPage implements OnInit {
|
||||
"AttachmentList" :null,
|
||||
}
|
||||
}
|
||||
if(this.task.activityInstanceName =='Tarefa de Despacho'){
|
||||
body = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
else if(this.task.activityInstanceName =='Tarefa de Despacho'){
|
||||
body = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
"action": "Conhecimento",
|
||||
"ActionTypeId": 92,
|
||||
"dataFields": {
|
||||
@@ -495,8 +495,8 @@ export class CreateProcessPage implements OnInit {
|
||||
}
|
||||
}
|
||||
else{
|
||||
body = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
body = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
"action": "Parecer",
|
||||
"ActionTypeId": 96,
|
||||
"dataFields": {
|
||||
@@ -507,6 +507,8 @@ export class CreateProcessPage implements OnInit {
|
||||
}
|
||||
|
||||
try {
|
||||
console.log(body);
|
||||
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.toastService.successMessage(message)
|
||||
} catch (e) {
|
||||
@@ -517,8 +519,8 @@ export class CreateProcessPage implements OnInit {
|
||||
|
||||
async FinalizarDeferimento(message?){
|
||||
if(this.task.activityInstanceName =='Reapreciar Deferimento'){
|
||||
let body = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
let body = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
"action": "Parecer",
|
||||
"ActionTypeId": 92,
|
||||
"dataFields": {
|
||||
@@ -534,14 +536,14 @@ export class CreateProcessPage implements OnInit {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async addParticipants() {
|
||||
|
||||
|
||||
this.adding = "intervenient";
|
||||
this.contacts = this.taskParticipants;
|
||||
|
||||
if(window.innerWidth <=800) {
|
||||
|
||||
|
||||
this.showAttendees=false;
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
@@ -558,7 +560,7 @@ export class CreateProcessPage implements OnInit {
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then((data) => {
|
||||
|
||||
|
||||
if(data) {
|
||||
data = data['data'];
|
||||
|
||||
@@ -573,7 +575,7 @@ export class CreateProcessPage implements OnInit {
|
||||
this.showAttendees=true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async addParticipantsCc() {
|
||||
|
||||
this.adding = "CC";
|
||||
@@ -596,7 +598,7 @@ export class CreateProcessPage implements OnInit {
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then((data) => {
|
||||
|
||||
|
||||
if(data) {
|
||||
data = data['data'];
|
||||
|
||||
@@ -607,7 +609,7 @@ export class CreateProcessPage implements OnInit {
|
||||
this.setIntervenientCC(newAttendeesCC);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
} else {
|
||||
this.showAttendees=true
|
||||
}
|
||||
@@ -625,14 +627,14 @@ export class CreateProcessPage implements OnInit {
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
if(res['data']=='close'){
|
||||
console.log('Expedient Discard closed');
|
||||
this.modalController.dismiss(res['data'])
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -641,10 +643,10 @@ export class CreateProcessPage implements OnInit {
|
||||
if(this.adding == "intervenient"){
|
||||
this.taskParticipants = data;
|
||||
} else if (this.adding == "CC") {
|
||||
|
||||
|
||||
this.taskParticipantsCc = data;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -656,7 +658,7 @@ export class CreateProcessPage implements OnInit {
|
||||
async setIntervenient(data) {
|
||||
this.taskParticipants = data;
|
||||
}
|
||||
|
||||
|
||||
async setIntervenientCC(data) {
|
||||
this.taskParticipantsCc = data;
|
||||
}
|
||||
@@ -717,4 +719,4 @@ export class CreateProcessPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ export class DespachoPrPage implements OnInit {
|
||||
public popoverController: PopoverController,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,) {
|
||||
private toastService: ToastService,) {
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params["serialNumber"]) {
|
||||
this.serialnumber = params["serialNumber"];
|
||||
@@ -67,7 +67,7 @@ export class DespachoPrPage implements OnInit {
|
||||
ngOnInit() {
|
||||
this.profile = "mdgpr";
|
||||
console.log(this.serialnumber);
|
||||
|
||||
|
||||
this.activateRoute.paramMap.subscribe(paramMap => {
|
||||
if (!paramMap.has('SerialNumber')) {
|
||||
return;
|
||||
@@ -118,7 +118,7 @@ export class DespachoPrPage implements OnInit {
|
||||
}
|
||||
this.fulltask = res;
|
||||
console.log(this.task);
|
||||
|
||||
|
||||
console.log('GetTask', res);
|
||||
|
||||
let thedate = new Date(this.task.CreateDate);
|
||||
@@ -133,7 +133,7 @@ export class DespachoPrPage implements OnInit {
|
||||
return user.Type == 'CC';
|
||||
});
|
||||
console.log(users);
|
||||
|
||||
|
||||
});
|
||||
this.getDocumentDetails(this.task.FolderId, '361');
|
||||
|
||||
@@ -180,8 +180,8 @@ export class DespachoPrPage implements OnInit {
|
||||
}
|
||||
|
||||
async executado(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Conhecimento",
|
||||
"ActionTypeId": 104,
|
||||
"dataFields": {
|
||||
@@ -206,8 +206,8 @@ export class DespachoPrPage implements OnInit {
|
||||
}
|
||||
|
||||
async arquivar(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Arquivo",
|
||||
"ActionTypeId": 95,
|
||||
"dataFields": {
|
||||
@@ -233,8 +233,8 @@ export class DespachoPrPage implements OnInit {
|
||||
}
|
||||
|
||||
async generateDiploma(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Reencaminhar",
|
||||
"ActionTypeId": 99999839,
|
||||
"dataFields": {
|
||||
@@ -259,8 +259,8 @@ export class DespachoPrPage implements OnInit {
|
||||
}
|
||||
|
||||
async concluir(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Executado",
|
||||
"ActionTypeId": 104,
|
||||
"dataFields": {
|
||||
@@ -286,8 +286,8 @@ export class DespachoPrPage implements OnInit {
|
||||
|
||||
|
||||
async reexecutar(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Reexecutar",
|
||||
"ActionTypeId": 100000010,
|
||||
"dataFields": {
|
||||
@@ -313,9 +313,7 @@ export class DespachoPrPage implements OnInit {
|
||||
|
||||
sendExpedienteToPending(){
|
||||
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.close();
|
||||
|
||||
this.goBack();
|
||||
this.toastService.successMessage('Processo enviado para pendentes')
|
||||
});
|
||||
}
|
||||
@@ -334,22 +332,22 @@ export class DespachoPrPage implements OnInit {
|
||||
cssClass: classs,
|
||||
backdropDismiss: true
|
||||
});
|
||||
|
||||
|
||||
await modal.present();
|
||||
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
console.log(res);
|
||||
if(res.data){
|
||||
|
||||
|
||||
|
||||
|
||||
const DocumentToSave = res.data.documents.map((e) => {
|
||||
return {
|
||||
ApplicationId: e.ApplicationType,
|
||||
SourceId: e.Id,
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
let docs = {
|
||||
ProcessInstanceID: "",
|
||||
Attachments: DocumentToSave,
|
||||
@@ -397,11 +395,11 @@ export class DespachoPrPage implements OnInit {
|
||||
console.log(res['data']);
|
||||
if(res['data']=='openDiscart'){
|
||||
console.log('open discart');
|
||||
|
||||
this.distartExpedientModal();
|
||||
|
||||
}
|
||||
|
||||
this.goBack();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -416,7 +414,7 @@ export class DespachoPrPage implements OnInit {
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
@@ -471,7 +469,7 @@ export class DespachoPrPage implements OnInit {
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
if(res['data']=='close'){
|
||||
@@ -480,7 +478,6 @@ export class DespachoPrPage implements OnInit {
|
||||
this.close();
|
||||
this.openMenu(); */
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -498,6 +495,6 @@ export class DespachoPrPage implements OnInit {
|
||||
});
|
||||
return await popover.present();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -29,23 +29,23 @@ export class DespachosPrPage implements OnInit {
|
||||
taskslist:DailyWorkTask[];
|
||||
despachoList:any[] = [];
|
||||
deferimentoList:DailyWorkTask[] = [];
|
||||
|
||||
|
||||
taskList:tasksList[] = [];
|
||||
|
||||
|
||||
taskType: string;
|
||||
serialNumber:string;
|
||||
totalDocs:any;
|
||||
|
||||
|
||||
profile:string;
|
||||
segment:string;
|
||||
loading = false
|
||||
|
||||
|
||||
// @Output() openExpedientDetail:EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
|
||||
loadedAttachments:any;
|
||||
dicIndex = 0;
|
||||
inicial = false
|
||||
|
||||
|
||||
loggeduser: User;
|
||||
|
||||
constructor (
|
||||
@@ -54,17 +54,17 @@ export class DespachosPrPage implements OnInit {
|
||||
private alertService: AlertService,
|
||||
private authService: AuthService,
|
||||
private router: Router,
|
||||
) {
|
||||
) {
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
this.profile = 'mdgpr';
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
//Inicializar segment
|
||||
this.segment = "despachos";
|
||||
|
||||
|
||||
const pathname = window.location.pathname
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
@@ -73,9 +73,9 @@ export class DespachosPrPage implements OnInit {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
|
||||
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
@@ -87,11 +87,11 @@ export class DespachosPrPage implements OnInit {
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/despachos-pr/despacho-pr'], navigationExtras);
|
||||
}
|
||||
|
||||
|
||||
notImplemented(){
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
|
||||
|
||||
openExpedientDetailPage(data){
|
||||
console.log(data);
|
||||
// this.openExpedientDetail.emit(data);
|
||||
@@ -100,12 +100,11 @@ export class DespachosPrPage implements OnInit {
|
||||
async LoadList() {
|
||||
|
||||
this.despachoList = new Array();
|
||||
|
||||
|
||||
this.loading = true;
|
||||
|
||||
|
||||
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,14 +114,15 @@ export class DespachosPrPage implements OnInit {
|
||||
despachosPr = result.reverse().filter(data => data.activityInstanceName == "Concluir Despacho");
|
||||
break;
|
||||
}
|
||||
despachosPr = despachosPr.filter(data => data.workflowInstanceDataFields.Status == "Active");
|
||||
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();
|
||||
|
||||
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
@@ -130,54 +130,54 @@ export class DespachosPrPage 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,
|
||||
}
|
||||
|
||||
|
||||
this.despachoList.push(task);
|
||||
console.log(this.despachoList);
|
||||
});
|
||||
console.log(this.despachoList);
|
||||
|
||||
|
||||
this.despachoList = this.sortArrayISODate(this.despachoList).reverse()
|
||||
|
||||
|
||||
this.despachoList.forEach( (element, index) => {
|
||||
// let aplicationId = element.workflowInstanceDataFields.SourceSecFsID;
|
||||
let FolderID = element['FolderID'];
|
||||
|
||||
|
||||
this.processes.GetDocumentDetails(FolderID, '361').subscribe(res=>{
|
||||
element.DocumentsQty = res.DocumentsTotal
|
||||
})
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
this.loading = false;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
sortArrayISODate(myArray: any) {
|
||||
return myArray.sort(function(a, b) {
|
||||
return (a.CreateDate < b.CreateDate) ? -1 : ((a.CreateDate > b.CreateDate) ? 1 : 0);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
doRefresh(event) {
|
||||
this.LoadList();
|
||||
event.target.complete();
|
||||
}
|
||||
|
||||
|
||||
async viewExpedientDetail(serialNumber:any) {
|
||||
console.log(this.profile);
|
||||
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop'
|
||||
}
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: DespachoPage,
|
||||
componentProps:{
|
||||
@@ -193,7 +193,7 @@ export class DespachosPrPage implements OnInit {
|
||||
this.LoadList();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// old
|
||||
async openExpedientActionsModal(taskAction: any, task: any) {
|
||||
//this.modalController.dismiss();
|
||||
@@ -203,21 +203,21 @@ export class DespachosPrPage implements OnInit {
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
|
||||
|
||||
const doc = this.loadedAttachments[ this.dicIndex];
|
||||
|
||||
|
||||
task = {
|
||||
serialNumber: doc.SourceId,
|
||||
taskStartDate: doc.CreateDate,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: doc.ApplicationId,
|
||||
FsId: doc.ApplicationId,
|
||||
FolderID: null,
|
||||
DocId: doc.SourceId,
|
||||
DocId: doc.SourceId,
|
||||
Subject: doc.SourceName
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ExpedientTaskModalPage,
|
||||
componentProps: {
|
||||
@@ -232,11 +232,11 @@ export class DespachosPrPage implements OnInit {
|
||||
console.log(res['data']);
|
||||
if(res['data']=='openDiscart'){
|
||||
console.log('open discart');
|
||||
|
||||
|
||||
// this.distartExpedientModal();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -249,13 +249,13 @@ export class DespachosPrPage 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'
|
||||
@@ -280,7 +280,7 @@ export class DespachosPrPage implements OnInit {
|
||||
const doc = this.taskList[ this.dicIndex];
|
||||
|
||||
console.log(doc, this.dicIndex, this.taskList)
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
@@ -291,16 +291,16 @@ export class DespachosPrPage implements OnInit {
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
if(res['data']=='close'){
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
docIndex(index: number) {
|
||||
this.dicIndex = index;
|
||||
}
|
||||
@@ -308,5 +308,5 @@ export class DespachosPrPage implements OnInit {
|
||||
goBack() {
|
||||
this.router.navigate(['/home/gabinete-digital']);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ export class DespachoPage implements OnInit {
|
||||
private router: Router,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
) {
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
if(params["params"].SerialNumber) {
|
||||
this.serialnumber = params["params"].SerialNumber;
|
||||
@@ -83,7 +83,7 @@ export class DespachoPage implements OnInit {
|
||||
if(this.task.Status == "Pending" && this.caller == 'gabinete-digital'){
|
||||
if (window.innerWidth < 801) {
|
||||
this.router.navigate(['/home/gabinete-digital/pendentes']);
|
||||
}
|
||||
}
|
||||
else {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
@@ -177,8 +177,8 @@ export class DespachoPage implements OnInit {
|
||||
}
|
||||
|
||||
async executado(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Conhecimento",
|
||||
"ActionTypeId": 104,
|
||||
"dataFields": {
|
||||
@@ -202,8 +202,8 @@ export class DespachoPage implements OnInit {
|
||||
}
|
||||
|
||||
async arquivar(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Arquivo",
|
||||
"ActionTypeId": 95,
|
||||
"dataFields": {
|
||||
@@ -227,8 +227,8 @@ export class DespachoPage implements OnInit {
|
||||
}
|
||||
|
||||
async reencaminhar(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Reencaminhar",
|
||||
"ActionTypeId": 98,
|
||||
"dataFields": {
|
||||
@@ -240,7 +240,7 @@ export class DespachoPage implements OnInit {
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService.successMessage()
|
||||
this.close();
|
||||
} catch (error) {
|
||||
@@ -253,8 +253,8 @@ export class DespachoPage implements OnInit {
|
||||
}
|
||||
|
||||
async reexecute(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Reexecução",
|
||||
"ActionTypeId": 100000010,
|
||||
"dataFields": {
|
||||
@@ -266,7 +266,7 @@ export class DespachoPage implements OnInit {
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService.successMessage()
|
||||
this.close();
|
||||
|
||||
@@ -281,7 +281,7 @@ export class DespachoPage implements OnInit {
|
||||
|
||||
async sendExpedienteToPending() {
|
||||
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
|
||||
this.close();
|
||||
this.goBack();
|
||||
this.toastService.successMessage('Processo enviado para despacho')
|
||||
},
|
||||
error => {
|
||||
@@ -303,9 +303,9 @@ export class DespachoPage implements OnInit {
|
||||
cssClass: classs,
|
||||
backdropDismiss: true
|
||||
});
|
||||
|
||||
|
||||
await modal.present();
|
||||
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
if(res.data){
|
||||
|
||||
@@ -315,7 +315,7 @@ export class DespachoPage implements OnInit {
|
||||
SourceId: e.Id,
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
let docs = {
|
||||
ProcessInstanceID: "",
|
||||
Attachments: DocumentToSave,
|
||||
@@ -327,9 +327,11 @@ export class DespachoPage implements OnInit {
|
||||
}
|
||||
else if(actionName == 'Arquivar'){
|
||||
this.arquivar(res.data.note, docs);
|
||||
this.goBack();
|
||||
}
|
||||
else if(actionName == 'Reexecução'){
|
||||
this.reexecute(res.data.note, docs);
|
||||
this.goBack();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -358,6 +360,7 @@ export class DespachoPage implements OnInit {
|
||||
if(res['data']=='openDiscart'){
|
||||
this.distartExpedientModal();
|
||||
}
|
||||
this.goBack();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -413,7 +416,7 @@ export class DespachoPage implements OnInit {
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
if(res['data']=='close'){
|
||||
@@ -422,12 +425,12 @@ export class DespachoPage implements OnInit {
|
||||
this.close();
|
||||
this.openMenu(); */
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
async openOptions(taskAction?: any) {
|
||||
|
||||
|
||||
const popover = await this.popoverController.create({
|
||||
component: DespachosOptionsPage,
|
||||
cssClass: 'exp-options',
|
||||
@@ -441,5 +444,5 @@ export class DespachoPage implements OnInit {
|
||||
});
|
||||
return await popover.present();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+12
-11
@@ -76,7 +76,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
if(this.task.Status == "Pending" && this.caller != 'events'){
|
||||
if (window.innerWidth <= 800) {
|
||||
this.router.navigate(['/home/gabinete-digital/pendentes']);
|
||||
}
|
||||
}
|
||||
else {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
@@ -92,7 +92,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
case 'events':
|
||||
this.router.navigate(['/home',params["params"].caller]);
|
||||
break;
|
||||
|
||||
|
||||
case 'gabinete-digital':
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
@@ -105,7 +105,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -161,7 +161,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
console.log('this.task.DocumentURL', this.task.DocumentURL)
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -184,10 +184,10 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
viewDocument() {
|
||||
this.processes.GetDocumentUrl(this.task.DocId, this.task.FsId).subscribe(res=>{
|
||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
|
||||
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
browser.show();
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -218,6 +218,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
}
|
||||
else{
|
||||
console.log('Not open');
|
||||
this.goBack();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -230,7 +231,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then( async (res)=>{
|
||||
console.log(res['data']);
|
||||
@@ -248,7 +249,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
try {
|
||||
await this.processes.CompleteTask(otherbody).toPromise()
|
||||
this.toastService.successMessage('Processo descartado');
|
||||
this.goBack();
|
||||
@@ -266,7 +267,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
else{
|
||||
if(res['data']== 'Yes'){
|
||||
const loader = this.toastService.loading()
|
||||
try {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.toastService.successMessage('Processo descartado');
|
||||
this.goBack();
|
||||
@@ -297,7 +298,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
|
||||
async openBookMeetingModal(task: any) {
|
||||
console.log(task);
|
||||
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
@@ -338,7 +339,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
async openOptions(taskAction?: any) {
|
||||
const popover = await this.popoverController.create({
|
||||
|
||||
@@ -56,12 +56,12 @@ export class PedidoPage implements OnInit {
|
||||
public popoverController: PopoverController,
|
||||
authService: AuthService,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,) {
|
||||
private toastService: ToastService,) {
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
|
||||
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
console.log(params["params"]);
|
||||
|
||||
|
||||
if(params["params"].SerialNumber) {
|
||||
this.serialnumber = params["params"].SerialNumber;
|
||||
}
|
||||
@@ -88,7 +88,7 @@ export class PedidoPage implements OnInit {
|
||||
this.fulltask = await this.processes.GetTask(this.serialnumber).toPromise();
|
||||
this.processes.GetTask(this.serialnumber).subscribe(res => {
|
||||
console.log(res);
|
||||
|
||||
|
||||
if(res.workflowDisplayName == 'Pedido de Parecer' || res.workflowDisplayName == 'Pedido de Parecer do Presidente'){
|
||||
|
||||
let date = new Date(res.taskStartDate);
|
||||
@@ -190,8 +190,8 @@ export class PedidoPage implements OnInit {
|
||||
}
|
||||
|
||||
async repreciar(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Reapreciação",
|
||||
"ActionTypeId": 100000009,
|
||||
"dataFields": {
|
||||
@@ -202,10 +202,10 @@ export class PedidoPage implements OnInit {
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
|
||||
this.toastService.successMessage()
|
||||
|
||||
this.toastService.successMessage()
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
@@ -213,10 +213,10 @@ export class PedidoPage implements OnInit {
|
||||
loader.remove()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async arquivar(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Arquivo",
|
||||
"ActionTypeId": 95,
|
||||
"dataFields": {
|
||||
@@ -227,9 +227,9 @@ export class PedidoPage implements OnInit {
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService.successMessage('Processo arquivado')
|
||||
this.toastService.successMessage('Processo arquivado')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
@@ -240,8 +240,8 @@ export class PedidoPage implements OnInit {
|
||||
}
|
||||
|
||||
async assignar(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Reencaminhar",
|
||||
"ActionTypeId": 98,
|
||||
"dataFields": {
|
||||
@@ -252,16 +252,16 @@ export class PedidoPage implements OnInit {
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService.successMessage('Processo arquivado')
|
||||
this.toastService.successMessage('Processo arquivado')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
sendExpedienteToPending() {
|
||||
@@ -271,7 +271,7 @@ export class PedidoPage implements OnInit {
|
||||
}
|
||||
|
||||
async openExpedientActionsModal(taskAction: any, task: any) {
|
||||
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800) {
|
||||
classs = 'modal modal-desktop'
|
||||
@@ -340,7 +340,7 @@ export class PedidoPage implements OnInit {
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
if(res['data']=='close'){
|
||||
@@ -349,13 +349,13 @@ export class PedidoPage implements OnInit {
|
||||
this.close();
|
||||
this.openMenu(); */
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
async openDelegarModal(task: any) {
|
||||
console.log(task);
|
||||
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
@@ -376,7 +376,7 @@ export class PedidoPage implements OnInit {
|
||||
|
||||
async openForwardModal(task: any) {
|
||||
console.log(task);
|
||||
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
@@ -397,7 +397,7 @@ export class PedidoPage implements OnInit {
|
||||
|
||||
async openDarParecer(task: any) {
|
||||
console.log(task);
|
||||
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
@@ -414,7 +414,9 @@ export class PedidoPage implements OnInit {
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
this.goBack();
|
||||
});
|
||||
}
|
||||
|
||||
async openAddNoteModal(actionName:string) {
|
||||
@@ -431,10 +433,10 @@ export class PedidoPage implements OnInit {
|
||||
cssClass: classs,
|
||||
backdropDismiss: true
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
await modal.present();
|
||||
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
const DocumentToSave = res.data.documents.map((e) => {
|
||||
return {
|
||||
@@ -449,11 +451,12 @@ export class PedidoPage implements OnInit {
|
||||
|
||||
if(res.data){
|
||||
if(actionName == 'Solicitar Reapreciação') {
|
||||
|
||||
this.repreciar(res.data.note, docs);
|
||||
this.goBack();
|
||||
}
|
||||
else if(actionName == 'Arquivar'){
|
||||
this.arquivar(res.data.note, docs);
|
||||
this.goBack();
|
||||
}
|
||||
else if(actionName == 'Assignar'){
|
||||
this.assignar(res.data.note, docs);
|
||||
@@ -461,12 +464,12 @@ export class PedidoPage implements OnInit {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
goBack() {
|
||||
if(this.task.Status == "Pending" && this.caller == 'gabinete-digital'){
|
||||
if (window.innerWidth <= 800) {
|
||||
this.router.navigate(['/home/gabinete-digital/pendentes']);
|
||||
}
|
||||
}
|
||||
else {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
@@ -479,7 +482,7 @@ export class PedidoPage implements OnInit {
|
||||
else{
|
||||
if (window.innerWidth <= 800) {
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos']);
|
||||
}
|
||||
}
|
||||
else {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
@@ -490,5 +493,5 @@ export class PedidoPage implements OnInit {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ constructor (
|
||||
ngOnInit() {
|
||||
//Inicializar segment
|
||||
this.segment = "despachos";
|
||||
this.LoadList();
|
||||
this.refreshing();
|
||||
|
||||
const pathname = window.location.pathname
|
||||
this.router.events.forEach((event) => {
|
||||
@@ -113,6 +113,8 @@ goToDespachoPr(serialNumber:any){
|
||||
despachosPr = result.reverse().filter(data => data.activityInstanceName == "Concluir Despacho");
|
||||
break;
|
||||
}
|
||||
|
||||
despachosPr = despachosPr.filter(data => data.workflowInstanceDataFields.Status == "Active");
|
||||
console.log(despachosPr);
|
||||
|
||||
despachosPr.forEach( (element, index) => {
|
||||
@@ -128,7 +130,7 @@ goToDespachoPr(serialNumber:any){
|
||||
"CreateDate": taskDate,
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": 0,
|
||||
"DocumentsQty": element.totalDocuments,
|
||||
"DocId": element.workflowInstanceDataFields.DispatchDocID,
|
||||
"FolderID": element.workflowInstanceDataFields.FolderID,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
@@ -137,22 +139,10 @@ goToDespachoPr(serialNumber:any){
|
||||
}
|
||||
|
||||
this.despachoList.push(task);
|
||||
console.log(this.despachoList);
|
||||
});
|
||||
console.log(this.despachoList);
|
||||
|
||||
this.despachoList = this.sortArrayISODate(this.despachoList).reverse()
|
||||
|
||||
this.despachoList.forEach( (element, index) => {
|
||||
// let aplicationId = element.workflowInstanceDataFields.SourceSecFsID;
|
||||
let FolderID = element['FolderID'];
|
||||
|
||||
this.processes.GetDocumentDetails(FolderID, '361').subscribe(res=>{
|
||||
element.DocumentsQty = res.DocumentsTotal
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
this.loading = false;
|
||||
|
||||
}
|
||||
@@ -163,6 +153,12 @@ goToDespachoPr(serialNumber:any){
|
||||
});
|
||||
}
|
||||
|
||||
refreshing(){
|
||||
setTimeout(() => {
|
||||
this.LoadList();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
doRefresh() {
|
||||
this.LoadList();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user