feat(SW-1717): rewrite select-rate to show all variants of rate-cards
This commit is contained in:
committed by
Michael Zetterberg
parent
adde77eaa9
commit
ebaea78fb3
@@ -1,158 +1,158 @@
|
||||
import { BedTypeEnum } from "@/constants/booking"
|
||||
// import { BedTypeEnum } from "@/constants/booking"
|
||||
|
||||
import { ChildBedMapEnum } from "@/types/components/bookingWidget/enums"
|
||||
import type { BreakfastPackage } from "@/types/components/hotelReservation/breakfast"
|
||||
import type { BedTypeSelection } from "@/types/components/hotelReservation/enterDetails/bedType"
|
||||
import type {
|
||||
DetailsSchema,
|
||||
RoomPrice,
|
||||
RoomRate,
|
||||
SignedInDetailsSchema,
|
||||
} from "@/types/components/hotelReservation/enterDetails/details"
|
||||
import { RoomPackageCodeEnum } from "@/types/components/hotelReservation/selectRate/roomFilter"
|
||||
import type { SelectRateSearchParams } from "@/types/components/hotelReservation/selectRate/selectRate"
|
||||
import { CurrencyEnum } from "@/types/enums/currency"
|
||||
import { PackageTypeEnum } from "@/types/enums/packages"
|
||||
// import { ChildBedMapEnum } from "@/types/components/bookingWidget/enums"
|
||||
// import type { BreakfastPackage } from "@/types/components/hotelReservation/breakfast"
|
||||
// import type { BedTypeSelection } from "@/types/components/hotelReservation/enterDetails/bedType"
|
||||
// import type {
|
||||
// DetailsSchema,
|
||||
// RoomPrice,
|
||||
// RoomRate,
|
||||
// SignedInDetailsSchema,
|
||||
// } from "@/types/components/hotelReservation/enterDetails/details"
|
||||
// import { RoomPackageCodeEnum } from "@/types/components/hotelReservation/selectRate/roomFilter"
|
||||
// import type { SelectRateSearchParams } from "@/types/components/hotelReservation/selectRate/selectRate"
|
||||
// import { CurrencyEnum } from "@/types/enums/currency"
|
||||
// import { PackageTypeEnum } from "@/types/enums/packages"
|
||||
|
||||
export const booking: SelectRateSearchParams = {
|
||||
city: "Stockholm",
|
||||
hotelId: "811",
|
||||
fromDate: "2030-01-01",
|
||||
toDate: "2030-01-03",
|
||||
rooms: [
|
||||
{
|
||||
adults: 2,
|
||||
roomTypeCode: "SKS",
|
||||
rateCode: "",
|
||||
counterRateCode: "",
|
||||
childrenInRoom: [{ bed: ChildBedMapEnum.IN_EXTRA_BED, age: 5 }],
|
||||
packages: [RoomPackageCodeEnum.PET_ROOM],
|
||||
},
|
||||
{
|
||||
adults: 2,
|
||||
roomTypeCode: "SKS",
|
||||
rateCode: "",
|
||||
counterRateCode: "",
|
||||
childrenInRoom: [{ bed: ChildBedMapEnum.IN_EXTRA_BED, age: 5 }],
|
||||
packages: [RoomPackageCodeEnum.PET_ROOM],
|
||||
},
|
||||
],
|
||||
}
|
||||
// export const booking: SelectRateSearchParams = {
|
||||
// city: "Stockholm",
|
||||
// hotelId: "811",
|
||||
// fromDate: "2030-01-01",
|
||||
// toDate: "2030-01-03",
|
||||
// rooms: [
|
||||
// {
|
||||
// adults: 2,
|
||||
// roomTypeCode: "SKS",
|
||||
// rateCode: "",
|
||||
// counterRateCode: "",
|
||||
// childrenInRoom: [{ bed: ChildBedMapEnum.IN_EXTRA_BED, age: 5 }],
|
||||
// packages: [RoomPackageCodeEnum.PET_ROOM],
|
||||
// },
|
||||
// {
|
||||
// adults: 2,
|
||||
// roomTypeCode: "SKS",
|
||||
// rateCode: "",
|
||||
// counterRateCode: "",
|
||||
// childrenInRoom: [{ bed: ChildBedMapEnum.IN_EXTRA_BED, age: 5 }],
|
||||
// packages: [RoomPackageCodeEnum.PET_ROOM],
|
||||
// },
|
||||
// ],
|
||||
// }
|
||||
|
||||
export const breakfastPackage: BreakfastPackage = {
|
||||
code: "BRF1",
|
||||
description: "Breakfast with reservation",
|
||||
localPrice: { currency: "SEK", price: 99, totalPrice: 99 },
|
||||
requestedPrice: {
|
||||
currency: "EUR",
|
||||
price: 9,
|
||||
totalPrice: 9,
|
||||
},
|
||||
packageType: PackageTypeEnum.BreakfastAdult as const,
|
||||
}
|
||||
// export const breakfastPackage: BreakfastPackage = {
|
||||
// code: "BRF1",
|
||||
// description: "Breakfast with reservation",
|
||||
// localPrice: { currency: "SEK", price: 99, totalPrice: 99 },
|
||||
// requestedPrice: {
|
||||
// currency: "EUR",
|
||||
// price: 9,
|
||||
// totalPrice: 9,
|
||||
// },
|
||||
// packageType: PackageTypeEnum.BreakfastAdult as const,
|
||||
// }
|
||||
|
||||
export const roomRate: RoomRate = {
|
||||
memberRate: {
|
||||
rateCode: "PLSA2BEU",
|
||||
localPrice: {
|
||||
pricePerNight: 1508,
|
||||
pricePerStay: 1508,
|
||||
currency: CurrencyEnum.SEK,
|
||||
},
|
||||
requestedPrice: {
|
||||
pricePerNight: 132,
|
||||
pricePerStay: 132,
|
||||
currency: CurrencyEnum.EUR,
|
||||
},
|
||||
},
|
||||
publicRate: {
|
||||
rateCode: "SAVEEU",
|
||||
localPrice: {
|
||||
pricePerNight: 1525,
|
||||
pricePerStay: 1525,
|
||||
currency: CurrencyEnum.SEK,
|
||||
},
|
||||
requestedPrice: {
|
||||
pricePerNight: 133,
|
||||
pricePerStay: 133,
|
||||
currency: CurrencyEnum.EUR,
|
||||
},
|
||||
},
|
||||
}
|
||||
// export const roomRate: RoomRate = {
|
||||
// memberRate: {
|
||||
// rateCode: "PLSA2BEU",
|
||||
// localPrice: {
|
||||
// pricePerNight: 1508,
|
||||
// pricePerStay: 1508,
|
||||
// currency: CurrencyEnum.SEK,
|
||||
// },
|
||||
// requestedPrice: {
|
||||
// pricePerNight: 132,
|
||||
// pricePerStay: 132,
|
||||
// currency: CurrencyEnum.EUR,
|
||||
// },
|
||||
// },
|
||||
// publicRate: {
|
||||
// rateCode: "SAVEEU",
|
||||
// localPrice: {
|
||||
// pricePerNight: 1525,
|
||||
// pricePerStay: 1525,
|
||||
// currency: CurrencyEnum.SEK,
|
||||
// },
|
||||
// requestedPrice: {
|
||||
// pricePerNight: 133,
|
||||
// pricePerStay: 133,
|
||||
// currency: CurrencyEnum.EUR,
|
||||
// },
|
||||
// },
|
||||
// }
|
||||
|
||||
export const roomPrice: RoomPrice = {
|
||||
perNight: {
|
||||
local: {
|
||||
currency: "SEK",
|
||||
price: 1525,
|
||||
},
|
||||
requested: {
|
||||
currency: "EUR",
|
||||
price: 133,
|
||||
},
|
||||
},
|
||||
perStay: {
|
||||
local: {
|
||||
currency: "SEK",
|
||||
price: 1525,
|
||||
},
|
||||
requested: {
|
||||
currency: "EUR",
|
||||
price: 133,
|
||||
},
|
||||
},
|
||||
}
|
||||
// export const roomPrice: RoomPrice = {
|
||||
// perNight: {
|
||||
// local: {
|
||||
// currency: "SEK",
|
||||
// price: 1525,
|
||||
// },
|
||||
// requested: {
|
||||
// currency: "EUR",
|
||||
// price: 133,
|
||||
// },
|
||||
// },
|
||||
// perStay: {
|
||||
// local: {
|
||||
// currency: "SEK",
|
||||
// price: 1525,
|
||||
// },
|
||||
// requested: {
|
||||
// currency: "EUR",
|
||||
// price: 133,
|
||||
// },
|
||||
// },
|
||||
// }
|
||||
|
||||
export const bedType: { [x: string]: BedTypeSelection } = {
|
||||
king: {
|
||||
type: BedTypeEnum.King,
|
||||
description: "King-size bed",
|
||||
value: "SKS",
|
||||
size: {
|
||||
min: 180,
|
||||
max: 200,
|
||||
},
|
||||
extraBed: undefined,
|
||||
},
|
||||
queen: {
|
||||
type: BedTypeEnum.Queen,
|
||||
description: "Queen-size bed",
|
||||
value: "QZ",
|
||||
size: {
|
||||
min: 160,
|
||||
max: 200,
|
||||
},
|
||||
extraBed: undefined,
|
||||
},
|
||||
single: {
|
||||
type: BedTypeEnum.Single,
|
||||
description: "Single bed",
|
||||
size: {
|
||||
max: 140,
|
||||
min: 100,
|
||||
},
|
||||
value: "CSR",
|
||||
extraBed: undefined,
|
||||
},
|
||||
}
|
||||
// export const bedType: { [x: string]: BedTypeSelection } = {
|
||||
// king: {
|
||||
// type: BedTypeEnum.King,
|
||||
// description: "King-size bed",
|
||||
// value: "SKS",
|
||||
// size: {
|
||||
// min: 180,
|
||||
// max: 200,
|
||||
// },
|
||||
// extraBed: undefined,
|
||||
// },
|
||||
// queen: {
|
||||
// type: BedTypeEnum.Queen,
|
||||
// description: "Queen-size bed",
|
||||
// value: "QZ",
|
||||
// size: {
|
||||
// min: 160,
|
||||
// max: 200,
|
||||
// },
|
||||
// extraBed: undefined,
|
||||
// },
|
||||
// single: {
|
||||
// type: BedTypeEnum.Single,
|
||||
// description: "Single bed",
|
||||
// size: {
|
||||
// max: 140,
|
||||
// min: 100,
|
||||
// },
|
||||
// value: "CSR",
|
||||
// extraBed: undefined,
|
||||
// },
|
||||
// }
|
||||
|
||||
export const guestDetailsNonMember: DetailsSchema = {
|
||||
join: false,
|
||||
countryCode: "SE",
|
||||
email: "tester@testersson.com",
|
||||
firstName: "Test",
|
||||
lastName: "Testersson",
|
||||
phoneNumber: "72727272",
|
||||
}
|
||||
// export const guestDetailsNonMember: DetailsSchema = {
|
||||
// join: false,
|
||||
// countryCode: "SE",
|
||||
// email: "tester@testersson.com",
|
||||
// firstName: "Test",
|
||||
// lastName: "Testersson",
|
||||
// phoneNumber: "72727272",
|
||||
// }
|
||||
|
||||
export const guestDetailsMember: SignedInDetailsSchema = {
|
||||
join: false,
|
||||
countryCode: "SE",
|
||||
email: "tester@testersson.com",
|
||||
firstName: "Test",
|
||||
lastName: "Testersson",
|
||||
phoneNumber: "72727272",
|
||||
zipCode: "12345",
|
||||
dateOfBirth: "1999-01-01",
|
||||
membershipNo: "12421412211212",
|
||||
}
|
||||
// export const guestDetailsMember: SignedInDetailsSchema = {
|
||||
// join: false,
|
||||
// countryCode: "SE",
|
||||
// email: "tester@testersson.com",
|
||||
// firstName: "Test",
|
||||
// lastName: "Testersson",
|
||||
// phoneNumber: "72727272",
|
||||
// zipCode: "12345",
|
||||
// dateOfBirth: "1999-01-01",
|
||||
// membershipNo: "12421412211212",
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user