fix: clean up hotel and its typings
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { meetingRoomsSchema } from "@/server/routers/hotels/schemas/meetingRoom"
|
||||
|
||||
import type { z } from "zod"
|
||||
|
||||
import type { getMeetingRoomsSchema } from "@/server/routers/hotels/output"
|
||||
|
||||
export type MeetingRoomData = z.infer<typeof getMeetingRoomsSchema>
|
||||
export type MeetingRoomData = z.output<typeof meetingRoomsSchema>
|
||||
export type MeetingRooms = MeetingRoomData["data"]
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { RoomData } from "@/types/hotel"
|
||||
import type { Room } from "@/types/hotel"
|
||||
|
||||
export interface RoomCardProps {
|
||||
room: RoomData
|
||||
room: Room
|
||||
}
|
||||
|
||||
export type RoomsProps = {
|
||||
rooms: RoomData[]
|
||||
preamble?: string
|
||||
rooms: Room[]
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type {
|
||||
Hotel,
|
||||
RestaurantData,
|
||||
Restaurant,
|
||||
RestaurantOpeningHours,
|
||||
} from "@/types/hotel"
|
||||
import type { ParkingAmenityProps } from "./parking"
|
||||
@@ -10,7 +10,7 @@ export type AmenitiesSidePeekProps = {
|
||||
parking: ParkingAmenityProps
|
||||
checkInInformation: Hotel["hotelFacts"]["checkin"]
|
||||
accessibility: Hotel["hotelFacts"]["hotelInformation"]["accessibility"]
|
||||
restaurants: RestaurantData[]
|
||||
restaurants: Restaurant[]
|
||||
}
|
||||
|
||||
export type FilteredAmenitiesProps = {
|
||||
|
||||
@@ -1,27 +1,29 @@
|
||||
import type { Hotel } from "@/types/hotel"
|
||||
import type { Hotel, Parking } from "@/types/hotel"
|
||||
|
||||
export enum Periods {
|
||||
allDay = "AllDay",
|
||||
day = "Day",
|
||||
night = "Night",
|
||||
allDay = "AllDay",
|
||||
}
|
||||
|
||||
export type ParkingAmenityProps = {
|
||||
hasExtraParkingPage: boolean
|
||||
parking: Hotel["parking"]
|
||||
parkingElevatorPitch: string
|
||||
hasExtraParkingPage: boolean
|
||||
}
|
||||
|
||||
export type ParkingListProps = {
|
||||
numberOfChargingSpaces: Hotel["parking"][number]["numberOfChargingSpaces"]
|
||||
canMakeReservation: Hotel["parking"][number]["canMakeReservation"]
|
||||
numberOfParkingSpots: Hotel["parking"][number]["numberOfParkingSpots"]
|
||||
distanceToHotel: Hotel["parking"][number]["distanceToHotel"]
|
||||
address: Hotel["parking"][number]["address"]
|
||||
}
|
||||
export interface ParkingListProps
|
||||
extends Pick<
|
||||
Parking,
|
||||
| "address"
|
||||
| "canMakeReservation"
|
||||
| "distanceToHotel"
|
||||
| "numberOfChargingSpaces"
|
||||
| "numberOfParkingSpots"
|
||||
> { }
|
||||
|
||||
export type ParkingPricesProps = {
|
||||
pricing: Hotel["parking"][number]["pricing"]["localCurrency"]["ordinary"]
|
||||
currency: Hotel["parking"][number]["pricing"]["localCurrency"]["currency"]
|
||||
freeParking: Hotel["parking"][number]["pricing"]["freeParking"]
|
||||
export interface ParkingPricesProps
|
||||
extends Pick<Parking["pricing"], "freeParking">,
|
||||
Pick<NonNullable<Parking["pricing"]["localCurrency"]>, "currency"> {
|
||||
pricing: NonNullable<Parking["pricing"]["localCurrency"]>["ordinary"]
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import type { RestaurantData } from "@/types/hotel"
|
||||
import type { Restaurant } from "@/types/hotel"
|
||||
|
||||
export interface RestaurantBarSidePeekProps {
|
||||
restaurants: RestaurantData[]
|
||||
restaurants: Restaurant[]
|
||||
}
|
||||
|
||||
export interface RestaurantBarItemProps {
|
||||
restaurant: RestaurantData
|
||||
restaurant: Restaurant
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { RoomData } from "@/types/hotel"
|
||||
import type { Room } from "@/types/hotel"
|
||||
|
||||
export interface RoomSidePeekProps {
|
||||
room: RoomData
|
||||
room: Room
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user