fix: move crunching of data to trpc layer

This commit is contained in:
Christel Westerberg
2024-10-30 15:21:51 +01:00
parent 7710d3f8f9
commit 46622d0515
10 changed files with 345 additions and 109 deletions

View File

@@ -2,4 +2,16 @@ import { z } from "zod"
import { bedTypeSchema } from "@/components/HotelReservation/EnterDetails/BedType/schema"
type BedType = {
description: string
size: {
min: number
max: number
}
value: string
}
export type BedTypeProps = {
bedTypes: BedType[]
}
export interface BedTypeSchema extends z.output<typeof bedTypeSchema> {}

View File

@@ -16,10 +16,15 @@ export interface BookingData {
room: Room[]
}
type Price = {
price?: string
currency?: string
}
export type RoomsData = {
roomType: string
localPrice: string
euroPrice: string
localPrice: Price
euroPrice: Price
adults: number
children?: Child[]
cancellationText: string