improve go back

This commit is contained in:
Peter Maquiran
2022-01-06 14:47:22 +01:00
parent be06d3b3d1
commit 73354e00af
28 changed files with 153 additions and 58 deletions
@@ -23,6 +23,7 @@ import { SqliteService } from 'src/app/services/sqlite.service';
import { Platform } from '@ionic/angular';
import { BackgroundService } from 'src/app/services/background.service';
import { ThemeService } from 'src/app/services/theme.service'
import { RouteService } from 'src/app/services/route.service';
@Component({
@@ -57,7 +58,7 @@ export class DespachoPage implements OnInit {
private activatedRoute: ActivatedRoute,
private toastService: ToastService,
private despachoService: DespachoService,
private location: Location,
private RouteService: RouteService,
public p: PermissionService,
private sqliteservice: SqliteService,
private platform: Platform,
@@ -97,7 +98,7 @@ export class DespachoPage implements OnInit {
goBack() {
//this.navigationService.back()
this.location.back();
this.RouteService.goBack();
// if(this.task.Status == "Pending" && this.caller == 'gabinete-digital'){
// if (window.innerWidth < 801) {
@@ -173,7 +174,7 @@ export class DespachoPage implements OnInit {
try {
this.goBack()
} catch (e) {
this.location.back();
this.RouteService.goBack();
}
this.toastService.badRequest('Processo não encontrado')
}