Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

fix(tours): keep the generated entity byte-identical and the strict baseline flat after the rebase onto dev

Maurice4c487ceefa88
diff --git a/client/src/components/Map/MapView.tsx b/client/src/components/Map/MapView.tsx
index 52d8824ea..8758f883e 100644
--- a/client/src/components/Map/MapView.tsx
+++ b/client/src/components/Map/MapView.tsx
@@ -797,6 +797,7 @@ function PlannerWaypointMarker({
useEffect(() => {
if (!marker || !onMove) return
const element = marker.getElement()
+ if (!element) return
return wirePlannerWaypointDrag({
element,
initial: { lat: point.lat, lng: point.lng },
diff --git a/client/src/components/Tours/TourDayRowFacts.tsx b/client/src/components/Tours/TourDayRowFacts.tsx
index 058d306ed..fa8c1cc5c 100644
--- a/client/src/components/Tours/TourDayRowFacts.tsx
+++ b/client/src/components/Tours/TourDayRowFacts.tsx
@@ -76,7 +76,7 @@ function Fact({
export default function TourDayRowFacts({ tour, mobile = false }: { tour: TourListItem; mobile?: boolean }) {
const { t } = useTranslation();
- const unit = useSettingsStore((state) => state.settings.distance_unit);
+ const unit = useSettingsStore((state) => state.settings.distance_unit) || 'metric';
const times = tourPlannedTimes(tour);
const facts: Array<{ icon: LucideIcon; value: string; label: string; testId: string }> = [];
const add = (icon: LucideIcon, value: string, label: string, testId: string) =>
diff --git a/server/src/db/entities/Tours.entity.ts b/server/src/db/entities/Tours.entity.ts
index aebc72d34..91ba143ce 100644
--- a/server/src/db/entities/Tours.entity.ts
+++ b/server/src/db/entities/Tours.entity.ts
@@ -1,8 +1,8 @@
+import { Collection, EntityRepositoryType, type Opt, PrimaryKeyProp, type Ref, defineEntity, p } from '@mikro-orm/core';
import { ToursRepository } from '../repositories/Tours.repository';
import { Places } from './Places.entity';
import { TourTypes } from './TourTypes.entity';
import { TourWaypoints } from './TourWaypoints.entity';
-import { Collection, EntityRepositoryType, type Opt, PrimaryKeyProp, type Ref, defineEntity, p } from '@mikro-orm/core';
export class Tours {
[EntityRepositoryType]?: ToursRepository;