mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Improve aparecer
This commit is contained in:
@@ -197,11 +197,10 @@ export class CreateProcessPage implements OnInit {
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
console.log('this.postData', this.postData, this.taskType);
|
||||
|
||||
|
||||
try {
|
||||
await this.processes.postDespatcho(this.postData).toPromise();
|
||||
this.FinalizarDespacho();
|
||||
this.toastService.successMessage('Despacho criado');
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
}
|
||||
@@ -270,11 +269,12 @@ export class CreateProcessPage implements OnInit {
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
console.log('this.postData', this.postData, this.taskType);
|
||||
|
||||
|
||||
alert('nice !!')
|
||||
try {
|
||||
await this.processes.postDespatcho(this.postData).toPromise();
|
||||
// await this.processes.postDespatcho(this.postData).toPromise();
|
||||
this.executado();
|
||||
this.toastService.successMessage('Despacho criado');
|
||||
// this.toastService.successMessage('Despacho criado');
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
}
|
||||
@@ -344,8 +344,11 @@ export class CreateProcessPage implements OnInit {
|
||||
|
||||
async FinalizarDespacho() {
|
||||
|
||||
if(this.task.activityInstanceName =='Tarefa de Despacho' || this.task.activityInstanceName =='Reexecutar Despacho'){
|
||||
let body = {
|
||||
let body;
|
||||
|
||||
if(this.task.activityInstanceName =='Tarefa de Despacho' || this.task.activityInstanceName =='Reexecutar Despacho') {
|
||||
|
||||
body = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
"action": "Conhecimento",
|
||||
"ActionTypeId": 104,
|
||||
@@ -354,10 +357,10 @@ export class CreateProcessPage implements OnInit {
|
||||
},
|
||||
"AttachmentList" :null,
|
||||
}
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
}
|
||||
else if(this.task.activityInstanceName =='Concluir Despacho'){
|
||||
let body = {
|
||||
else if(this.task.activityInstanceName =='Concluir Despacho' || this.task.activityInstanceName == 'Concluir Parecer') {
|
||||
|
||||
body = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
"action": "Despacho",
|
||||
"ActionTypeId": 94,
|
||||
@@ -366,8 +369,16 @@ export class CreateProcessPage implements OnInit {
|
||||
},
|
||||
"AttachmentList" :null,
|
||||
}
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.toastService.successMessage('');
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async FinalizarParecer() {
|
||||
|
||||
Reference in New Issue
Block a user