mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Saidas testastas
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
<button (click)="openAddNoteModal('Solicitar assinatura')" class="btn-cancel" shape="round" >Solicitar assinatura do Presidente</button>
|
||||
<button (click)="openAddNoteModal('Solicitar alteração')" class="btn-cancel" shape="round" >Solicitar alteração</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="openAddNoteModal('Arquivo')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar despacho</button>
|
||||
<div class="solid"></div>
|
||||
</div>
|
||||
<div class="buttons width-100" *ngIf="task.activityInstanceName == 'Diploma Assinado'">
|
||||
@@ -21,6 +23,12 @@
|
||||
<div class="buttons width-100" *ngIf="task.activityInstanceName == 'Assinar Diploma'">
|
||||
<button (click)="openAddNoteModal('Assinar Diploma')" class="btn-cancel" shape="round" >Assinado</button>
|
||||
</div>
|
||||
<div class="buttons width-100" *ngIf="task.activityInstanceName == 'Assinar Diploma'">
|
||||
<button (click)="openAddNoteModal('Arquivo')" class="btn-cancel" shape="round" >Arquivo</button>
|
||||
</div>
|
||||
<div class="buttons width-100" *ngIf="task.activityInstanceName == 'Assinar Diploma'">
|
||||
<button (click)="openExpedientActionsModal('0',task)" class="btn-cancel" shape="round" >Efetuar despacho</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6,6 +6,11 @@ import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
||||
import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page';
|
||||
import { AttachmentList } from 'src/app/models/Excludetask';
|
||||
import { DespachoService } from 'src/app/Rules/despacho.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-deploma-options',
|
||||
@@ -28,14 +33,17 @@ export class DeplomaOptionsPage implements OnInit {
|
||||
private navParams: NavParams,
|
||||
private toastService: ToastService,
|
||||
private RouteService: RouteService,
|
||||
public p: PermissionService,) {
|
||||
public p: PermissionService,
|
||||
private despachoService: DespachoService,
|
||||
private httpErroHandle: HttpErrorHandle) {
|
||||
this.serialNumber = this.navParams.get('serialNumber');
|
||||
this.task = this.navParams.get('task');
|
||||
this.fulltask = this.navParams.get('fulltask');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
console.log(this.fulltask)
|
||||
console.log(this.task)
|
||||
}
|
||||
|
||||
async openAddNoteModal(actionName:string) {
|
||||
@@ -85,6 +93,9 @@ export class DeplomaOptionsPage implements OnInit {
|
||||
} else if(actionName == 'Concluir diploma'){
|
||||
await this.finish(res.data.note, docs);
|
||||
this.goBack();
|
||||
} else if (actionName == 'Arquivo') {
|
||||
await this.arquivar(res.data.note, docs);
|
||||
this.goBack();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -233,6 +244,80 @@ export class DeplomaOptionsPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
async arquivar(note: string, documents: AttachmentList) {
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.despachoService.arquivar(note, documents, this.serialNumber).toPromise()
|
||||
this.httpErroHandle.httpsSucessMessagge('Arquivar')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async openExpedientActionsModal(taskAction: any, task: any) {
|
||||
|
||||
let classs;
|
||||
if (window.innerWidth <= 800) {
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
|
||||
console.log("fulltask options", this.fulltask)
|
||||
const modal = await this.modalController.create({
|
||||
component: CreateProcessPage,
|
||||
componentProps: {
|
||||
taskAction: taskAction,
|
||||
task: task,
|
||||
profile: this.profile,
|
||||
fulltask: this.fulltask
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(async (res) => {
|
||||
|
||||
|
||||
if (res['data'] == 'openDiscart') {
|
||||
await this.distartExpedientModal();
|
||||
}
|
||||
|
||||
this.goBack();
|
||||
});
|
||||
}
|
||||
|
||||
async distartExpedientModal() {
|
||||
|
||||
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
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res => {
|
||||
if (res['data'] == 'close') {
|
||||
this.close();
|
||||
/*
|
||||
this.close();
|
||||
this.openMenu(); */
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.RouteService.goBack()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user