Merged in chore/cleanup-booking-flow (pull request #2824)
chore: Cleanup booking-flow after migration * Remove unused types * Clean up exports, types, unused files etc in booking-flow Approved-by: Joakim Jäderberg
This commit is contained in:
@@ -15,7 +15,7 @@ import useLang from "../../../../../hooks/useLang"
|
||||
|
||||
import styles from "./joinScandicFriendsCard.module.css"
|
||||
|
||||
export type JoinScandicFriendsCardProps = {
|
||||
type JoinScandicFriendsCardProps = {
|
||||
name?: string
|
||||
}
|
||||
export default function JoinScandicFriendsCard({
|
||||
|
||||
@@ -12,7 +12,7 @@ const stringMatcher =
|
||||
|
||||
const isValidString = (key: string) => stringMatcher.test(key)
|
||||
|
||||
export const baseDetailsSchema = z.object({
|
||||
const baseDetailsSchema = z.object({
|
||||
countryCode: z.string().min(1, roomOneErrors.COUNTRY_REQUIRED),
|
||||
email: z.string().email(roomOneErrors.EMAIL_REQUIRED),
|
||||
firstName: z
|
||||
@@ -31,7 +31,7 @@ export const baseDetailsSchema = z.object({
|
||||
specialRequest: specialRequestSchema,
|
||||
})
|
||||
|
||||
export const notJoinDetailsSchema = baseDetailsSchema.merge(
|
||||
const notJoinDetailsSchema = baseDetailsSchema.merge(
|
||||
z.object({
|
||||
join: z.literal<boolean>(false),
|
||||
zipCode: z.string().optional(),
|
||||
@@ -54,7 +54,7 @@ export const notJoinDetailsSchema = baseDetailsSchema.merge(
|
||||
})
|
||||
)
|
||||
|
||||
export const joinDetailsSchema = baseDetailsSchema.merge(
|
||||
const joinDetailsSchema = baseDetailsSchema.merge(
|
||||
z.object({
|
||||
join: z.literal<boolean>(true),
|
||||
zipCode: z
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { z } from "zod"
|
||||
|
||||
export enum FloorPreference {
|
||||
enum FloorPreference {
|
||||
LOW = "Low floor",
|
||||
HIGH = "High floor",
|
||||
}
|
||||
|
||||
export enum ElevatorPreference {
|
||||
enum ElevatorPreference {
|
||||
AWAY_FROM_ELEVATOR = "Away from elevator",
|
||||
NEAR_ELEVATOR = "Near elevator",
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import styles from "./header.module.css"
|
||||
|
||||
import type { HotelData } from "@scandic-hotels/trpc/types/hotel"
|
||||
|
||||
export type HotelHeaderProps = {
|
||||
type HotelHeaderProps = {
|
||||
hotelData: HotelData & { url: string | null }
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ import type { PriceChangeData } from "../PriceChangeData"
|
||||
const maxRetries = 15
|
||||
const retryInterval = 2000
|
||||
|
||||
export type PaymentClientProps = {
|
||||
type PaymentClientProps = {
|
||||
otherPaymentOptions: PaymentMethodEnum[]
|
||||
savedCreditCards: CreditCard[] | null
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import { EnterDetailsStepEnum } from "../../../stores/enter-details/enterDetails
|
||||
|
||||
import styles from "./section.module.css"
|
||||
|
||||
export type SectionProps = {
|
||||
type SectionProps = {
|
||||
header: string
|
||||
label: string
|
||||
additionalInfo?: string | null
|
||||
|
||||
@@ -11,15 +11,3 @@ export function getMemberPrice(roomRate: Product) {
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
export function getPublicPrice(roomRate: Product) {
|
||||
if ("public" in roomRate && roomRate.public) {
|
||||
return {
|
||||
amount: roomRate.public.localPrice.pricePerStay,
|
||||
currency: roomRate.public.localPrice.currency,
|
||||
pricePerNight: roomRate.public.localPrice.pricePerNight,
|
||||
}
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user