fix/SW-902-update-response-city-availability (pull request #917)

Fix/SW-902 update response city availability

* fix(SW-902): update response for API changes

* fix(SW-902): add total row for pricePerStay

* fix(SW-902): fix optional requestedPrice

* fix(SW-902): fix bookingCode output

* feat(SW-903): fix sorting


Approved-by: Pontus Dreij
Approved-by: Niclas Edenvin
This commit is contained in:
Bianca Widstam
2024-11-18 15:08:12 +00:00
parent f6b14ced8f
commit 3c4907efce
27 changed files with 217 additions and 227 deletions

View File

@@ -25,7 +25,7 @@ type Price = {
export type RoomsData = {
roomType: string
localPrice: Price
euroPrice: Price
euroPrice: Price | undefined
adults: number
children?: Child[]
cancellationText: string

View File

@@ -4,7 +4,5 @@ export type AvailabilityInput = {
roomStayEndDate: string
adults: number
children?: string
promotionCode?: string
reservationProfileType?: string
attachedProfileId?: string
bookingCode?: string
}

View File

@@ -1,5 +1,6 @@
import type { HotelsAvailabilityPrices } from "@/server/routers/hotels/output"
import type { ProductType } from "@/server/routers/hotels/output"
export type HotelPriceListProps = {
price: HotelsAvailabilityPrices
price: ProductType
hotelId: string
}

View File

@@ -1,4 +1,4 @@
import { HotelsAvailabilityPrices } from "@/server/routers/hotels/output"
import { ProductType } from "@/server/routers/hotels/output"
import { Hotel } from "@/types/hotel"
@@ -16,5 +16,5 @@ export type HotelCardListingProps = {
export type HotelData = {
hotelData: Hotel
price: HotelsAvailabilityPrices
price: ProductType
}

View File

@@ -29,8 +29,8 @@ type ImageMetaData = z.infer<typeof imageMetaDataSchema>
export type HotelPin = {
name: string
coordinates: Coordinates
publicPrice: string | null
memberPrice: string | null
publicPrice: number | null
memberPrice: number | null
currency: string | null
images: {
imageSizes: ImageSizes

View File

@@ -1,5 +1,6 @@
import { ProductTypePrices } from "@/server/routers/hotels/output"
export type PriceCardProps = {
currency: string
memberAmount?: string | undefined
regularAmount?: string | undefined
productTypePrices: ProductTypePrices
isMemberPrice?: boolean
}