mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
improve go back
This commit is contained in:
@@ -9,6 +9,8 @@ import { SuccessMessagePage } from 'src/app/shared/popover/success-message/succe
|
||||
import { EmendMessageModalPage } from '../emend-message-modal/emend-message-modal.page';
|
||||
import { Location } from '@angular/common';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-event-actions-popover',
|
||||
@@ -27,7 +29,7 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
private popoverController: PopoverController,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
private location: Location,
|
||||
private RouteService: RouteService,
|
||||
public ThemeService: ThemeService) {
|
||||
this.serialNumber = this.navParams.get('serialNumber');
|
||||
this.instanceId = this.navParams.get('InstanceId');
|
||||
@@ -44,7 +46,7 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
goBack() {
|
||||
this.closePopover();
|
||||
|
||||
this.location.back()
|
||||
this.RouteService.goBack()
|
||||
}
|
||||
|
||||
closePopover() {
|
||||
|
||||
@@ -20,6 +20,7 @@ import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.pag
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { StorageService } from 'src/app/services/storage.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -71,7 +72,8 @@ export class ViewEventPage implements OnInit {
|
||||
private sqliteservice: SqliteService,
|
||||
private backgroundservice: BackgroundService,
|
||||
private storage: StorageService,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private RouteService: RouteService,
|
||||
) {
|
||||
this.isEventEdited = false;
|
||||
this.loadedEvent = new Event();
|
||||
@@ -179,7 +181,7 @@ export class ViewEventPage implements OnInit {
|
||||
this.toastService.badRequest('Este evento já não existe na sua agenda')
|
||||
loader.remove()
|
||||
this.modalController.dismiss('Eevent not Foud');
|
||||
this.location.back();
|
||||
this.RouteService.goBack();
|
||||
}
|
||||
loader.remove()
|
||||
});
|
||||
@@ -361,7 +363,7 @@ export class ViewEventPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res => {
|
||||
//this.location.back();
|
||||
//this.RouteService.goBack();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
|
||||
+3
-2
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
|
||||
+3
-2
@@ -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']);
|
||||
|
||||
@@ -9,7 +9,7 @@ import { Location } from '@angular/common';
|
||||
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-publication-detail',
|
||||
@@ -28,7 +28,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
private publications:PublicationsService,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
private location: Location,
|
||||
private RouteService: RouteService,
|
||||
private sqliteservice: SqliteService,
|
||||
private backgroundservice: BackgroundService,
|
||||
public ThemeService: ThemeService ) {
|
||||
@@ -88,7 +88,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
}
|
||||
|
||||
close() {
|
||||
this.location.back()
|
||||
this.RouteService.goBack()
|
||||
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -9,7 +9,7 @@ import { NewPublicationPage } from '../../new-publication/new-publication.page';
|
||||
import { Location } from '@angular/common';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
|
||||
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-publication-detail',
|
||||
@@ -30,7 +30,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private router: Router,
|
||||
private location: Location,
|
||||
private RouteService: RouteService,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
|
||||
@@ -100,7 +100,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
this.close()
|
||||
} else {
|
||||
// alert('go back')
|
||||
this.location.back();
|
||||
this.RouteService.goBack();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user