diff --git a/src/app/modals/add-note/add-note.page.ts b/src/app/modals/add-note/add-note.page.ts index 6c683d6fc..eda5c0545 100644 --- a/src/app/modals/add-note/add-note.page.ts +++ b/src/app/modals/add-note/add-note.page.ts @@ -61,7 +61,7 @@ export class AddNotePage implements OnInit { this.documents = this.documents.filter( (e, i) => index != i); } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -100,12 +100,15 @@ export class AddNotePage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?: string) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -143,6 +146,9 @@ export class AddNotePage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/modals/create-process/create-process.page.ts b/src/app/modals/create-process/create-process.page.ts index 995227bf3..ca879bbf0 100644 --- a/src/app/modals/create-process/create-process.page.ts +++ b/src/app/modals/create-process/create-process.page.ts @@ -504,7 +504,7 @@ export class CreateProcessPage implements OnInit { - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -543,12 +543,15 @@ export class CreateProcessPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?: string) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -586,6 +589,9 @@ export class CreateProcessPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/modals/dar-parecer/dar-parecer.page.ts b/src/app/modals/dar-parecer/dar-parecer.page.ts index 47637771a..945ede90e 100644 --- a/src/app/modals/dar-parecer/dar-parecer.page.ts +++ b/src/app/modals/dar-parecer/dar-parecer.page.ts @@ -97,7 +97,7 @@ export class DarParecerPage implements OnInit { } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -136,12 +136,15 @@ export class DarParecerPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) diff --git a/src/app/modals/delegar/delegar.page.ts b/src/app/modals/delegar/delegar.page.ts index 5d765a059..122b9c6ff 100644 --- a/src/app/modals/delegar/delegar.page.ts +++ b/src/app/modals/delegar/delegar.page.ts @@ -171,7 +171,7 @@ export class DelegarPage implements OnInit { this.taskParticipants = taskParticipants; } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -210,12 +210,15 @@ export class DelegarPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?: string) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -253,6 +256,9 @@ export class DelegarPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/pages/agenda/edit-event/edit-event.page.ts b/src/app/pages/agenda/edit-event/edit-event.page.ts index 60fa0dce0..f35252c8c 100644 --- a/src/app/pages/agenda/edit-event/edit-event.page.ts +++ b/src/app/pages/agenda/edit-event/edit-event.page.ts @@ -234,7 +234,7 @@ export class EditEventPage implements OnInit { }); } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -273,12 +273,15 @@ export class EditEventPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -316,6 +319,9 @@ export class EditEventPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts b/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts index ffb7c84bd..9549c9482 100644 --- a/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts +++ b/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts @@ -92,7 +92,7 @@ export class EventActionsPopoverPage implements OnInit { } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -131,12 +131,15 @@ export class EventActionsPopoverPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?: string) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -174,6 +177,9 @@ export class EventActionsPopoverPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/pages/agenda/new-event/new-event.page.ts b/src/app/pages/agenda/new-event/new-event.page.ts index b7717e19a..b54e8af7c 100644 --- a/src/app/pages/agenda/new-event/new-event.page.ts +++ b/src/app/pages/agenda/new-event/new-event.page.ts @@ -169,7 +169,7 @@ export class NewEventPage implements OnInit { } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -208,12 +208,15 @@ export class NewEventPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -251,6 +254,9 @@ export class NewEventPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts b/src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts index 62522bc4d..e0a66ff92 100644 --- a/src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts +++ b/src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts @@ -174,7 +174,7 @@ export class DespachoPrPage implements OnInit { this.modalController.dismiss(); } - async executado(note:string, documents:any){ + async executado(note:string, documents:any) { let body = { "serialNumber": this.serialnumber, "action": "Conhecimento", @@ -464,7 +464,7 @@ export class DespachoPrPage implements OnInit { return await popover.present(); } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -503,11 +503,14 @@ export class DespachoPrPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -545,6 +548,9 @@ export class DespachoPrPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts b/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts index 7b74ef63d..57dbf26c0 100644 --- a/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts +++ b/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts @@ -424,7 +424,7 @@ export class DespachoPage implements OnInit { } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -463,12 +463,15 @@ export class DespachoPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?: string) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -506,6 +509,9 @@ export class DespachoPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/pages/gabinete-digital/diplomas-assinar/diploma-assinar/diploma-assinar.page.ts b/src/app/pages/gabinete-digital/diplomas-assinar/diploma-assinar/diploma-assinar.page.ts index 5fd18a7c0..bfdd64f4a 100644 --- a/src/app/pages/gabinete-digital/diplomas-assinar/diploma-assinar/diploma-assinar.page.ts +++ b/src/app/pages/gabinete-digital/diplomas-assinar/diploma-assinar/diploma-assinar.page.ts @@ -53,7 +53,7 @@ export class DiplomaAssinarPage implements OnInit { this.LoadTaskDetail(this.serialnumber); } - goBack(){ + goBack() { let navigationExtras: NavigationExtras = { queryParams: { "diplomas": true, @@ -150,18 +150,20 @@ export class DiplomaAssinarPage implements OnInit { } try { await this.processes.CompleteTask(body).toPromise() - this.goBack(); - this.successMessage() + + this.successMessage(false, ()=>{ + this.goBack(); + }) } catch (error) { this.badRequest() } } - close(){ + close() { this.modalController.dismiss(); } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -200,12 +202,15 @@ export class DiplomaAssinarPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?: string) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -243,6 +248,9 @@ export class DiplomaAssinarPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.ts b/src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.ts index 8fe4186b0..13bbb623e 100644 --- a/src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.ts +++ b/src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.ts @@ -153,8 +153,11 @@ export class DiplomaPage implements OnInit { } try { await this.processes.CompleteTask(body).toPromise() - this.close(); - this.successMessage() + + this.successMessage(false, ()=>{ + this.close(); + }) + } catch (error) { this.badRequest() } @@ -272,7 +275,7 @@ export class DiplomaPage implements OnInit { this.modalController.dismiss(); } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -311,12 +314,15 @@ export class DiplomaPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?: string) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -354,6 +360,9 @@ export class DiplomaPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts b/src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts index fd2415699..805251e85 100644 --- a/src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts +++ b/src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts @@ -102,9 +102,12 @@ export class ApproveEventModalPage implements OnInit { console.log(body); try { await this.processes.PostTaskAction(body).toPromise() - this.router.navigate(['/home/gabinete-digital/event-list']); - this.modalController.dismiss(null); - this.successMessage('Evento aprovado') + + this.successMessage('Evento aprovado', ()=>{ + this.router.navigate(['/home/gabinete-digital/event-list']); + this.modalController.dismiss(null); + }) + } catch (error) { this.badRequest('Evento não aprovado') } @@ -125,9 +128,12 @@ export class ApproveEventModalPage implements OnInit { try { await this.processes.PostTaskAction(body).toPromise() - this.router.navigate(['/home/gabinete-digital/event-list']); - this.successMessage('Evento rejeitado') + this.successMessage('Evento rejeitado', () =>{ + this.router.navigate(['/home/gabinete-digital/event-list']); + }) + + } catch (error) { this.badRequest('Evento não rejeitado') } @@ -214,7 +220,7 @@ export class ApproveEventModalPage implements OnInit { } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -253,12 +259,15 @@ export class ApproveEventModalPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?: string) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -296,6 +305,9 @@ export class ApproveEventModalPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts b/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts index 585e71a41..126b093e5 100644 --- a/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts +++ b/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts @@ -74,7 +74,7 @@ export class ApproveEventPage implements OnInit { } - async getTask(){ + async getTask() { this.loadedEvent = await this.processes.GetTask(this.serialNumber).toPromise(); console.log(this.loadedEvent); @@ -86,15 +86,17 @@ export class ApproveEventPage implements OnInit { this.getAttachments(instanceId); } - async approveTask(serialNumber:string){ + async approveTask(serialNumber:string) { let body = { "serialNumber": serialNumber, "action": "Aprovar" } console.log(body); try { await this.processes.PostTaskAction(body).toPromise() //this.successMessage() - this.toastService.successMessage('Evento aprovado'); - this.goBack(); + this.toastService.successMessage('Evento aprovado', ()=>{ + this.goBack(); + }); + } catch (error) { this.badRequest() } @@ -122,8 +124,10 @@ export class ApproveEventPage implements OnInit { try { this.processes.PostTaskAction(body).toPromise(); //await this.successMessage('Processo rejeitado'); - await this.toastService.successMessage('Processo rejeitado'); - this.goBack(); + await this.toastService.successMessage('Processo rejeitado', ()=>{ + this.goBack(); + }); + } catch (error) { this.badRequest() } @@ -231,7 +235,7 @@ export class ApproveEventPage implements OnInit { - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -270,12 +274,15 @@ export class ApproveEventPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?: string) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -313,6 +320,9 @@ export class ApproveEventPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts index cc44ed4e6..29dc86172 100644 --- a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts +++ b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts @@ -305,7 +305,7 @@ export class BookMeetingModalPage implements OnInit { - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -350,7 +350,7 @@ export class BookMeetingModalPage implements OnInit { } - async badRequest(message?: string) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -388,6 +388,9 @@ export class BookMeetingModalPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts index c8277aad9..10021e2db 100644 --- a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts +++ b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts @@ -528,7 +528,7 @@ export class ExpedientTaskModalPage implements OnInit { } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -567,12 +567,15 @@ export class ExpedientTaskModalPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?: string) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -610,6 +613,9 @@ export class ExpedientTaskModalPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts b/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts index 7c681b379..c3aa7b388 100644 --- a/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts +++ b/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts @@ -364,7 +364,7 @@ export class ExpedienteDetailPage implements OnInit { - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -403,12 +403,15 @@ export class ExpedienteDetailPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?: string) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -446,6 +449,9 @@ export class ExpedienteDetailPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.page.ts b/src/app/pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.page.ts index 175689850..94327f159 100644 --- a/src/app/pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.page.ts +++ b/src/app/pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.page.ts @@ -440,7 +440,7 @@ export class ExpedientePrPage implements OnInit { return await popover.present(); } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -479,12 +479,15 @@ export class ExpedientePrPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) diff --git a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts index 687c215b4..d3b28cdd0 100644 --- a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts +++ b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts @@ -418,7 +418,7 @@ export class PedidoPage implements OnInit { } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -457,12 +457,15 @@ export class PedidoPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) diff --git a/src/app/pages/login/login.page.html b/src/app/pages/login/login.page.html index c0fe0f58b..7d127100f 100644 --- a/src/app/pages/login/login.page.html +++ b/src/app/pages/login/login.page.html @@ -1,6 +1,6 @@
-
+
@@ -71,7 +71,7 @@
-
+
Entrar com senha
diff --git a/src/app/pages/login/login.page.ts b/src/app/pages/login/login.page.ts index c5c9c73be..a807cb999 100644 --- a/src/app/pages/login/login.page.ts +++ b/src/app/pages/login/login.page.ts @@ -33,9 +33,9 @@ export class LoginPage implements OnInit { password: string = environment.defaultuserpwd; userattempt: UserForm; code = [] - setPint = false - pin = localStorage.getItem('PIN') != null + setPint = false + pin = false userLoginPreference: any @@ -57,10 +57,16 @@ export class LoginPage implements OnInit { if (userData.hasOwnProperty('loginPreference')) { this.userLoginPreference = userData.loginPreference + this.pin = true + } else { + this.userLoginPreference = '' - this.setPint = true + this.setPint = false + this.pin = false + } + } ngOnInit() {} @@ -199,7 +205,7 @@ export class LoginPage implements OnInit { } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -238,12 +244,15 @@ export class LoginPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?: string) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { diff --git a/src/app/pages/publications/new-action/new-action.page.ts b/src/app/pages/publications/new-action/new-action.page.ts index 7f75b0396..0def7afd9 100644 --- a/src/app/pages/publications/new-action/new-action.page.ts +++ b/src/app/pages/publications/new-action/new-action.page.ts @@ -56,7 +56,7 @@ export class NewActionPage implements OnInit { this.modalController.dismiss(); } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -95,12 +95,15 @@ export class NewActionPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -138,6 +141,9 @@ export class NewActionPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/pages/publications/publication-detail/publication-detail.page.ts b/src/app/pages/publications/publication-detail/publication-detail.page.ts index f4640cfea..0d4a520af 100644 --- a/src/app/pages/publications/publication-detail/publication-detail.page.ts +++ b/src/app/pages/publications/publication-detail/publication-detail.page.ts @@ -122,7 +122,7 @@ export class PublicationDetailPage implements OnInit { } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -161,12 +161,15 @@ export class PublicationDetailPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -204,6 +207,9 @@ export class PublicationDetailPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.ts b/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.ts index 86df6850c..cced89669 100644 --- a/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.ts +++ b/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.ts @@ -124,7 +124,7 @@ export class PublicationDetailPage implements OnInit { } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -163,12 +163,15 @@ export class PublicationDetailPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -206,6 +209,9 @@ export class PublicationDetailPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/services/toast.service.ts b/src/app/services/toast.service.ts index 766a2a20b..04b4726e4 100644 --- a/src/app/services/toast.service.ts +++ b/src/app/services/toast.service.ts @@ -22,7 +22,7 @@ export class ToastService { toast.present(); } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -61,12 +61,15 @@ export class ToastService { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?: string) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -104,6 +107,9 @@ export class ToastService { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/shared/agenda/approve-event/approve-event.page.ts b/src/app/shared/agenda/approve-event/approve-event.page.ts index 8b0ea4869..432fd955d 100644 --- a/src/app/shared/agenda/approve-event/approve-event.page.ts +++ b/src/app/shared/agenda/approve-event/approve-event.page.ts @@ -235,7 +235,7 @@ export class ApproveEventPage implements OnInit { } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -274,12 +274,15 @@ export class ApproveEventPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?: string) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -317,6 +320,9 @@ export class ApproveEventPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/shared/agenda/new-event/new-event.page.ts b/src/app/shared/agenda/new-event/new-event.page.ts index 8af66888a..df0c2ec93 100644 --- a/src/app/shared/agenda/new-event/new-event.page.ts +++ b/src/app/shared/agenda/new-event/new-event.page.ts @@ -315,7 +315,7 @@ export class NewEventPage implements OnInit { window['temp.path:/home/agenda/new-event.component.ts'] = {} } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -354,12 +354,15 @@ export class NewEventPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -397,6 +400,9 @@ export class NewEventPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/shared/fingerprint/fingerprint.page.ts b/src/app/shared/fingerprint/fingerprint.page.ts index abdc68912..d1997b19e 100644 --- a/src/app/shared/fingerprint/fingerprint.page.ts +++ b/src/app/shared/fingerprint/fingerprint.page.ts @@ -69,7 +69,7 @@ export class FingerprintPage implements OnInit { } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -115,7 +115,7 @@ export class FingerprintPage implements OnInit { } - async badRequest(message?: string) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -153,6 +153,9 @@ export class FingerprintPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts index beb288a2d..c55082221 100644 --- a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts +++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts @@ -407,7 +407,7 @@ export class EditEventToApproveComponent implements OnInit { }); } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -446,12 +446,15 @@ export class EditEventToApproveComponent implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?: string) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -489,6 +492,9 @@ export class EditEventToApproveComponent implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/shared/pin/pin.page.ts b/src/app/shared/pin/pin.page.ts index bb321155d..0646d4796 100644 --- a/src/app/shared/pin/pin.page.ts +++ b/src/app/shared/pin/pin.page.ts @@ -54,7 +54,7 @@ export class PinPage implements OnInit { } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -96,7 +96,7 @@ export class PinPage implements OnInit { } - async badRequest(message?: string) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) diff --git a/src/app/shared/popover/deploma-options/deploma-options.page.ts b/src/app/shared/popover/deploma-options/deploma-options.page.ts index 8b56a055c..827cdc242 100644 --- a/src/app/shared/popover/deploma-options/deploma-options.page.ts +++ b/src/app/shared/popover/deploma-options/deploma-options.page.ts @@ -145,7 +145,7 @@ export class DeplomaOptionsPage implements OnInit { } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -183,12 +183,15 @@ export class DeplomaOptionsPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?: string) { + async badRequest(message?: string, callback?) { const modal = await this.modalController.create({ component: BadRequestPage, componentProps: { @@ -200,6 +203,9 @@ export class DeplomaOptionsPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/shared/popover/despachos-options/despachos-options.page.ts b/src/app/shared/popover/despachos-options/despachos-options.page.ts index d0392f587..fac026cb2 100644 --- a/src/app/shared/popover/despachos-options/despachos-options.page.ts +++ b/src/app/shared/popover/despachos-options/despachos-options.page.ts @@ -281,7 +281,7 @@ export class DespachosOptionsPage implements OnInit { - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -320,12 +320,15 @@ export class DespachosOptionsPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?: string) { + async badRequest(message?: string, callback?) { const modal = await this.modalController.create({ component: BadRequestPage, componentProps: { @@ -337,6 +340,9 @@ export class DespachosOptionsPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.ts b/src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.ts index 1d53ce904..fd4e0b524 100644 --- a/src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.ts +++ b/src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.ts @@ -282,7 +282,7 @@ export class DespachosPrOptionsPage implements OnInit { - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -321,12 +321,15 @@ export class DespachosPrOptionsPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?: string) { + async badRequest(message?: string, callback?) { const modal = await this.modalController.create({ component: BadRequestPage, componentProps: { @@ -338,6 +341,9 @@ export class DespachosPrOptionsPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/shared/popover/opts-expediente-pr/opts-expediente-pr.page.ts b/src/app/shared/popover/opts-expediente-pr/opts-expediente-pr.page.ts index 63f013b88..4608d15dd 100644 --- a/src/app/shared/popover/opts-expediente-pr/opts-expediente-pr.page.ts +++ b/src/app/shared/popover/opts-expediente-pr/opts-expediente-pr.page.ts @@ -289,7 +289,7 @@ export class OptsExpedientePrPage implements OnInit { } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -328,12 +328,15 @@ export class OptsExpedientePrPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?) { + async badRequest(message?: string, callback?) { const modal = await this.modalController.create({ component: BadRequestPage, componentProps: { diff --git a/src/app/shared/popover/request-options/request-options.page.ts b/src/app/shared/popover/request-options/request-options.page.ts index f25f33471..65f5c9507 100644 --- a/src/app/shared/popover/request-options/request-options.page.ts +++ b/src/app/shared/popover/request-options/request-options.page.ts @@ -285,7 +285,7 @@ export class RequestOptionsPage implements OnInit { - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -324,12 +324,15 @@ export class RequestOptionsPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) diff --git a/src/app/shared/publication/new-action/new-action.page.ts b/src/app/shared/publication/new-action/new-action.page.ts index c7149029e..3c982c133 100644 --- a/src/app/shared/publication/new-action/new-action.page.ts +++ b/src/app/shared/publication/new-action/new-action.page.ts @@ -59,7 +59,7 @@ export class NewActionPage implements OnInit { } - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -98,12 +98,15 @@ export class NewActionPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -141,6 +144,9 @@ export class NewActionPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/shared/publication/new-publication/new-publication.page.ts b/src/app/shared/publication/new-publication/new-publication.page.ts index 02572eb74..b09b55bee 100644 --- a/src/app/shared/publication/new-publication/new-publication.page.ts +++ b/src/app/shared/publication/new-publication/new-publication.page.ts @@ -275,7 +275,7 @@ export class NewPublicationPage implements OnInit { } */ - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -314,12 +314,15 @@ export class NewPublicationPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -357,6 +360,9 @@ export class NewPublicationPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } diff --git a/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.ts b/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.ts index c361c02b7..e6dbee632 100644 --- a/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.ts +++ b/src/app/shared/publication/view-publications/publication-detail/publication-detail.page.ts @@ -141,7 +141,7 @@ export class PublicationDetailPage implements OnInit { - async successMessage(message?: string) { + async successMessage(message?: any, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() @@ -180,12 +180,15 @@ export class PublicationDetailPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) } - async badRequest(message?) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -223,6 +226,9 @@ export class PublicationDetailPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() },7000) }