feat(SW-1012): Started implementing restaurant data

This commit is contained in:
Erik Tiekstra
2024-12-02 13:47:05 +01:00
committed by Fredrik Thorsson
parent 05006506f0
commit 63a77b215d
17 changed files with 329 additions and 13 deletions

View File

@@ -1,5 +1,14 @@
import type { RestaurantData } from "@/types/hotel"
import type { RestaurantData, RestaurantOpeningHours } from "@/types/hotel"
export interface RestaurantBarSidePeekProps {
restaurants: RestaurantData[]
}
export interface RestaurantBarItemProps {
restaurant: RestaurantData
}
export interface RestaurantBarOpeningHoursProps {
openingHours: RestaurantOpeningHours
alternateOpeningHours?: RestaurantOpeningHours
}

View File

@@ -0,0 +1,11 @@
import { RouterOutput } from "@/lib/trpc/client"
export interface RoomProps {
booking: RouterOutput["booking"]["confirmation"]["booking"]
img: NonNullable<
RouterOutput["booking"]["confirmation"]["hotel"]["included"]
>["rooms"][number]["images"][number]
roomName: NonNullable<
RouterOutput["booking"]["confirmation"]["hotel"]["included"]
>["rooms"][number]["name"]
}

View File

@@ -87,6 +87,8 @@ export enum IconName {
Nature = "Nature",
Nightlife = "Nightlife",
NoSmoking = "NoSmoking",
OpenInNew = "OpenInNew",
OpenInNewSmall = "OpenInNewSmall",
OutdoorFurniture = "OutdoorFurniture",
Parking = "Parking",
People2 = "People2",

View File

@@ -8,10 +8,14 @@ import {
pointOfInterestSchema,
} from "@/server/routers/hotels/output"
import { imageSchema } from "@/server/routers/hotels/schemas/image"
import { restaurantSchema } from "@/server/routers/hotels/schemas/restaurants"
import {
restaurantDaySchema,
restaurantOpeningHoursSchema,
restaurantSchema,
} from "@/server/routers/hotels/schemas/restaurants"
import { roomSchema } from "@/server/routers/hotels/schemas/room"
export type HotelData = z.infer<typeof getHotelDataSchema>
export type HotelData = z.output<typeof getHotelDataSchema>
export type Hotel = HotelData["data"]["attributes"]
export type HotelAddress = HotelData["data"]["attributes"]["address"]
@@ -24,7 +28,11 @@ export type HotelTripAdvisor =
| undefined
export type RoomData = z.infer<typeof roomSchema>
export type RestaurantData = z.infer<typeof restaurantSchema>
export type RestaurantData = z.output<typeof restaurantSchema>
export type RestaurantOpeningHours = z.output<
typeof restaurantOpeningHoursSchema
>
export type RestaurantOpeningHoursDay = z.output<typeof restaurantDaySchema>
export type GalleryImage = z.infer<typeof imageSchema>
export type CheckInData = z.infer<typeof checkinSchema>