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:
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { NavigationExtras, Router } from '@angular/router';
|
||||
import { AlertController, AnimationController, ModalController, NavParams } from '@ionic/angular';
|
||||
import { Event } from 'src/app/models/event.model'
|
||||
import { EventBody } from 'src/app/models/eventbody.model';
|
||||
@@ -78,6 +78,19 @@ export class ForwardPage implements OnInit {
|
||||
cancelTask() {
|
||||
this.modalController.dismiss(null);
|
||||
}
|
||||
goBack() {
|
||||
this.modalController.dismiss(null);
|
||||
if (window.innerWidth <= 800) {
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos']);
|
||||
} else {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"pedidos": true,
|
||||
}
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
}
|
||||
|
||||
async assignar(note:string, documents:any) {
|
||||
let body = {
|
||||
@@ -112,11 +125,17 @@ export class ForwardPage implements OnInit {
|
||||
this.toastService.badRequest("Selecione apenas um destinatário");
|
||||
}
|
||||
else {
|
||||
|
||||
let attendees: any = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||
attendees = attendees.map(function(val) {
|
||||
return {
|
||||
UserEmail: val.EmailAddress,
|
||||
UserType: val.IsRequired?"I": "CC"
|
||||
};
|
||||
});
|
||||
|
||||
let body = {
|
||||
"usersSelected": this.taskParticipants,
|
||||
"distributionType": "paralelo",
|
||||
"priority": 0,
|
||||
"countryCode": "string",
|
||||
"usersSelected": attendees,
|
||||
"serialNumber": this.task.SerialNumber,
|
||||
"action": "Reencaminhar",
|
||||
"actionTypeId": 98,
|
||||
@@ -127,9 +146,10 @@ export class ForwardPage implements OnInit {
|
||||
"AttachmentList" :docs,
|
||||
}
|
||||
console.log(body);
|
||||
this.processes.DelegateTask(body).subscribe(res=>{
|
||||
this.processes.CompleteParecerPrTask(body).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.toastService.successMessage('Processo delegado')
|
||||
this.toastService.successMessage('Processo delegado');
|
||||
this.goBack();
|
||||
},
|
||||
(error)=>{
|
||||
this.toastService.badRequest("Processo não delegado")
|
||||
|
||||
Reference in New Issue
Block a user