This commit is contained in:
Peter Maquiran
2021-11-09 15:37:59 +01:00
parent ad18a29846
commit bf226f2f49
28 changed files with 191 additions and 544 deletions
@@ -110,13 +110,13 @@ export class ApproveEventModalPage implements OnInit {
try {
await this.processes.PostTaskAction(body).toPromise()
this.toastService.successMessage('Evento aprovado', ()=>{
this.toastService._successMessage('Evento aprovado', ()=>{
this.router.navigate(['/home/gabinete-digital/event-list']);
this.modalController.dismiss(null);
})
} catch (error) {
this.toastService.badRequest('Evento não aprovado')
this.toastService._badRequest('Evento não aprovado')
}
finally {
loader.remove()
@@ -141,11 +141,11 @@ export class ApproveEventModalPage implements OnInit {
try {
await this.processes.PostTaskAction(body).toPromise()
this.toastService.successMessage('Evento rejeitado', () =>{
this.toastService._successMessage('Evento rejeitado', () =>{
this.router.navigate(['/home/gabinete-digital/event-list']);
})
} catch (error) {
this.toastService.badRequest('Evento não rejeitado')
this.toastService._badRequest('Evento não rejeitado')
}
finally {
loader.remove()
@@ -203,11 +203,11 @@ export class ApproveEventPage implements OnInit {
try {
await this.processes.PostTaskAction(body).toPromise()
this.toastService.successMessage();
this.toastService._successMessage();
this.goBack();
} catch (error) {
this.toastService.badRequest()
this.toastService._badRequest()
}
finally {
loader.remove()
@@ -256,10 +256,10 @@ export class ApproveEventPage implements OnInit {
try {
await this.processes.PostTaskAction(body).toPromise();
this.toastService.successMessage('Pedido enviado');
this.toastService._successMessage('Pedido enviado');
this.goBack();
} catch (error) {
this.toastService.badRequest();
this.toastService._badRequest();
} finally {
loader.remove()
}
@@ -280,10 +280,10 @@ export class ApproveEventPage implements OnInit {
const loader = this.toastService.loading()
try {
await this.processes.PostTaskAction(body).toPromise();
await this.toastService.successMessage('Processo rejeitado');
await this.toastService._successMessage('Processo rejeitado');
this.goBack();
} catch (error) {
this.toastService.badRequest()
this.toastService._badRequest()
}
finally {
loader.remove()
@@ -358,10 +358,10 @@ export class ApproveEventPage implements OnInit {
try {
await this.processes.PostTaskAction(body).toPromise();
this.toastService.successMessage();
this.toastService._successMessage();
this.goBack();
} catch (error) {
this.toastService.badRequest();
this.toastService._badRequest();
} finally {
loader.remove()
}