feat(BOOK-54): Adjusted filter functionality to save filters as query parameters instead of paths

* feat(BOOK-54): Destination filters now matching on id instead of slug in preparation for filters from Contentstack

Approved-by: Chuma Mcphoy (We Ahead)
This commit is contained in:
Erik Tiekstra
2025-09-18 13:03:01 +00:00
parent 32a817fa72
commit 948c86479a
18 changed files with 136 additions and 102 deletions

View File

@@ -1,3 +1,4 @@
import type { FacilityEnum } from "@scandic-hotels/common/constants/facilities"
import type { z } from "zod"
import type {
@@ -87,6 +88,7 @@ export type HotelInput = z.input<typeof hotelInputSchema>
export type RoomType = Pick<Room, "roomTypes" | "name">
export interface HotelFilter {
id: FacilityEnum
name: string
slug: string
filterType: string

View File

@@ -73,6 +73,7 @@ export function getFiltersFromHotels(
)
return filter
? {
id: filter.id,
name: filter.name,
slug: filter.slug,
filterType: filter.filter,