This commit is contained in:
tiago.kayaya
2021-06-17 09:55:19 +01:00
parent d18030dbc3
commit 1aa0337036
2 changed files with 22 additions and 1 deletions
@@ -107,6 +107,7 @@
<div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Parecer'">
<button (click)="openDarParecer(task)" class="btn-cancel" shape="round" >Dar o meu Parecer</button>
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button *ngIf="task.WorkflowName == 'Pedido de Parecer do Presidente'" (click)="openAddNoteModal('Assignar')" class="btn-cancel" shape="round" >Reencaminhar</button>
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
</div>
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Parecer'">
@@ -228,9 +228,26 @@ export class PedidoPage implements OnInit {
} catch (error) {
this.toastService.badRequest()
}
}
async assignar(note:string, documents:any) {
let body = {
"serialNumber": this.serialnumber,
"action": "Reencaminhar",
"ActionTypeId": 98,
"dataFields": {
"ReviewUserComment": note,
},
"AttachmentList" :documents,
}
try {
await this.processes.CompleteTask(body).toPromise()
this.toastService.successMessage('Processo arquivado')
this.close();
} catch (error) {
this.toastService.badRequest()
}
}
sendExpedienteToPending(){
@@ -404,6 +421,9 @@ export class PedidoPage implements OnInit {
else if(actionName == 'Arquivar'){
this.arquivar(res.data.note, docs);
}
else if(actionName == 'Assignar'){
this.assignar(res.data.note, docs);
}
}
});
}