feat(SW-340): Added HotelCardDialog component
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { ReactElement } from "react"
|
||||
|
||||
import { HotelData } from "../../hotelReservation/selectHotel/hotelCardListingProps"
|
||||
import { HotelPin } from "../../hotelReservation/selectHotel/map"
|
||||
|
||||
import type { Coordinates } from "@/types/components/maps/coordinates"
|
||||
@@ -11,8 +12,9 @@ export interface InteractiveMapProps {
|
||||
activePoi?: PointOfInterest["name"] | null
|
||||
hotelPins?: HotelPin[]
|
||||
activeHotelPin?: HotelPin["name"] | null
|
||||
hotels?: HotelData[]
|
||||
mapId: string
|
||||
closeButton: ReactElement
|
||||
onActivePoiChange?: (poi: PointOfInterest["name"] | null) => void
|
||||
onActiveHotelPinChange?: (hotelPin: PointOfInterest["name"] | null) => void
|
||||
onActiveHotelPinChange?: (hotelPin: HotelPin["name"] | null) => void
|
||||
}
|
||||
|
||||
@@ -2,9 +2,14 @@ import { HotelsAvailabilityPrices } from "@/server/routers/hotels/output"
|
||||
|
||||
import { Hotel } from "@/types/hotel"
|
||||
|
||||
export enum HotelCardListingType {
|
||||
MapListing = "mapListing",
|
||||
PageListing = "pageListing",
|
||||
}
|
||||
|
||||
export type HotelCardListingProps = {
|
||||
hotelData: HotelData[]
|
||||
type?: "map" | "listing"
|
||||
type?: HotelCardListingType
|
||||
}
|
||||
|
||||
export type HotelData = {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { HotelData } from "./hotelCardListingProps"
|
||||
import { HotelCardListingType, HotelData } from "./hotelCardListingProps"
|
||||
|
||||
export type HotelCardProps = {
|
||||
hotel: HotelData
|
||||
type?: "map" | "listing"
|
||||
type?: HotelCardListingType
|
||||
}
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import {
|
||||
imageMetaDataSchema,
|
||||
imageSizesSchema,
|
||||
} from "@/server/routers/hotels/schemas/image"
|
||||
|
||||
import { HotelData } from "./hotelCardListingProps"
|
||||
import { Filter } from "./hotelFilters"
|
||||
|
||||
import type { Coordinates } from "@/types/components/maps/coordinates"
|
||||
|
||||
@@ -18,10 +26,19 @@ export interface SelectHotelMapProps {
|
||||
hotels: HotelData[]
|
||||
}
|
||||
|
||||
type ImageSizes = z.infer<typeof imageSizesSchema>
|
||||
type ImageMetaData = z.infer<typeof imageMetaDataSchema>
|
||||
|
||||
export type HotelPin = {
|
||||
name: string
|
||||
coordinates: Coordinates
|
||||
price: string
|
||||
currency: string
|
||||
image: string
|
||||
publicPrice: string | null
|
||||
memberPrice: string | null
|
||||
currency: string | null
|
||||
images: {
|
||||
imageSizes: ImageSizes
|
||||
metaData: ImageMetaData
|
||||
}[]
|
||||
amenities: Filter[]
|
||||
ratings: number | null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user