Skip to content

Commit

Permalink
Merge pull request #120 from Apes2getherStrong/WTG-12-redirect-after-…
Browse files Browse the repository at this point in the history
…editing-map-location-or-route

Wtg 12 redirect after editing map location or route
  • Loading branch information
Drillllll authored Sep 16, 2024
2 parents efee1bb + 4bb062e commit 5c2db1f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ export class MapLocationEditComponent implements OnInit {
}
)
} else {
this.activatedRoute.queryParams.subscribe(params => {
this.routeId = params['routeId'];
});
this.activatedRoute.params.subscribe(
(params: Params) => {
this.mapLocationId = params['pointId'];
Expand Down Expand Up @@ -220,7 +223,7 @@ export class MapLocationEditComponent implements OnInit {

goBack() {
if (this.editMode) {
this.router.navigate(['yourRoutes/list'])
this.router.navigate(['yourRoutes/' + this.routeId])
} else {
this.router.navigate(['yourRoutes/' + this.routeId + '/edit']);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ export class MapLocationListComponent implements OnInit, OnChanges {
}

onMapLocationEdit(mapLocationId: string) {
this.router.navigate(['point/' + mapLocationId + '/edit'])
this.router.navigate(['point/' + mapLocationId + '/edit'], {
queryParams: { routeId: this.route.id }
});
}

onMapLocationDelete(mapLocationId: string) {
Expand Down

0 comments on commit 5c2db1f

Please sign in to comment.