action verification added to pedido details

This commit is contained in:
Eudes Inácio
2023-02-06 17:11:30 +01:00
parent 9c3cdf2ac5
commit f2e95cc8b6
5 changed files with 24 additions and 11 deletions
@@ -153,9 +153,9 @@
</div>
<div *ngIf="task.WorkflowName == 'Pedido de Parecer' || task.WorkflowName == 'Pedido de Parecer do Presidente'">
<div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Parecer'">
<button (click)="openDarParecer(task)" class="btn-cancel" shape="round" >Dar o meu Parecer</button>
<button *ngIf="checkStringInArray('Registar')" (click)="openDarParecer(task)" class="btn-cancel" shape="round" >Dar o meu Parecer</button>
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button *ngIf="task.WorkflowName == 'Pedido de Parecer do Presidente'" (click)="openForwardModal(task)" class="btn-cancel" shape="round" >Reencaminhar</button>
<button *ngIf="task.WorkflowName == 'Pedido de Parecer do Presidente' && checkStringInArray('Reencaminhar')" (click)="openForwardModal(task)" class="btn-cancel" shape="round" >Reencaminhar</button>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
</div>
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Parecer'">
@@ -50,6 +50,7 @@ export class PedidoPage implements OnInit {
intervenientes: any = []
cc: any = [];
loggeduser: LoginUserRespose;
taskArrayActions = [];
constructor(private activatedRoute: ActivatedRoute,
private processes: ProcessesService,
@@ -113,6 +114,7 @@ export class PedidoPage implements OnInit {
date.setMonth(date.getMonth() + 1);
let taskDate = date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
this.taskArrayActions = res.actions
this.task = {
"SerialNumber": res.serialNumber,
"Folio": res.workflowInstanceDataFields.Subject,
@@ -190,6 +192,10 @@ export class PedidoPage implements OnInit {
});
}
checkStringInArray(str) {
return this.taskArrayActions.includes(str);
}
updateProcess(res) {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
} else {
@@ -339,7 +345,8 @@ export class PedidoPage implements OnInit {
serialNumber: this.task.SerialNumber,
fulltask: this.fulltask,
taskAction: taskAction,
showEnviarPendentes: false
showEnviarPendentes: false,
actions: this.taskArrayActions
},
translucent: true
});