add despacho ppresidencial

This commit is contained in:
Peter Maquiran
2025-01-15 11:49:57 +01:00
parent 6e84945cfd
commit 715615a445
5 changed files with 75 additions and 18 deletions
@@ -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 = {
+6 -6
View File
@@ -1,11 +1,11 @@
export let versionData = {
"shortSHA": "33401c37d",
"SHA": "33401c37d0bf8b52941826a8703a80d9c651f8ea",
"shortSHA": "6e84945cf",
"SHA": "6e84945cfd926ef723519cdaafc60b3bf0913110",
"branch": "feature/login-v2",
"lastCommitAuthor": "'Peter Maquiran'",
"lastCommitTime": "'Tue Jan 14 14:56:57 2025 +0100'",
"lastCommitMessage": "fixslow send",
"lastCommitNumber": "6137",
"changeStatus": "On branch feature/login-v2\nYour branch is ahead of 'origin/feature/login-v2' by 2 commits.\n (use \"git push\" to publish your local commits)\n\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/core/chat/usecase/room/room-get-list-use-case.service.ts\n\tmodified: version/git-version.ts",
"lastCommitTime": "'Tue Jan 14 15:16:29 2025 +0100'",
"lastCommitMessage": "fix message",
"lastCommitNumber": "6138",
"changeStatus": "On branch feature/login-v2\nYour branch is ahead of 'origin/feature/login-v2' by 3 commits.\n (use \"git push\" to publish your local commits)\n\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.html\n\tmodified: src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts\n\tmodified: src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.html\n\tmodified: src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.ts",
"changeAuthor": "peter.maquiran"
}