Merged in feat/sw-2864-move-hotels-router-to-trpc-package (pull request #2410)
feat (SW-2864): Move booking router to trpc package * Add env to trpc package * Add eslint to trpc package * Apply lint rules * Use direct imports from trpc package * Add lint-staged config to trpc * Move lang enum to common * Restructure trpc package folder structure * WIP first step * update internal imports in trpc * Fix most errors in scandic-web Just 100 left... * Move Props type out of trpc * Fix CategorizedFilters types * Move more schemas in hotel router * Fix deps * fix getNonContentstackUrls * Fix import error * Fix entry error handling * Fix generateMetadata metrics * Fix alertType enum * Fix duplicated types * lint:fix * Merge branch 'master' into feat/sw-2863-move-contentstack-router-to-trpc-package * Fix broken imports * Move booking router to trpc package * Merge branch 'master' into feat/sw-2864-move-hotels-router-to-trpc-package Approved-by: Linus Flood
This commit is contained in:
@@ -7,9 +7,14 @@ import BedSingleIcon from "@scandic-hotels/design-system/Icons/BedSingleIcon"
|
||||
import BedSofaExtraIcon from "@scandic-hotels/design-system/Icons/BedSofaExtraIcon"
|
||||
import BedTwinIcon from "@scandic-hotels/design-system/Icons/BedTwinIcon"
|
||||
import BedWallExtraIcon from "@scandic-hotels/design-system/Icons/BedWallExtraIcon"
|
||||
import { REDEMPTION } from "@scandic-hotels/trpc/constants/booking"
|
||||
|
||||
import type { PaymentMethodEnum } from "@scandic-hotels/common/constants/paymentMethod"
|
||||
import type { IconProps } from "@scandic-hotels/design-system/Icons"
|
||||
import type {
|
||||
BedTypeEnum,
|
||||
ExtraBedTypeEnum,
|
||||
} from "@scandic-hotels/trpc/enums/bedType"
|
||||
import type { JSX } from "react"
|
||||
|
||||
export enum BookingStatusEnum {
|
||||
@@ -31,25 +36,11 @@ export enum BookingStatusEnum {
|
||||
|
||||
export const FamilyAndFriendsCodes = ["D000029555", "D000029271", "D000029195"]
|
||||
|
||||
export const REDEMPTION = "redemption"
|
||||
export const bookingSearchTypes = [REDEMPTION] as const
|
||||
export const SEARCHTYPE = "searchtype"
|
||||
|
||||
export const MEMBERSHIP_FAILED_ERROR = "MembershipFailedError"
|
||||
|
||||
export enum BookingErrorCodeEnum {
|
||||
InternalError = "InternalError",
|
||||
ReservationError = "ReservationError",
|
||||
AvailabilityError = "AvailabilityError",
|
||||
BookingStatusNotFound = "BookingStatusNotFound",
|
||||
TransactionAbandoned = "TransactionAbandoned",
|
||||
TransactionCancelled = "TransactionCancelled",
|
||||
TransactionFailed = "TransactionFailed",
|
||||
BookingStateError = "BookingStateError",
|
||||
MembershipFailedError = "MembershipFailedError",
|
||||
NoAvailabilityForRateAndRoomType = "NoAvailabilityForRateAndRoomType",
|
||||
}
|
||||
|
||||
export const PAYMENT_METHOD_TITLES: Record<
|
||||
keyof typeof PaymentMethodEnum,
|
||||
string
|
||||
@@ -100,21 +91,6 @@ export const PAYMENT_METHOD_ICONS: Record<
|
||||
discover: "/_static/icons/payment/discover.svg",
|
||||
}
|
||||
|
||||
export enum BedTypeEnum {
|
||||
King = "King",
|
||||
Queen = "Queen",
|
||||
Single = "Single",
|
||||
Twin = "Twin",
|
||||
Other = "Other",
|
||||
}
|
||||
|
||||
export enum ExtraBedTypeEnum {
|
||||
SofaBed = "SofaBed",
|
||||
WallBed = "WallBed",
|
||||
PullOutBed = "PullOutBed",
|
||||
BunkBed = "BunkBed",
|
||||
}
|
||||
|
||||
export type BedTypes = keyof typeof BedTypeEnum | keyof typeof ExtraBedTypeEnum
|
||||
|
||||
export const BED_TYPE_ICONS: Record<
|
||||
|
||||
Reference in New Issue
Block a user