Skip to content

Commit

Permalink
Merge pull request #142 from Apes2getherStrong/hotfix-broken-forms
Browse files Browse the repository at this point in the history
hotfix broken forms
  • Loading branch information
Drillllll authored Nov 9, 2024
2 parents a1d1b82 + a280a15 commit a6e42ab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/header/header.component.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="nav-container">

<div (click)="collapsed = true" class="nav-header">
<a routerLink="/">WayToGo </a>
<a routerLink="/">WayToGo fix1 </a>
</div>

<div style="flex-grow: 1"></div>
Expand Down
5 changes: 5 additions & 0 deletions src/app/route/route-edit/route-edit.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -67,6 +69,7 @@ export class RouteEditComponent implements OnInit, CanComponentDeactivate {
}

canDeactivate(): Promise<boolean> {
console.log("CAN DEACTIVATE")
if(this.submittingChangesInProcess) {
return Promise.resolve(true);
}
Expand All @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion src/app/route/route-list/route-list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export class RouteListComponent implements OnInit{

updatePageSize() {
this.pageSize = this.isMobileVersion ? defaultPageSize / 2 : defaultPageSize;
console.log(this.pageSize)
}

onAddNewRoute() {
Expand Down

0 comments on commit a6e42ab

Please sign in to comment.