mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-05 18:34:09 +00:00
feat(tours): check a city walk's stops off for the day it is on (CW-03)
The walk's detail opened from a day lists its stops in order, each with its stay, importance and protection, and marks one visited or skipped for that day, or takes it back. The day row shows how many were visited. Marks reach the other travellers at once and change no route, place or order; a copy or another day starts with none.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { useTourVisitsSync } from '../../components/Tours/walk/useTourVisitsSync'
|
||||
import { useRoadtripSettings } from '../../hooks/useRoadtripSettings'
|
||||
import { useState, useEffect, useCallback, useMemo, useRef } from 'react'
|
||||
import { useParams, useNavigate, useSearchParams } from 'react-router'
|
||||
@@ -284,6 +285,8 @@ export function useTripPlanner() {
|
||||
const [toursMode, setToursMode] = useState(false)
|
||||
const previousToursModeRef = useRef(false)
|
||||
const { tours, toursLoading, tourDataReady, tourPlaceIds, reloadTourPlaceIds, invalidateTourPlaceIds, upsertTour } = useTourPlaceIds(tripId, toursEnabled)
|
||||
// CW-03: how far the trip's city walks got on their days, for the day plan and the walks' stations.
|
||||
useTourVisitsSync(tripId, toursEnabled)
|
||||
|
||||
useEffect(() => {
|
||||
if (!toursEnabled) {
|
||||
|
||||
Reference in New Issue
Block a user