mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
save
This commit is contained in:
@@ -1,33 +1,6 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<app-header></app-header>
|
||||
</ion-header>
|
||||
<ion-menu autoHide="false" side="end" content-id="main-content">
|
||||
<ion-header>
|
||||
<ion-toolbar translucent>
|
||||
<ion-title>Ações</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<ion-list>
|
||||
<ion-item (click)="approveTask(loadedEvent.serialNumber)">
|
||||
<ion-icon name="checkmark-sharp"></ion-icon>
|
||||
<ion-label>Aprovar</ion-label>
|
||||
</ion-item>
|
||||
<ion-item (click)="emendTask(loadedEvent.serialNumber)">
|
||||
<ion-icon name="create-outline"></ion-icon>
|
||||
<ion-label>Adicionar Nota</ion-label>
|
||||
</ion-item>
|
||||
<ion-item (click)="rejectTask(loadedEvent.serialNumber)">
|
||||
<ion-icon name="close-sharp"></ion-icon>
|
||||
<ion-label>Rejeitar</ion-label>
|
||||
</ion-item>
|
||||
<ion-item (click)="editar(loadedEvent.serialNumber)">
|
||||
<ion-icon name="close-sharp"></ion-icon>
|
||||
<ion-label>Editar</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</ion-content>
|
||||
</ion-menu>
|
||||
|
||||
<ion-content id="main-content">
|
||||
<div class="main-content d-flex height-100">
|
||||
|
||||
@@ -59,16 +59,6 @@ export class ApproveEventPage implements OnInit {
|
||||
this.getTask();
|
||||
}
|
||||
|
||||
notImplemented() {
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
|
||||
close() {
|
||||
/* this.router.navigate(['/home/gabinete-digital/event-list']); */
|
||||
this.closeEventToApprove.emit();
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
goBack() {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
@@ -77,7 +67,8 @@ export class ApproveEventPage implements OnInit {
|
||||
};
|
||||
if( window.innerWidth < 801) {
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
}
|
||||
@@ -85,9 +76,11 @@ export class ApproveEventPage implements OnInit {
|
||||
async getTask(){
|
||||
this.loadedEvent = await this.processes.GetTask(this.serialNumber).toPromise();
|
||||
console.log(this.loadedEvent);
|
||||
|
||||
this.today = new Date(this.loadedEvent.workflowInstanceDataFields.StartDate);
|
||||
console.log(new Date(this.today));
|
||||
|
||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]);
|
||||
|
||||
let instanceId = this.loadedEvent.workflowInstanceDataFields.InstanceId;
|
||||
this.getAttachments(instanceId);
|
||||
}
|
||||
@@ -117,8 +110,6 @@ export class ApproveEventPage implements OnInit {
|
||||
}
|
||||
|
||||
emendTask(serialNumber:string){
|
||||
/* console.log('Emendar'); */
|
||||
this.menu.close();
|
||||
this.openEmendMessageModal(serialNumber);
|
||||
this.goBack();
|
||||
}
|
||||
@@ -129,9 +120,9 @@ export class ApproveEventPage implements OnInit {
|
||||
console.log(body);
|
||||
|
||||
try {
|
||||
this.processes.PostTaskAction(body).toPromise()
|
||||
this.processes.PostTaskAction(body).toPromise();
|
||||
await this.successMessage();
|
||||
this.goBack();
|
||||
await this.successMessage()
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
}
|
||||
@@ -190,18 +181,15 @@ export class ApproveEventPage implements OnInit {
|
||||
"ReviewerUseComment": res.data,
|
||||
}
|
||||
}
|
||||
console.log(body);
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
//this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.goToEventsToApprove();
|
||||
this.successMessage()
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
}
|
||||
|
||||
console.log(body);
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
this.successMessage();
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.badRequest();
|
||||
}
|
||||
}
|
||||
else{
|
||||
//this.alertService.presentAlert('Operação cancelada!');
|
||||
@@ -209,14 +197,14 @@ export class ApproveEventPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
goToEventsToApprove(){
|
||||
/* goToEventsToApprove(){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"events": true,
|
||||
"eventos": true,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
} */
|
||||
|
||||
|
||||
async editar(serialNumber: string) {
|
||||
|
||||
Reference in New Issue
Block a user