diff --git a/src/app/modals/add-note/add-note.page.ts b/src/app/modals/add-note/add-note.page.ts index 2a0a66c75..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() - },3000) + },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,8 +146,11 @@ export class AddNotePage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() - },3000) + },7000) } } \ No newline at end of file diff --git a/src/app/modals/create-process/create-process.page.ts b/src/app/modals/create-process/create-process.page.ts index 9b67e9240..ca879bbf0 100644 --- a/src/app/modals/create-process/create-process.page.ts +++ b/src/app/modals/create-process/create-process.page.ts @@ -131,16 +131,16 @@ export class CreateProcessPage implements OnInit { } async saveTask(){ - if(this.postData.Priority=='99999861'){ + if(this.postData.Priority=='99999861') { this.dispatchFolder.DeadlineType = 'Normal'; } - else if(this.postData.Priority=='99999862'){ + else if(this.postData.Priority=='99999862') { this.dispatchFolder.DeadlineType = 'Urgente'; } - else if(this.postData.Priority=='99999863'){ + else if(this.postData.Priority=='99999863') { this.dispatchFolder.DeadlineType = 'Muito Urgente'; } - else if(this.postData.Priority=='99999864'){ + else if(this.postData.Priority=='99999864') { this.dispatchFolder.DeadlineType = 'Urgentíssimo'; } @@ -177,7 +177,7 @@ export class CreateProcessPage implements OnInit { try { await this.processes.postDespatcho(this.postData).toPromise() - this.successMessage('') + //this.successMessage('') } catch (error) { this.badRequest() } @@ -197,7 +197,7 @@ export class CreateProcessPage implements OnInit { try { await this.processes.postParecer(this.postData).toPromise() - this.successMessage() + // this.successMessage() } catch (error) { this.badRequest() } @@ -216,7 +216,7 @@ export class CreateProcessPage implements OnInit { try { await this.processes.postDeferimento(this.postData).toPromise() - this.successMessage() + // this.successMessage() } catch (error) { this.badRequest() } @@ -247,7 +247,7 @@ export class CreateProcessPage implements OnInit { try { await this.processes.postDespatcho(this.postData).toPromise() - this.successMessage() + // this.successMessage() } catch (error) { this.badRequest() } @@ -267,7 +267,7 @@ export class CreateProcessPage implements OnInit { try { await this.processes.postParecer(this.postData).toPromise() - this.successMessage() + // this.successMessage() } catch (error) { this.badRequest() } @@ -286,7 +286,7 @@ export class CreateProcessPage implements OnInit { try { await this.processes.postDeferimento(this.postData).toPromise() - this.successMessage() + // this.successMessage() } catch (error) { this.badRequest() } @@ -301,7 +301,7 @@ export class CreateProcessPage implements OnInit { } - async executado(){ + async executado() { let body = { "serialNumber": this.task.serialNumber, "action": "Conhecimento", @@ -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() - },3000) + },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,8 +589,11 @@ export class CreateProcessPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() - },3000) + },7000) } } \ No newline at end of file diff --git a/src/app/modals/dar-parecer/dar-parecer.page.ts b/src/app/modals/dar-parecer/dar-parecer.page.ts index 2ac655fd2..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() - },3000) + },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 5b97e5a0a..122b9c6ff 100644 --- a/src/app/modals/delegar/delegar.page.ts +++ b/src/app/modals/delegar/delegar.page.ts @@ -72,22 +72,20 @@ export class DelegarPage implements OnInit { } - close(){ + close() { this.router.navigate(['/home/gabinete-digital/expediente']); this.modalController.dismiss(null); } - goBack() { - window.history.back() - } - cancelTask(){ + + cancelTask() { this.modalController.dismiss(null); } - async saveTask(){ + async saveTask() { if(this.taskParticipants.length > 1){ this.alertService.presentErrorMessage("Selecione apenas um destinatário"); } - else{ + else { let body = { "SerialNumber": this.task.SerialNumber, "DispatchDocId": this.task.DocId, @@ -104,7 +102,6 @@ export class DelegarPage implements OnInit { (error)=>{ this.badRequest("Processo não delegado") }); - this.goBack(); } } @@ -174,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() @@ -213,12 +210,15 @@ export class DelegarPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() - },3000) + },7000) } - async badRequest(message?: string) { + async badRequest(message?: string, callback?) { const enterAnimation = (baseEl: any) => { const backdropAnimation = this.animationController.create() .addElement(baseEl.querySelector('ion-backdrop')!) @@ -256,8 +256,11 @@ export class DelegarPage implements OnInit { modal.present() setTimeout(()=>{ + if (callback) { + callback() + } modal.dismiss() - },3000) + },7000) } } \ No newline at end of file diff --git a/src/app/pages/agenda/agenda.page.html b/src/app/pages/agenda/agenda.page.html index 65f574f11..4c32025ef 100644 --- a/src/app/pages/agenda/agenda.page.html +++ b/src/app/pages/agenda/agenda.page.html @@ -226,7 +226,7 @@