fix: clean up hotel and its typings

This commit is contained in:
Simon Emanuelsson
2024-12-17 16:17:25 +01:00
parent ec74af8814
commit 13a164242f
110 changed files with 1931 additions and 1559 deletions

View File

@@ -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"]

View File

@@ -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[]
}

View File

@@ -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 = {

View File

@@ -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"]
}

View File

@@ -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
}

View File

@@ -1,5 +1,5 @@
import type { RoomData } from "@/types/hotel"
import type { Room } from "@/types/hotel"
export interface RoomSidePeekProps {
room: RoomData
room: Room
}