diff --git a/client/src/components/Planner/DayDetailPanel.test.tsx b/client/src/components/Planner/DayDetailPanel.test.tsx
index 9be8ad13d..dfa26ad6e 100644
--- a/client/src/components/Planner/DayDetailPanel.test.tsx
+++ b/client/src/components/Planner/DayDetailPanel.test.tsx
@@ -1,4 +1,4 @@
-// FE-PLANNER-DAYDETAIL-001 to FE-PLANNER-DAYDETAIL-084
+// FE-PLANNER-DAYDETAIL-001 to FE-PLANNER-DAYDETAIL-085
import React from 'react';
import { fireEvent, render, screen, waitFor, within, act } from '../../../tests/helpers/render';
import userEvent from '@testing-library/user-event';
@@ -520,6 +520,15 @@ describe('DayDetailPanel', () => {
expect(await screen.findByText('102 Quai de Jemmapes')).toBeInTheDocument();
});
+ it('FE-PLANNER-DAYDETAIL-085: the hotel picker leaves out imported tracks', async () => {
+ const hotel = buildPlace({ id: 10, name: 'Hotel du Nord' });
+ const track = buildPlace({ id: 12, name: 'Canal Saint-Martin walk', route_geometry: '[[48.87,2.36],[48.88,2.37]]' });
+ render(
(
+ places: P[],
+ hideRoadtripStops: boolean,
+ { accommodations, reservations }: BookedPlaceSources,
+): P[] {
+ if (!hideRoadtripStops) return places
+ const booked = new Set (
+ places: P[],
+ currentPlaceId?: number | string | null,
+): P[] {
+ return places.filter(place => !place.route_geometry
+ || (currentPlaceId != null && currentPlaceId !== '' && String(place.id) === String(currentPlaceId)))
+}
diff --git a/client/tests/unit/mobile/trip/MAccommodationSheet.test.tsx b/client/tests/unit/mobile/trip/MAccommodationSheet.test.tsx
index e122e06b4..331209e0f 100644
--- a/client/tests/unit/mobile/trip/MAccommodationSheet.test.tsx
+++ b/client/tests/unit/mobile/trip/MAccommodationSheet.test.tsx
@@ -8,7 +8,7 @@ import { useSettingsStore } from '../../../../src/store/settingsStore'
import { isBlurred } from '../../../helpers/bookingCodeBlur'
import { act, fireEvent, render, screen, waitFor } from '../../../helpers/render'
-// FE-MOB-ACCSH-001 to FE-MOB-ACCSH-029
+// FE-MOB-ACCSH-001 to FE-MOB-ACCSH-031
// The pickers have their own suites; here they only need to be addressable, so
// they render as plain controls. data-value keeps the requested value readable
@@ -395,4 +395,17 @@ describe('MAccommodationSheet', () => {
expect(update.mock.calls[0][2]).toMatchObject({ confirmation: 'ABC-1' })
})
})
+
+ it('FE-MOB-ACCSH-030: an imported track is not offered as the place of a stay', () => {
+ const track = { id: 103, name: 'Donauradweg', address: null, category_id: null, image_url: null, route_geometry: '[[48.2,16.3],[48.3,16.4]]' }
+ setup(makePlanner({ places: [...PLACES, track] }))
+ expect(screen.getByText('Hotel Sacher')).toBeInTheDocument()
+ expect(screen.queryByText('Donauradweg')).toBeNull()
+ })
+
+ it('FE-MOB-ACCSH-031: a stay already at a track still lists that track', () => {
+ const track = { id: 103, name: 'Donauradweg', address: null, category_id: null, image_url: null, route_geometry: '[[48.2,16.3],[48.3,16.4]]' }
+ setup(makePlanner({ places: [...PLACES, track], tripAccommodations: [{ ...EXISTING, place_id: 103 }] }), makeShell({ dayId: 12, accId: 77 }))
+ expect(placeRow('Donauradweg')).toBeInTheDocument()
+ })
})
diff --git a/client/tests/unit/mobile/trip/MReservationSheet.test.tsx b/client/tests/unit/mobile/trip/MReservationSheet.test.tsx
index f2bcce499..1f708638f 100644
--- a/client/tests/unit/mobile/trip/MReservationSheet.test.tsx
+++ b/client/tests/unit/mobile/trip/MReservationSheet.test.tsx
@@ -9,7 +9,7 @@ import { buildPlanner } from '../../../helpers/mobileTrip'
import { resetAllStores } from '../../../helpers/store'
import { act, fireEvent, render, screen, waitFor } from '../../../helpers/render'
-// FE-MOB-RESSH-001 to FE-MOB-RESSH-061
+// FE-MOB-RESSH-001 to FE-MOB-RESSH-063
// Date/time/select pickers have their own suites — here they only have to be
// addressable, so they render as plain controls.
@@ -469,6 +469,20 @@ describe('MReservationSheet', () => {
expect(screen.getByPlaceholderText('reservations.locationPlaceholder')).toHaveValue('Philharmonikerstrasse 4')
})
+ it('FE-MOB-RESSH-062: an imported track is not offered as the place of a stay', () => {
+ const track = { id: 103, name: 'Donauradweg', address: null, route_geometry: '[[48.2,16.3],[48.3,16.4]]' }
+ setup(makePlanner({ places: [...PLACES, track], editingReservation: HOTEL }))
+ const hotelOptions = [...screen.getByLabelText('reservations.meta.pickHotel').querySelectorAll('option')].map(o => o.textContent)
+ expect(hotelOptions).toContain('Hotel Sacher')
+ expect(hotelOptions).not.toContain('Donauradweg')
+ })
+
+ it('FE-MOB-RESSH-063: a stay already at a track keeps that track selected', () => {
+ const track = { id: 103, name: 'Donauradweg', address: null, route_geometry: '[[48.2,16.3],[48.3,16.4]]' }
+ setup(makePlanner({ places: [...PLACES, track], tripAccommodations: [{ ...ACCOMMODATIONS[0], place_id: 103 }], editingReservation: HOTEL }))
+ expect(screen.getByLabelText('reservations.meta.pickHotel')).toHaveAttribute('data-value', '103')
+ })
+
it('FE-MOB-RESSH-023: a hotel without an accommodation falls back to the booking location', () => {
setup(makePlanner({ editingReservation: { ...HOTEL, accommodation_id: null } }))
expect(screen.getByPlaceholderText('reservations.locationPlaceholder')).toHaveValue('fallback address')
diff --git a/wiki/Accommodations.md b/wiki/Accommodations.md
index 8190e983a..364a6b89e 100644
--- a/wiki/Accommodations.md
+++ b/wiki/Accommodations.md
@@ -77,8 +77,10 @@ A few details worth knowing:
placed, and the booking simply rides along with it.
- Moving the booking to a different check-in day moves its stop with it. Deleting the
booking removes the stop it created, and leaves a stop you placed yourself standing.
-- Hotels are service stops, so **Show in Days too** under **Service stops** in the Road
- Trip settings also decides whether they appear in the places list.
+- Hotels count as service stops on the drive, so **Show in Days too** under **Service
+ stops** in the Road Trip settings decides whether the hotel's stop shows in the day list.
+ The hotel itself always stays in the places list, on the Days map and in the booking
+ forms, whatever the switch says.
Nights booked before this existed are given their stop when the server upgrades, so trips
you already have show their hotels on the drive without anyone re-saving anything. Trips
diff --git a/wiki/Trip-Planner-Overview.md b/wiki/Trip-Planner-Overview.md
index 9d0f57c40..e27bb81cc 100644
--- a/wiki/Trip-Planner-Overview.md
+++ b/wiki/Trip-Planner-Overview.md
@@ -108,7 +108,7 @@ Driving settings includes **Show hazard areas**, off by default and shared by th
- [Reservations-and-Bookings](Reservations-and-Bookings)
- [Admin-Addons](Admin-Addons)
-Driving settings also controls **Show in Days too** under **Service stops**. It is on by default and applies to every service stop in the trip, including existing stops. Turn it off to keep service stops exclusively in the Roadtrip view and omit them from the normal Days view and its route. Turning it on restores their visibility without creating duplicates. The setting is shared with fellow travellers and can also be changed through `update_roadtrip_settings` using `roadtrip_service_stops_in_days`.
+Driving settings also controls **Show in Days too** under **Service stops**. It is on by default and applies to every service stop in the trip, including existing stops. Turn it off to keep service stops exclusively in the Roadtrip view and omit them from the normal Days view and its route. Hotels, and any place a booking points at, stay in the places list and on the Days map either way. Turning it on restores their visibility without creating duplicates. The setting is shared with fellow travellers and can also be changed through `update_roadtrip_settings` using `roadtrip_service_stops_in_days`.
**Start and end each day at your stay**, under **Route line** in Driving settings, starts each Roadtrip day after a booked night at that hotel and ends each day before one there. It is off by default and shared by the trip. The hotel rows are drawn from the booking, not stored as stops, so the Days view stays as it is and switching it off gives the drive exactly as before. On the phone it is the one switch in **Driving figures**. See [Road-Trip](Road-Trip#starting-and-ending-the-day-at-the-stay).