feat: search result teasers list all bookable nights options
Search teasers showed only the nights of the cheapest offer, while teaser groups list every option. They now list all nights options next to the cheapest "ab" price, like teaser groups and the watchlist do. All search filters are applied in SQL before the rows are aggregated, so the list only holds options matching the active filters (e.g. the duration filter). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
4cefbce87e
commit
ab2b840dc5
2 files changed
+1
-3
No files matched your search
@@ -128,7 +128,6 @@ class SearchResultService implements SingletonInterface
|
||||
'boardUid' => ($row['boardUid'] ?? null),
|
||||
'dates' => [],
|
||||
'nights' => [],
|
||||
'teaserNights' => [],
|
||||
'rooms' => [],
|
||||
'new' => ($row['new'] ?? null),
|
||||
'skiPassIncluded' => ($row['skiPassIncluded'] ?? null),
|
||||
@@ -199,7 +198,6 @@ class SearchResultService implements SingletonInterface
|
||||
|| $item['minPrice'] > ($row['minPrice'] ?? null)) {
|
||||
$item['minPrice'] = ($row['minPrice'] ?? null);
|
||||
// Teaser-specific offer data must describe the cheapest row.
|
||||
$item['teaserNights'] = [($row['nights'] ?? null)];
|
||||
$item['board'] = ($row['board'] ?? null);
|
||||
$item['boardUid'] = ($row['boardUid'] ?? null);
|
||||
$item['daytrip'] = ($row['daytrip'] ?? null);
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
country: item.country,
|
||||
region: item.region,
|
||||
productImage: searchProductImage,
|
||||
nights: item.teaserNights,
|
||||
nights: item.nights,
|
||||
board: item.board,
|
||||
minPrice: item.minPrice,
|
||||
daytrip: item.daytrip,
|
||||
|
||||
Reference in new issue
Block a user