💄 Trip: redirect to trips on error
This commit is contained in:
parent
a77421bc26
commit
97a392f233
@ -341,7 +341,9 @@ export class TripComponent implements AfterViewInit {
|
|||||||
this.tripMembers = members;
|
this.tripMembers = members;
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.subscribe();
|
.subscribe({
|
||||||
|
error: () => this.router.navigateByUrl('/trips'),
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
initMap(settings: Settings): void {
|
initMap(settings: Settings): void {
|
||||||
@ -491,6 +493,8 @@ export class TripComponent implements AfterViewInit {
|
|||||||
|
|
||||||
resetMapBounds() {
|
resetMapBounds() {
|
||||||
if (!this.places.length) {
|
if (!this.places.length) {
|
||||||
|
if (!this.trip?.days.length) return;
|
||||||
|
|
||||||
this.map?.fitBounds(
|
this.map?.fitBounds(
|
||||||
this.flattenedTripItems.filter((i) => i.lat != null && i.lng != null).map((i) => [i.lat!, i.lng!]),
|
this.flattenedTripItems.filter((i) => i.lat != null && i.lng != null).map((i) => [i.lat!, i.lng!]),
|
||||||
{ padding: [30, 30] },
|
{ padding: [30, 30] },
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user