mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fixe go back
This commit is contained in:
@@ -47,12 +47,9 @@ export class DespachosOptionsPage implements OnInit {
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
close () {
|
||||
this.goBack()
|
||||
}
|
||||
|
||||
async openTaskProcessModal(taskAction: any, task: any) {
|
||||
this.popoverController.dismiss();
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
@@ -70,18 +67,17 @@ export class DespachosOptionsPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then( res => {
|
||||
this.goBack();
|
||||
// this.goBack();
|
||||
});
|
||||
}
|
||||
|
||||
sendExpedienteToPending() {
|
||||
const loader = this.toastService.loading()
|
||||
this.popoverController.dismiss();
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||
this.httpErrorHandle.httpsSucessMessagge('Enviar para Pendentes')
|
||||
loader.remove()
|
||||
|
||||
this.close();
|
||||
this.goBack('back');
|
||||
},(error)=>{
|
||||
loader.remove()
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
@@ -89,7 +85,7 @@ export class DespachosOptionsPage implements OnInit {
|
||||
}
|
||||
|
||||
async distartExpedientModal(){
|
||||
this.popoverController.dismiss();
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
@@ -105,14 +101,14 @@ export class DespachosOptionsPage implements OnInit {
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
if(res['data']=='close'){
|
||||
this.close();
|
||||
this.goBack('back');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
async openBookMeetingModal(task: any) {
|
||||
this.popoverController.dismiss();
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
@@ -128,11 +124,13 @@ export class DespachosOptionsPage implements OnInit {
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
modal.onDidDismiss().then(() => {
|
||||
this.goBack('no');
|
||||
})
|
||||
}
|
||||
|
||||
async openDelegarModal(task: any) {
|
||||
this.popoverController.dismiss();
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
@@ -152,7 +150,7 @@ export class DespachosOptionsPage implements OnInit {
|
||||
if(res){
|
||||
const data = res.data;
|
||||
if(data == 'close') {
|
||||
this.goBack();
|
||||
this.goBack('back');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,7 +173,7 @@ export class DespachosOptionsPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService._successMessage()
|
||||
this.close();
|
||||
this.goBack('back');
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
@@ -191,7 +189,7 @@ export class DespachosOptionsPage implements OnInit {
|
||||
|
||||
async openAddNoteModal(actionName:string) {
|
||||
|
||||
this.popoverController.dismiss();
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
@@ -229,7 +227,7 @@ export class DespachosOptionsPage implements OnInit {
|
||||
if(actionName == 'Executado') {
|
||||
await this.executado(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Arquivar'){
|
||||
else if(actionName == 'Arquivar') {
|
||||
await this.arquivar(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Gerar Diploma') {
|
||||
@@ -241,7 +239,7 @@ export class DespachosOptionsPage implements OnInit {
|
||||
else if(actionName == 'Reexecução') {
|
||||
await this.reexecutar(res.data.note, docs);
|
||||
}
|
||||
this.goBack();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -262,7 +260,7 @@ export class DespachosOptionsPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService._successMessage('Processo arquivado')
|
||||
this.close();
|
||||
this.goBack('back');
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
@@ -293,7 +291,7 @@ export class DespachosOptionsPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.close();
|
||||
this.goBack('back');
|
||||
this.toastService._successMessage()
|
||||
} catch(error) {
|
||||
if(error.status == 0) {
|
||||
@@ -326,7 +324,7 @@ export class DespachosOptionsPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService._successMessage()
|
||||
this.close();
|
||||
this.goBack('back');
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
@@ -340,8 +338,8 @@ export class DespachosOptionsPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.RouteService.goBack();
|
||||
goBack(params) {
|
||||
this.popoverController.dismiss()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user