mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-04 18:04:18 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user