mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
save
This commit is contained in:
@@ -108,14 +108,14 @@
|
||||
<button (click)="openAddNoteModal('Aprovar')" class="btn-cancel" shape="round" >Aprovar</button>
|
||||
<button (click)="openAddNoteModal('Revisão')" class="btn-cancel" shape="round" >Mandar para Revisão</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="distartExpedientModal(fulltask)" class="btn-cancel" shape="round" >Descartar</button>
|
||||
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button>
|
||||
<div hidden class="solid"></div>
|
||||
<button hidden class="btn-cancel" shape="round" >Delegar</button>
|
||||
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
<div *ngIf="loggeduser.Profile =='PR' " class="buttons">
|
||||
<button (click)="openExpedientActionsModal('0', fulltask)" class="btn-ok" shape="round" >Marcar para Despacho</button>
|
||||
<button (click)="distartExpedientModal(fulltask)" class="btn-cancel" shape="round" >Descartar</button>
|
||||
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
|
||||
@@ -305,13 +305,9 @@ export class ExpedientePrPage implements OnInit {
|
||||
}
|
||||
|
||||
async distartExpedientModal(body:any){
|
||||
console.log(this.fulltask);
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
serialNumber: this.fulltask.serialNumber,
|
||||
folderId: this.fulltask.workflowInstanceDataFields.FolderID,
|
||||
action: 'complete',
|
||||
},
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
@@ -320,25 +316,36 @@ export class ExpedientePrPage implements OnInit {
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
console.log(res['data']);
|
||||
if(res['data']== 'Yes'){
|
||||
this.processes.CompleteTask(body);
|
||||
this.goBack();
|
||||
}
|
||||
else if(res['data'] == 'No'){
|
||||
let otherbody = {
|
||||
"serialNumber": body.serialNumber,
|
||||
"action": "Passivo",
|
||||
"ActionTypeId": 99999877,
|
||||
"dataFields": {
|
||||
"Note": "",
|
||||
console.log(body);
|
||||
|
||||
if(body == 'descartar'){
|
||||
if(res['data']== 'Yes'){
|
||||
let otherbody = {
|
||||
"serialNumber": body.serialNumber,
|
||||
"action": "Passivo",
|
||||
"ActionTypeId": 94,
|
||||
"dataFields": {
|
||||
"Note": "",
|
||||
}
|
||||
}
|
||||
this.processes.CompleteTask(otherbody);
|
||||
}
|
||||
else if(res['data'] == 'No'){
|
||||
//Do nothing
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(res['data']== 'Yes'){
|
||||
this.processes.CompleteTask(body);
|
||||
|
||||
this.goBack();
|
||||
}
|
||||
else if(res['data'] == 'No'){
|
||||
console.log('Update');
|
||||
|
||||
this.processes.UpdateTaskStatus(this.task.FolderId);
|
||||
}
|
||||
this.processes.CompleteTask(otherbody);
|
||||
}
|
||||
//Volta na lista principal
|
||||
this.goBack();
|
||||
this.modalController.dismiss();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -219,7 +219,7 @@ export class PedidoPage implements OnInit {
|
||||
sendExpedienteToPending(){
|
||||
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.close();
|
||||
this.goBack();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -243,26 +243,10 @@ export class PedidoPage implements OnInit {
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
console.log('Modal closed');
|
||||
|
||||
this.goBack();
|
||||
});
|
||||
}
|
||||
|
||||
async distartExpedientModal2(task: any){
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
serialNumber: task.serialNumber,
|
||||
folderId: task.workflowInstanceDataFields.FolderID,
|
||||
action: 'discart',
|
||||
},
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
async openBookMeetingModal(task: any) {
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
|
||||
Reference in New Issue
Block a user