From cc5957dc6a7d498294623b7ee08588cb8716d29d Mon Sep 17 00:00:00 2001 From: hiro-nikaitou Date: Wed, 23 Sep 2026 05:18:41 -0400 Subject: [PATCH] fix(planner): offer trip places in manual transport Signed-off-by: hiro-nikaitou --- client/src/components/Planner/LocationSelect.tsx | 5 +++-- client/src/components/Planner/TransportModal.tsx | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/client/src/components/Planner/LocationSelect.tsx b/client/src/components/Planner/LocationSelect.tsx index ae7fbc1b4..c0985b26c 100644 --- a/client/src/components/Planner/LocationSelect.tsx +++ b/client/src/components/Planner/LocationSelect.tsx @@ -16,9 +16,10 @@ interface Props { onChange: (loc: LocationPoint | null) => void placeholder?: string style?: React.CSSProperties + places?: { name: string; lat: number; lng: number }[] } -export default function LocationSelect({ value, onChange, placeholder, style }: Props) { +export default function LocationSelect({ value, onChange, placeholder, style, places }: Props) { const { t, locale } = useTranslation() // Ohne Reisekontext ist der Hinweis leer, und die Suche laeuft wie bisher. const { point: locationBias } = useLocationBias() @@ -46,7 +47,7 @@ export default function LocationSelect({ value, onChange, placeholder, style }: if (debounceRef.current) clearTimeout(debounceRef.current) const trimmed = query.trim() if (trimmed.length < 3 || (value && trimmed === value.name)) { - setResults([]) + setResults(trimmed.length < 3 && places ? places : []) return } debounceRef.current = setTimeout(async () => { diff --git a/client/src/components/Planner/TransportModal.tsx b/client/src/components/Planner/TransportModal.tsx index 270e07aa9..d29934a10 100644 --- a/client/src/components/Planner/TransportModal.tsx +++ b/client/src/components/Planner/TransportModal.tsx @@ -1009,11 +1009,11 @@ export function TransportModal({ isOpen, onClose, onSave, reservation, days, sel
- setFromPick({ location: l || undefined })} /> + setFromPick({ location: l || undefined })} places={places} />
- setToPick({ location: l || undefined })} /> + setToPick({ location: l || undefined })} places={places} />