mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
add despacho ppresidencial
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks]) && task.Status != 'Pending'" (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
<div class="buttons px-20" *ngIf="task.activityInstanceName == 'Concluir Despacho'">
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openAddNoteModal('Concluido')" class="btn-cancel" shape="round" >Marcar como Concluído</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openAddNoteModal('Executado1')" class="btn-cancel" shape="round" >Marcar como Concluído</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openAddNoteModal('Reexecutar')" class="btn-cancel" shape="round" >Enviar para Reexecução</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks]) && task.Status != 'Pending'" (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
|
||||
@@ -278,6 +278,32 @@ export class DespachoPrPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
async executadoPR(note: string, documents: any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Executado",
|
||||
"ActionTypeId": 95,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList": documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.httpErroHandle.httpsSucessMessagge('Executado')
|
||||
this.TaskService.loadDiplomas()
|
||||
} catch (error) {
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async arquivar(note: string, documents: any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
@@ -447,6 +473,8 @@ export class DespachoPrPage implements OnInit {
|
||||
}
|
||||
else if (actionName == 'Reexecutar') {
|
||||
await this.reexecutar(res.data.note, docs);
|
||||
} else if (actionName == 'Executado1') {
|
||||
await this.executadoPR(res.data.note, docs)
|
||||
}
|
||||
|
||||
this.TaskService.loadDiplomas()
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</div>
|
||||
<div *ngIf="task && p.userRole(['PR'])" class="d-flex width-100">
|
||||
<div class="flex-grow-1">
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openAddNoteModal('Concluido')" class="btn-cancel" shape="round" >Marcar como Concluído</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openAddNoteModal('Executado1')" class="btn-cancel" shape="round" >Marcar como Concluído</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks]) && task.Status != 'Pending'" (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
|
||||
@@ -54,7 +54,7 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params["serialNumber"]) {
|
||||
this.serialNumber = params["serialNumber"];
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@@ -91,9 +91,9 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then( (res)=> {
|
||||
|
||||
|
||||
if(res['data']=='openDiscart') {
|
||||
|
||||
|
||||
|
||||
this.distartExpedientModal();
|
||||
|
||||
@@ -113,7 +113,7 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
sendExpedienteToPending() {
|
||||
const loader = this.toastService.loading()
|
||||
this.processes.SetTaskToPending(this.serialNumber).subscribe(res=>{
|
||||
|
||||
|
||||
this.httpErroHandle.httpsSucessMessagge('Enviar para Pendentes')
|
||||
this.popoverController.dismiss('close')
|
||||
loader.remove()
|
||||
@@ -122,7 +122,7 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
}
|
||||
});
|
||||
@@ -130,7 +130,7 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
|
||||
async distartExpedientModal() {
|
||||
this.popoverController.dismiss();
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
@@ -145,7 +145,7 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
modal.onDidDismiss().then(res=>{
|
||||
if(res['data']=='close'){
|
||||
this.close();
|
||||
/*
|
||||
/*
|
||||
this.close();
|
||||
this.openMenu(); */
|
||||
}
|
||||
@@ -241,7 +241,7 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
} finally {
|
||||
@@ -269,7 +269,7 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then(async (res) => {
|
||||
|
||||
|
||||
if(res.data){
|
||||
|
||||
|
||||
@@ -300,6 +300,8 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
}
|
||||
else if(actionName == 'Concluido') {
|
||||
await this.concluir(res.data.note, docs);
|
||||
} else if (actionName == 'Executado1') {
|
||||
await this.executadoPR(res.data.note, docs)
|
||||
}
|
||||
|
||||
this.goBack();
|
||||
@@ -333,7 +335,7 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
}
|
||||
@@ -395,6 +397,33 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
// Pr dispacho criado por mim, tarefa de concluir despacho saida Marcar como concluida
|
||||
async executadoPR(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Executado",
|
||||
"ActionTypeId": 95,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.httpErroHandle.httpsSucessMessagge('Executado')
|
||||
this.close();
|
||||
this.toastService.successMessage()
|
||||
} catch(error) {
|
||||
this.toastService.badRequest()
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
async reexecutar(note:string, documents:any){
|
||||
let body = {
|
||||
|
||||
Reference in New Issue
Block a user