mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Fix merge
This commit is contained in:
@@ -192,7 +192,7 @@ export class CreateProcessPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.postDespatcho(this.postData).toPromise();
|
||||
this.FinalizarDespacho();
|
||||
this.FinalizarDespacho('Despacho criado');
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
}
|
||||
@@ -211,8 +211,7 @@ export class CreateProcessPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.postParecer(this.postData).toPromise();
|
||||
|
||||
this.FinalizarParecer('Pedido de Parecer criado');
|
||||
this.FinalizarParecer('Pedido de Parecer enviado');
|
||||
}
|
||||
catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
@@ -232,7 +231,7 @@ export class CreateProcessPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.postDeferimento(this.postData).toPromise();
|
||||
this.executado('Pedido de Deferimento criado');
|
||||
this.FinalizarDeferimento('Pedido de deferimento enviado');
|
||||
}
|
||||
catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
@@ -348,17 +347,18 @@ export class CreateProcessPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.toastService.successMessage('');
|
||||
this.toastService.successMessage(message);
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
}
|
||||
}
|
||||
|
||||
async FinalizarDespacho() {
|
||||
|
||||
async FinalizarDespacho(message?) {
|
||||
|
||||
let body;
|
||||
|
||||
if(this.task.activityInstanceName =='Tarefa de Despacho' || this.task.activityInstanceName =='Reexecutar Despacho') {
|
||||
if(this.task.activityInstanceName =='Tarefa de Despacho' ||
|
||||
this.task.activityInstanceName =='Reexecutar Despacho') {
|
||||
|
||||
body = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
@@ -370,7 +370,11 @@ export class CreateProcessPage implements OnInit {
|
||||
"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,
|
||||
@@ -381,12 +385,12 @@ export class CreateProcessPage implements OnInit {
|
||||
},
|
||||
"AttachmentList" :null,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
console.log(body);
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.toastService.successMessage('');
|
||||
this.toastService.successMessage(message);
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
}
|
||||
@@ -394,16 +398,32 @@ export class CreateProcessPage implements OnInit {
|
||||
}
|
||||
|
||||
async FinalizarParecer(message?) {
|
||||
let body = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
"action": "Parecer",
|
||||
"ActionTypeId": 96,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": '',
|
||||
},
|
||||
"AttachmentList" :null,
|
||||
}
|
||||
let body;
|
||||
|
||||
if(this.task.activityInstanceName =='Concluir Deferimento' ||
|
||||
this.task.activityInstanceName =='Reapreciar Deferimento'
|
||||
){
|
||||
body = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
"action": "Parecer",
|
||||
"ActionTypeId": 92,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": message,
|
||||
},
|
||||
"AttachmentList" :null,
|
||||
}
|
||||
}
|
||||
else{
|
||||
body = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
"action": "Parecer",
|
||||
"ActionTypeId": 96,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": message,
|
||||
},
|
||||
"AttachmentList" :null,
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
@@ -413,6 +433,26 @@ export class CreateProcessPage implements OnInit {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async FinalizarDeferimento(message?){
|
||||
if(this.task.activityInstanceName =='Reapreciar Deferimento'){
|
||||
let body = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
"action": "Parecer",
|
||||
"ActionTypeId": 92,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": '',
|
||||
},
|
||||
"AttachmentList" :null,
|
||||
}
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.toastService.successMessage(message)
|
||||
} catch (e) {
|
||||
this.toastService.badRequest()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async addParticipants() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user