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:
@@ -65,7 +65,7 @@
|
||||
<div class="list-people">
|
||||
<ion-item lines="none">
|
||||
<ion-list>
|
||||
<ion-label *ngIf="taskParticipants.length == 0" class="list-people-title">Adicionar intervenientes</ion-label>
|
||||
<ion-label *ngIf="taskParticipants.length < 1" class="list-people-title">Adicionar intervenientes</ion-label>
|
||||
<ion-label *ngFor="let participant of taskParticipants">{{participant.Name}}</ion-label>
|
||||
</ion-list>
|
||||
</ion-item>
|
||||
|
||||
@@ -199,9 +199,9 @@ export class CreateProcessPage implements OnInit {
|
||||
console.log('this.postData', this.postData, this.taskType);
|
||||
|
||||
try {
|
||||
//await this.processes.postDespatcho(this.postData).toPromise();
|
||||
await this.processes.postDespatcho(this.postData).toPromise();
|
||||
this.FinalizarDespacho();
|
||||
this.toastService.badRequest('Despacho criado');
|
||||
this.toastService.successMessage('Despacho criado');
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não efectuado');
|
||||
}
|
||||
@@ -220,6 +220,7 @@ export class CreateProcessPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.postParecer(this.postData).toPromise();
|
||||
|
||||
this.FinalizarParecer();
|
||||
this.toastService.successMessage('Pedido de Parecer criado');
|
||||
}
|
||||
@@ -342,23 +343,38 @@ export class CreateProcessPage implements OnInit {
|
||||
}
|
||||
|
||||
async FinalizarDespacho() {
|
||||
let body = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
"action": "Despacho",
|
||||
"ActionTypeId": 94,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": '',
|
||||
},
|
||||
"AttachmentList" :null,
|
||||
}
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
|
||||
if(this.task.activityInstanceName =='Tarefa de Despacho' || this.task.activityInstanceName =='Reexecutar Despacho'){
|
||||
let body = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
"action": "Conhecimento",
|
||||
"ActionTypeId": 104,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": '',
|
||||
},
|
||||
"AttachmentList" :null,
|
||||
}
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
}
|
||||
else if(this.task.activityInstanceName =='Concluir Despacho'){
|
||||
let body = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
"action": "Despacho",
|
||||
"ActionTypeId": 94,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": '',
|
||||
},
|
||||
"AttachmentList" :null,
|
||||
}
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
}
|
||||
}
|
||||
|
||||
async FinalizarParecer() {
|
||||
let body = {
|
||||
"serialNumber": this.task.serialNumber,
|
||||
"action": "Parecer",
|
||||
"ActionTypeId": 92,
|
||||
"ActionTypeId": 96,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": '',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user