feat: adjust select rate ui to latest design

This commit is contained in:
Simon Emanuelsson
2025-02-17 15:10:48 +01:00
parent 2c72957dc6
commit 4c23700d52
76 changed files with 819 additions and 654 deletions
@@ -1,4 +1,4 @@
import { Hotel } from "@/types/hotel"
import type { Hotel } from "@/types/hotel"
export type CategorizedFilters = {
facilityFilters: Hotel["detailedFacilities"]
@@ -9,15 +9,6 @@ export type HotelFiltersProps = {
className?: string
}
export type Filter = {
name: string
id: number
public: boolean
sortOrder: number
filter?: string
icon: string
}
export type HotelFilterModalProps = {
filters: CategorizedFilters
}
@@ -1,11 +1,10 @@
import type { z } from "zod"
import type { Coordinates } from "@/types/components/maps/coordinates"
import type { Location } from "@/types/trpc/routers/hotel/locations"
import type { Amenities } from "@/types/hotel"
import type { imageSchema } from "@/server/routers/hotels/schemas/image"
import type { Child } from "../selectRate/selectRate"
import type { HotelData } from "./hotelCardListingProps"
import type { CategorizedFilters, Filter } from "./hotelFilters"
import type { CategorizedFilters } from "./hotelFilters"
import type {
AlternativeHotelsSearchParams,
SelectHotelSearchParams,
@@ -39,7 +38,7 @@ export type HotelPin = {
imageSizes: ImageSizes
metaData: ImageMetaData
}[]
amenities: Filter[]
amenities: Amenities
ratings: number | null
operaId: string
facilityIds: number[]
@@ -2,4 +2,5 @@ export type ToggleSidePeekProps = {
hotelId: string
roomTypeCode?: string
intent?: "text" | "textInverted"
title?: string
}
-2
View File
@@ -1,7 +1,5 @@
import type { ImageProps as NextImageProps } from "next/image"
import type { ImageVaultAsset } from "./imageVault"
export interface FocalPoint {
x: number
y: number
+1
View File
@@ -3,6 +3,7 @@ import type { SelectedRate, SelectedRoom } from "@/types/stores/rates"
export interface RoomContextValue extends SelectedRoom {
actions: {
closeSection: () => void
modifyRate: () => void
selectFilter: (code: RoomPackageCodeEnum | undefined) => void
selectRate: (rate: SelectedRate) => void
+10 -6
View File
@@ -1,18 +1,21 @@
import type { z } from "zod"
import type { hotelSchema } from "@/server/routers/hotels/output"
import type {
extraPageSchema,
facilitySchema,
transformAdditionalData,
} from "@/server/routers/hotels/schemas/additionalData"
import type { citySchema } from "@/server/routers/hotels/schemas/city"
import type { attributesSchema } from "@/server/routers/hotels/schemas/hotel"
import type { addressSchema } from "@/server/routers/hotels/schemas/hotel/address"
import type { hotelContentSchema } from "@/server/routers/hotels/schemas/hotel/content"
import type { detailedFacilitiesSchema } from "@/server/routers/hotels/schemas/hotel/detailedFacility"
import type {
detailedFacilitiesSchema,
detailedFacilitySchema,
} from "@/server/routers/hotels/schemas/hotel/detailedFacility"
import type { checkinSchema } from "@/server/routers/hotels/schemas/hotel/facts"
import type { healthFacilitySchema } from "@/server/routers/hotels/schemas/hotel/healthFacilities"
import type {
extraPageSchema,
transformAdditionalData,
} from "@/server/routers/hotels/schemas/hotel/include/additionalData"
import type { facilitySchema } from "@/server/routers/hotels/schemas/hotel/include/additionalData/facility"
import type { nearbyHotelsSchema } from "@/server/routers/hotels/schemas/hotel/include/nearbyHotels"
import type {
openingHoursDetailsSchema,
@@ -35,6 +38,7 @@ export type City = Pick<CitySchema, "id" | "type"> & CitySchema["attributes"]
export type FacilityData = z.output<typeof facilitySchema>
export type Facility = FacilityData & { id: string }
export type ApiImage = z.output<typeof imageSchema>
export type DetailedFacility = z.output<typeof detailedFacilitySchema>
export type HealthFacility = z.output<typeof healthFacilitySchema>
export type HealthFacilities = HealthFacility[]
export type Hotel = z.output<typeof attributesSchema>
+1
View File
@@ -18,6 +18,7 @@ import type {
} from "@/types/trpc/routers/hotel/roomAvailability"
interface Actions {
closeSection: (idx: number) => () => void
modifyRate: (idx: number) => () => void
selectFilter: (idx: number) => (code: RoomPackageCodeEnum | undefined) => void
selectRate: (idx: number) => (rate: SelectedRate) => void