mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
improvements in pedidos
This commit is contained in:
@@ -162,7 +162,7 @@ export class DespachoPage implements OnInit {
|
||||
"dataFields": {
|
||||
"ReviewUserComent": note,
|
||||
},
|
||||
"AttachmentList" :null,
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
this.processes.CompleteTask(body);
|
||||
this.close();
|
||||
@@ -175,7 +175,7 @@ export class DespachoPage implements OnInit {
|
||||
"dataFields": {
|
||||
"ReviewUserComent": note,
|
||||
},
|
||||
"AttachmentList" :null,
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
this.processes.CompleteTask(body);
|
||||
this.close();
|
||||
|
||||
@@ -96,7 +96,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
else if(params["pedidos"]) {
|
||||
console.log(params["pedidos"]);
|
||||
|
||||
this.openPedidosPage("MDGPR");
|
||||
this.openPedidosPage('parecer');
|
||||
this.selectedElement='RequestsForOpinion'
|
||||
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<div class="upper-content">
|
||||
<div class="content-details">
|
||||
<ion-label>
|
||||
<p><span class="date">{{customDate}}</span><span class="label">{{ task.WorkflowName }}</span></p>
|
||||
<p><span class="date">{{customDate}}</span><span class="label">{{ task.activityInstanceName }}</span></p>
|
||||
<p><span class="color-red">{{ task.DeadlineType }}</span></p>
|
||||
</ion-label>
|
||||
</div>
|
||||
@@ -72,19 +72,51 @@
|
||||
</div>
|
||||
|
||||
<div *ngIf="task" class="aside-right flex-column height-100">
|
||||
<div class="buttons" *ngIf="task.WorkflowName == 'Pedido de Deferimento'">
|
||||
<button (click)="arquivar()" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efectuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
<div *ngIf="task.WorkflowName == 'Pedido de Deferimento'">
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Deferimento'">
|
||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efectuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Reapreciar Deferimento'">
|
||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efectuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Deferimento'">
|
||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efectuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button (click)="openAddNoteModal('Solicitar Reapreciação')" class="btn-cancel" shape="round" >Solicitar Reapreciação</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="buttons" *ngIf="task.WorkflowName == 'Pedido 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 (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
<div *ngIf="task.WorkflowName == 'Pedido de Parecer'">
|
||||
<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 (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Parecer'">
|
||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efectuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-m
|
||||
import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page';
|
||||
import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
|
||||
import { DarParecerPage } from 'src/app/modals/dar-parecer/dar-parecer.page';
|
||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-pedido',
|
||||
@@ -60,7 +61,6 @@ export class PedidoPage implements OnInit {
|
||||
console.log(this.serialnumber);
|
||||
|
||||
this.LoadTaskDetail(this.serialnumber);
|
||||
this.LoadRelatedEvents(this.serialnumber);
|
||||
}
|
||||
|
||||
goBack(){
|
||||
@@ -98,6 +98,7 @@ export class PedidoPage implements OnInit {
|
||||
"WorkflowName": res.workflowDisplayName,
|
||||
"DeadlineType": res.workflowInstanceDataFields.DeadlineType,
|
||||
"ProcessInstanceID": res.workflowInstanceDataFields.InstanceID,
|
||||
"activityInstanceName": res.activityInstanceName,
|
||||
}
|
||||
}
|
||||
else if(res.workflowDisplayName == 'Pedido de Deferimento'){
|
||||
@@ -115,6 +116,7 @@ export class PedidoPage implements OnInit {
|
||||
"WorkflowName": res.workflowDisplayName,
|
||||
"DeadlineType": res.workflowInstanceDataFields.DeadlineType,
|
||||
"ProcessInstanceID": res.workflowInstanceDataFields.InstanceID,
|
||||
"activityInstanceName": res.activityInstanceName,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,23 +152,6 @@ export class PedidoPage implements OnInit {
|
||||
})
|
||||
}
|
||||
|
||||
async LoadRelatedEvents(serial: string) {
|
||||
if (this.eventsList == null) {
|
||||
this.attachmentsService.getAttachmentsBySerial(serial).subscribe(res => {
|
||||
console.log(res);
|
||||
res.forEach(att => {
|
||||
if (this.eventsList == null) {
|
||||
this.eventsList = new Array();
|
||||
}
|
||||
this.events.getEvent(att.ParentId).subscribe(event => {
|
||||
this.eventsList.push(event);
|
||||
console.log(this.eventsList);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
viewDocument(docId:string){
|
||||
this.processes.GetDocumentUrl(docId, '361').subscribe(res=>{
|
||||
console.log(res);
|
||||
@@ -180,17 +165,31 @@ export class PedidoPage implements OnInit {
|
||||
this.menu.open();
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
arquivar(){
|
||||
repreciar(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Reapreciação",
|
||||
"ActionTypeId": 100000009,
|
||||
"dataFields": {
|
||||
"ReviewUserComent": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
this.processes.CompleteTask(body);
|
||||
this.close();
|
||||
}
|
||||
arquivar(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Arquivo",
|
||||
"ActionTypeId": 95,
|
||||
"dataFields": {
|
||||
"ReviewerUseComment": '',
|
||||
"ReviewUserComent": note,
|
||||
},
|
||||
"AttachmentList" :null,
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
this.processes.CompleteTask(body);
|
||||
this.close();
|
||||
}
|
||||
|
||||
sendExpedienteToPending(){
|
||||
@@ -350,5 +349,34 @@ export class PedidoPage implements OnInit {
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
async openAddNoteModal(actionName:string) {
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: AddNotePage,
|
||||
componentProps:{
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: true
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
console.log(res);
|
||||
if(res.data){
|
||||
if(actionName == 'Solicitar Reapreciação'){
|
||||
this.repreciar(res.data.note,res.data.documents);
|
||||
}
|
||||
else if(actionName == 'Arquivar'){
|
||||
this.arquivar(res.data.note,res.data.documents);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Pedidos</ion-label></div>
|
||||
<div class="theicon">
|
||||
<button class="btn-no-color" (click)="doRefresh($event)">
|
||||
<button class="btn-no-color" (click)="doRefresh()">
|
||||
<ion-icon slot="end" class="title-icon" name="reload-circle"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -46,9 +46,10 @@ export class PedidosPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.segment = 'parecer';
|
||||
//Inicializar segment
|
||||
this.segment = 'parecer';
|
||||
//this.segment = 'parecer';
|
||||
console.log(this.serialNumber);
|
||||
|
||||
this.LoadList();
|
||||
}
|
||||
segmentChanged(ev: any) {
|
||||
@@ -93,6 +94,7 @@ export class PedidosPage implements OnInit {
|
||||
"DocumentsQty": 0,
|
||||
"DocId": element.workflowInstanceDataFields.DocIdDiferimento,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.parecerList.push(task);
|
||||
});
|
||||
@@ -131,10 +133,9 @@ export class PedidosPage implements OnInit {
|
||||
console.log(this.taskType);
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
doRefresh() {
|
||||
this.LoadList();
|
||||
setTimeout(() => {
|
||||
event.target.complete();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user