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 { Platform } from '@ionic/angular';
import { SqliteService } from 'src/app/services/sqlite.service';
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({
selector: 'app-despacho-pr',
@@ -60,7 +61,8 @@ export class DespachoPrPage implements OnInit {
private sqliteservice: SqliteService,
private backgroundservice: BackgroundService,
private platform: Platform,
public ThemeService: ThemeService
public ThemeService: ThemeService,
private RouteService: RouteService
) {
this.activatedRoute.paramMap.subscribe(params => {
if (params["params"].SerialNumber) {
@@ -99,7 +101,7 @@ export class DespachoPrPage implements OnInit {
}
goBack() {
this.location.back();
this.RouteService.goBack();
}
@@ -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')
}
@@ -10,6 +10,7 @@ import { ToastService } from 'src/app/services/toast.service';
import { Location } from '@angular/common'
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
import { ThemeService } from 'src/app/services/theme.service'
import { RouteService } from 'src/app/services/route.service';
@Component({
selector: 'app-diploma-assinar',
@@ -39,7 +40,7 @@ export class DiplomaAssinarPage implements OnInit {
private router: Router,
private animationController: AnimationController,
private toastService: ToastService,
private location: Location,
private RouteService: RouteService,
public ThemeService: ThemeService
) {
this.activatedRoute.paramMap.subscribe(params => {
@@ -59,7 +60,7 @@ export class DiplomaAssinarPage implements OnInit {
}
goBack() {
this.location.back();
this.RouteService.goBack();
}
async openOptions(taskAction?: any) {
@@ -16,6 +16,7 @@ import { Platform } from '@ionic/angular';
import { SqliteService } from 'src/app/services/sqlite.service';
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({
@@ -47,7 +48,7 @@ export class DiplomaPage implements OnInit {
private router: Router,
private animationController: AnimationController,
private toastService: ToastService,
private location: Location,
private RouteService: RouteService,
private sqliteservice: SqliteService,
private backgroundservice: BackgroundService,
private platform: Platform,
@@ -76,7 +77,7 @@ export class DiplomaPage implements OnInit {
}
goBack() {
this.location.back();
this.RouteService.goBack();
/* if(this.task.Status == "Pending" && this.caller == 'gabinete-digital'){
if (window.innerWidth < 801) {
this.router.navigate(['/home/gabinete-digital/pendentes']);
@@ -18,7 +18,7 @@ import { BackgroundService } from '../../../../services/background.service';
import { Platform } from '@ionic/angular';
import { ThemeService } from 'src/app/services/theme.service'
import { OfflineManagerService } from 'src/app/services/offline-manager.service';
import { RouteService } from 'src/app/services/route.service';
@Component({
selector: 'app-approve-event',
@@ -58,7 +58,7 @@ export class ApproveEventPage implements OnInit {
private iab: InAppBrowser,
private animationController: AnimationController,
private toastService: ToastService,
private location: Location,
private RouteService: RouteService,
private sqliteservice: SqliteService,
private platform: Platform,
private backgroundservice: BackgroundService,
@@ -94,7 +94,7 @@ export class ApproveEventPage implements OnInit {
}
goBack() {
this.location.back();
this.RouteService.goBack();
/* let navigationExtras: NavigationExtras = {
queryParams: {
"eventos": true,
@@ -13,6 +13,7 @@ import { BackgroundService } from '../../../services/background.service';
import { Platform } from '@ionic/angular';
import { SortService } from 'src/app/services/functions/sort.service';
import { ThemeService } from 'src/app/services/theme.service'
import { RouteService } from 'src/app/services/route.service';
@Component({
selector: 'app-event-list',
@@ -44,7 +45,8 @@ export class EventListPage implements OnInit {
private platform: Platform,
private sortService: SortService,
private backgroundservice: BackgroundService,
public ThemeService: ThemeService
public ThemeService: ThemeService,
private RouteService: RouteService
) { }
ngOnInit() {
@@ -216,7 +218,7 @@ export class EventListPage implements OnInit {
// this.router.navigate(['/home/gabinete-digital']);
// }
this.location.back()
this.RouteService.goBack()
}
@@ -32,6 +32,7 @@ import { Platform } from '@ionic/angular';
import { BackgroundService } from 'src/app/services/background.service';
import { NewGroupPage } from 'src/app/pages/chat/new-group/new-group.page';
import { DataService } from 'src/app/services/data.service';
import { RouteService } from 'src/app/services/route.service';
@Component({
selector: 'app-expediente-detail',
@@ -71,7 +72,7 @@ export class ExpedienteDetailPage implements OnInit {
public popoverController: PopoverController,
private activatedRoute: ActivatedRoute,
private toastService: ToastService,
private location: Location,
private RouteService: RouteService,
private attachmentsService: AttachmentsService,
public p: PermissionService,
private taskService: TaskService,
@@ -269,7 +270,7 @@ export class ExpedienteDetailPage implements OnInit {
goBack() {
this.location.back();
this.RouteService.goBack();
/* if(this.task.Status == "Pending" && this.caller != 'events'){
if (window.innerWidth <= 800) {
this.router.navigate(['/home/gabinete-digital/pendentes']);
@@ -21,6 +21,7 @@ import { Location } from '@angular/common';
import { AttachmentList } from 'src/app/models/Excludetask';
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
import { ThemeService } from 'src/app/services/theme.service'
import { RouteService } from 'src/app/services/route.service';
@Component({
selector: 'app-expediente-pr',
@@ -58,7 +59,7 @@ export class ExpedientePrPage implements OnInit {
private animationController: AnimationController,
private toastService: ToastService,
private attachmentsService: AttachmentsService,
private location: Location,
private RouteService: RouteService,
public ThemeService: ThemeService
) {
@@ -94,7 +95,7 @@ export class ExpedientePrPage implements OnInit {
}
goBack() {
this.location.back();
this.RouteService.goBack();
/* if(this.task.Status == "Pending" && this.caller != 'events'){
if (window.innerWidth <= 800) {
this.router.navigate(['/home/gabinete-digital/pendentes']);
@@ -13,6 +13,7 @@ import { ExpedienteGdStore } from 'src/app/store/expedientegd-store.service';
import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';
import { ThemeService } from 'src/app/services/theme.service'
import { SortService } from 'src/app/services/functions/sort.service';
import { RouteService } from 'src/app/services/route.service';
@Component({
selector: 'app-expedientes-pr',
@@ -40,7 +41,7 @@ export class ExpedientesPrPage implements OnInit {
private alertService: AlertService,
private authService: AuthService,
private router: Router,
private location: Location,
private RouteService: RouteService,
public ThemeService: ThemeService,
private sortService: SortService,
) {
@@ -131,7 +132,7 @@ export class ExpedientesPrPage implements OnInit {
// };
// this.router.navigate(['/home/gabinete-digital'], navigationExtras);
this.location.back();
this.RouteService.goBack();
}
@@ -28,7 +28,7 @@ import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.pag
import { ThemeService } from 'src/app/services/theme.service'
import { DataService } from 'src/app/services/data.service';
import { NewGroupPage } from 'src/app/pages/chat/new-group/new-group.page';
import { RouteService } from 'src/app/services/route.service';
@Component({
selector: 'app-pedido',
@@ -63,7 +63,7 @@ export class PedidoPage implements OnInit {
private animationController: AnimationController,
private toastService: ToastService,
public p: PermissionService,
private location: Location,
private RouteService: RouteService,
private pedidoService: PedidoService,
private sqliteservice: SqliteService,
private backgroundservices: BackgroundService,
@@ -670,7 +670,7 @@ export class PedidoPage implements OnInit {
}
goBack() {
this.location.back();
this.RouteService.goBack();
// if(this.task.Status == "Pending" && this.caller == 'gabinete-digital'){
// if (window.innerWidth <= 700) {
// this.router.navigate(['/home/gabinete-digital/pendentes']);