From a280a1548536716b96fb3e495abca9c6995b7f21 Mon Sep 17 00:00:00 2001
From: Drillllll <118617644+Drillllll@users.noreply.github.com>
Date: Sat, 9 Nov 2024 13:01:05 +0100
Subject: [PATCH] hotfix broken forms
---
src/app/header/header.component.html | 2 +-
src/app/route/route-edit/route-edit.component.ts | 5 +++++
src/app/route/route-list/route-list.component.ts | 1 -
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/app/header/header.component.html b/src/app/header/header.component.html
index 33349e0..e71f158 100644
--- a/src/app/header/header.component.html
+++ b/src/app/header/header.component.html
@@ -1,7 +1,7 @@
diff --git a/src/app/route/route-edit/route-edit.component.ts b/src/app/route/route-edit/route-edit.component.ts
index c288ad2..6c6dad8 100644
--- a/src/app/route/route-edit/route-edit.component.ts
+++ b/src/app/route/route-edit/route-edit.component.ts
@@ -49,9 +49,11 @@ export class RouteEditComponent implements OnInit, CanComponentDeactivate {
private canDeactivateFormGuardService: CanDeactivateFormGuardService,
private confirmationDialogService: ConfirmationDialogService,
private snackbarService: SnackbarService,) {
+ console.log("CONSTRUCTOR")
}
ngOnInit() {
+ console.log("INIT")
this.activatedRoute.url.subscribe(urlSegments => {
this.editMode = !urlSegments.some(segment => segment.path === 'new');
this.id = this.editMode ? this.activatedRoute.snapshot.params['id'] : null;
@@ -67,6 +69,7 @@ export class RouteEditComponent implements OnInit, CanComponentDeactivate {
}
canDeactivate(): Promise
{
+ console.log("CAN DEACTIVATE")
if(this.submittingChangesInProcess) {
return Promise.resolve(true);
}
@@ -90,6 +93,7 @@ export class RouteEditComponent implements OnInit, CanComponentDeactivate {
}
onSubmit() {
+ console.log("SUBMITTING")
this.submittingChangesInProcess = true;
if (this.editMode) {
this.routeService.patchRouteById(this.id, this.routeForm.value)
@@ -120,6 +124,7 @@ export class RouteEditComponent implements OnInit, CanComponentDeactivate {
}
goBack() {
+ console.log("GOING BACK")
if (this.editMode) {
this.router.navigate(['../../../yourRoutes/' + this.id], { relativeTo: this.activatedRoute });
} else {
diff --git a/src/app/route/route-list/route-list.component.ts b/src/app/route/route-list/route-list.component.ts
index 9a60c20..bae8740 100644
--- a/src/app/route/route-list/route-list.component.ts
+++ b/src/app/route/route-list/route-list.component.ts
@@ -82,7 +82,6 @@ export class RouteListComponent implements OnInit{
updatePageSize() {
this.pageSize = this.isMobileVersion ? defaultPageSize / 2 : defaultPageSize;
- console.log(this.pageSize)
}
onAddNewRoute() {