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.
TypeScript budget-trackercollaborativedockeritinerarymcp-serveroffline-firstopen-sourceopenstreetmappacking-listpwareal-timeself-hostedselfhostedtraveltravel-apptravel-journaltravel-plannertripitwanderlog
fix(bookings): keep the review's map status within the complexity and strict-null budgets
Maurice44509723fd5a
diff --git a/client/src/components/Planner/ReservationModal.tsx b/client/src/components/Planner/ReservationModal.tsxindex 0a61ce5a9..19d863329 100644--- a/client/src/components/Planner/ReservationModal.tsx+++ b/client/src/components/Planner/ReservationModal.tsx@@ -368,12 +368,14 @@ export function ReservationModal({ isOpen, onClose, onSave, reservation, days, p</div><EditorField label={t('reservations.locationAddress')}><AddressInput value={form.hotel_address} onChange={v => set('hotel_address', v)}- onPick={!form.hotel_place_id ? stayPin.pick : undefined}+ onPick={stayPin.pick}placeholder={t('reservations.locationPlaceholder')} className={INPUT} /></EditorField>- {!form.hotel_place_id && (- <StayPinStatus pin={stayPin.pin} onRetry={() => stayPin.lookUp(form.title, form.hotel_address)} />- )}+ <StayPinStatus+ pin={stayPin.pin}+ hidden={!!form.hotel_place_id}+ onRetry={() => stayPin.lookUp(form.title, form.hotel_address)}+ /></>)}diff --git a/client/src/components/Planner/StayPinStatus.test.tsx b/client/src/components/Planner/StayPinStatus.test.tsxindex b63e7affb..2e69f7890 100644--- a/client/src/components/Planner/StayPinStatus.test.tsx+++ b/client/src/components/Planner/StayPinStatus.test.tsx@@ -23,6 +23,17 @@ describe('StayPinStatus', () => {expect(container.textContent).toBe('');});+ it('FE-STAY-PIN-STATUS-001b: a stay already linked to a place of the trip shows nothing', () => {+ const { container } = render(+ createElement(+ TranslationProvider,+ null,+ createElement(StayPinStatus, { pin: { status: 'missing' }, hidden: true, onRetry: vi.fn() })+ )+ );+ expect(container.textContent).toBe('');+ });+it('FE-STAY-PIN-STATUS-002: says it is looking, then where it found the stay', () => {show({ status: 'searching' });expect(screen.getByRole('status')).toHaveTextContent('Looking for it on the map');diff --git a/client/src/components/Planner/StayPinStatus.tsx b/client/src/components/Planner/StayPinStatus.tsxindex 2b81fb1e5..bf29c46f8 100644--- a/client/src/components/Planner/StayPinStatus.tsx+++ b/client/src/components/Planner/StayPinStatus.tsx@@ -5,6 +5,8 @@ import type { StayPin } from './useStayPin';interface StayPinStatusProps {pin: StayPin;+ /** A stay already linked to a place of the trip shows on the map through that place. */+ hidden?: boolean;/** Asks the map again with what the form now holds. */onRetry: () => void;}@@ -15,9 +17,9 @@ interface StayPinStatusProps {* found, with a way to search again before it is saved without a pin. Shared by* the desktop booking dialog and the phone's booking sheet.*/-export default function StayPinStatus({ pin, onRetry }: StayPinStatusProps) {+export default function StayPinStatus({ pin, hidden = false, onRetry }: StayPinStatusProps) {const { t } = useTranslation();- if (pin.status === 'idle') return null;+ if (hidden || pin.status === 'idle') return null;if (pin.status === 'searching') {return (diff --git a/client/src/components/Planner/useStayPin.ts b/client/src/components/Planner/useStayPin.tsindex d310e84fe..d621659ee 100644--- a/client/src/components/Planner/useStayPin.ts+++ b/client/src/components/Planner/useStayPin.ts@@ -29,9 +29,9 @@ export function useStayPin() {[]);- const lookUp = (name: string, address: string | null | undefined) => {+ const lookUp = (name: string | null | undefined, address: string | null | undefined) => {const mine = ++ticket.current;- const queries = stayQueries(name, address);+ const queries = stayQueries(name ?? '', address);if (isEffectivelyOffline()) {setPin({ status: 'idle' });return;diff --git a/client/src/mobile/screens/trip/sheets/MReservationSheet.tsx b/client/src/mobile/screens/trip/sheets/MReservationSheet.tsxindex 066cfa8e2..9feaf366e 100644--- a/client/src/mobile/screens/trip/sheets/MReservationSheet.tsx+++ b/client/src/mobile/screens/trip/sheets/MReservationSheet.tsx@@ -339,11 +339,13 @@ export default function MReservationSheet({ planner, onOpenExpense }: MReservatiplaceholder={t('reservations.locationPlaceholder')}className={FIELD_CLS}/>- {!form.hotel_place_id && (- <div className="mt-2">- <StayPinStatus pin={stayPin.pin} onRetry={() => stayPin.lookUp(form.title, form.hotel_address)} />- </div>- )}+ <div className="mt-2 empty:hidden">+ <StayPinStatus+ pin={stayPin.pin}+ hidden={!!form.hotel_place_id}+ onRetry={() => stayPin.lookUp(form.title, form.hotel_address)}+ />+ </div></>)}