mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
improve
This commit is contained in:
@@ -16,6 +16,7 @@ import { RouteService } from 'src/app/services/route.service';
|
||||
export class EventActionsPopoverPage implements OnInit {
|
||||
serialNumber:string;
|
||||
instanceId: string;
|
||||
activityInstanceName: string
|
||||
|
||||
constructor(
|
||||
private navParams: NavParams,
|
||||
@@ -27,7 +28,8 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
public ThemeService: ThemeService) {
|
||||
this.serialNumber = this.navParams.get('serialNumber');
|
||||
this.instanceId = this.navParams.get('InstanceId');
|
||||
}
|
||||
this.activityInstanceName = this.navParams.get('InstanceId');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
window.onresize = (event) => {
|
||||
@@ -67,6 +69,26 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
async ReenviarTask() {
|
||||
let body = { "serialNumber": this.serialNumber, "action": "Reenviar" }
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
|
||||
this.toastService.successMessage();
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
|
||||
this.toastService.badRequest()
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async emendarTask() {
|
||||
this.closePopover();
|
||||
|
||||
@@ -107,25 +129,24 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
}
|
||||
}
|
||||
else{
|
||||
//this.alertService.presentAlert('Operação cancelada!');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async rejeitar(){
|
||||
async rejeitar() {
|
||||
let body = { "serialNumber": this.serialNumber, "action": "Rejeitar" }
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
const loader = this.toastService.loading();
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
await this.toastService.successMessage('Processo rejeitado');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
this.toastService.badRequest();
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
loader.remove();
|
||||
}
|
||||
|
||||
|
||||
@@ -148,6 +169,6 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
modal.onDidDismiss().then(res => {
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user