feat(planner): the places search also finds the description and the notes

The search box of the places list matched only name and address. It now also reads what was written about a place, through one helper the desktop list, its filter counts and the phone's browser share. (#2252)
This commit is contained in:
Maurice
2026-10-01 09:30:42 +02:00
parent 81ebc31698
commit f7782b9ef7
5 changed files with 59 additions and 12 deletions
@@ -1,4 +1,5 @@
import type { AssignmentsMap, Day, Place } from '../../../../types'
import { placeMatchesSearch } from '../../../../utils/placeSearch'
import {
plannedPlaceIds as sharedPlannedPlaceIds,
type PlannedAccommodation, type PlannedReservation,
@@ -44,9 +45,7 @@ export function matchesCategoryFilter(place: Place, categoryFilters: Set<string>
}
export function matchesSearch(place: Place, search: string): boolean {
if (!search) return true
const q = search.toLowerCase()
return place.name.toLowerCase().includes(q) || (place.address || '').toLowerCase().includes(q)
return placeMatchesSearch(place, search)
}
interface PoolFilterArgs {