Merged in feat/SW-1711-switch-icons (pull request #1558)
Switches out all the old icons to new ones, and moves them to the design system. The new icons are of three different types: Materialise Symbol, Nucleo, and Customized. Also adds further mapping between facilities/amenities and icons. Approved-by: Michael Zetterberg Approved-by: Erik Tiekstra
This commit is contained in:
@@ -1,171 +0,0 @@
|
||||
import {
|
||||
ExtraBunkBedIcon,
|
||||
ExtraPullOutBedIcon,
|
||||
ExtraSofaBedIcon,
|
||||
ExtraWallBedIcon,
|
||||
KingBedIcon,
|
||||
QueenBedIcon,
|
||||
SingleBedIcon,
|
||||
TwinBedsIcon,
|
||||
} from "@/components/Icons"
|
||||
|
||||
import type { IconProps } from "@/types/components/icon"
|
||||
|
||||
export enum BookingStatusEnum {
|
||||
BookingCompleted = "BookingCompleted",
|
||||
Cancelled = "Cancelled",
|
||||
CheckedOut = "CheckedOut",
|
||||
ConfirmedInScorpio = "ConfirmedInScorpio",
|
||||
CreatedInOhip = "CreatedInOhip",
|
||||
PaymentAuthorized = "PaymentAuthorized",
|
||||
PaymentCancelled = "PaymentCancelled",
|
||||
PaymentError = "PaymentError",
|
||||
PaymentFailed = "PaymentFailed",
|
||||
PaymentRegistered = "PaymentRegistered",
|
||||
PaymentSucceeded = "PaymentSucceeded",
|
||||
PendingAcceptPriceChange = "PendingAcceptPriceChange",
|
||||
PendingGuarantee = "PendingGuarantee",
|
||||
PendingPayment = "PendingPayment",
|
||||
}
|
||||
|
||||
export enum ChildBedTypeEnum {
|
||||
Crib = "Crib",
|
||||
ExtraBed = "ExtraBed",
|
||||
ParentsBed = "ParentsBed",
|
||||
Unknown = "Unknown",
|
||||
}
|
||||
|
||||
export const REDEMPTION = "redemption"
|
||||
export const SEARCHTYPE = "searchtype"
|
||||
|
||||
export const BOOKING_CONFIRMATION_NUMBER = "confirmationNumber"
|
||||
|
||||
export const MEMBERSHIP_FAILED_ERROR = "MembershipFailedError"
|
||||
|
||||
export enum PaymentMethodEnum {
|
||||
card = "card",
|
||||
swish = "swish",
|
||||
vipps = "vipps",
|
||||
mobilePay = "mobilePay",
|
||||
applePay = "applePay",
|
||||
googlePay = "googlePay",
|
||||
alipayPlus = "alipayPlus",
|
||||
weChatPay = "weChatPay",
|
||||
payPal = "payPal",
|
||||
klarna = "klarna",
|
||||
americanExpress = "americanExpress",
|
||||
dankort = "dankort",
|
||||
dinersClub = "dinersClub",
|
||||
jcb = "jcb",
|
||||
masterCard = "masterCard",
|
||||
visa = "visa",
|
||||
maestro = "maestro",
|
||||
chinaUnionPay = "chinaUnionPay",
|
||||
discover = "discover",
|
||||
}
|
||||
|
||||
export enum BookingErrorCodeEnum {
|
||||
InternalError = "InternalError",
|
||||
ReservationError = "ReservationError",
|
||||
AvailabilityError = "AvailabilityError",
|
||||
BookingStatusNotFound = "BookingStatusNotFound",
|
||||
TransactionAbandoned = "TransactionAbandoned",
|
||||
TransactionCancelled = "TransactionCancelled",
|
||||
TransactionFailed = "TransactionFailed",
|
||||
BookingStateError = "BookingStateError",
|
||||
MembershipFailedError = "MembershipFailedError",
|
||||
}
|
||||
|
||||
export const PAYMENT_METHOD_TITLES: Record<
|
||||
keyof typeof PaymentMethodEnum,
|
||||
string
|
||||
> = {
|
||||
card: "Credit card",
|
||||
swish: "Swish",
|
||||
vipps: "Vipps",
|
||||
mobilePay: "MobilePay",
|
||||
applePay: "Apple Pay",
|
||||
googlePay: "Google Pay",
|
||||
alipayPlus: "Alipay+",
|
||||
weChatPay: "WeChat Pay",
|
||||
payPal: "PayPal",
|
||||
klarna: "Klarna",
|
||||
americanExpress: "American Express",
|
||||
dankort: "Dankort",
|
||||
dinersClub: "Diners Club",
|
||||
jcb: "JCB",
|
||||
masterCard: "Mastercard",
|
||||
visa: "Visa",
|
||||
maestro: "Maestro",
|
||||
chinaUnionPay: "China UnionPay",
|
||||
discover: "Discover",
|
||||
}
|
||||
|
||||
export const PAYMENT_METHOD_ICONS: Record<
|
||||
keyof typeof PaymentMethodEnum,
|
||||
string
|
||||
> = {
|
||||
card: "/_static/icons/payment/mastercard.svg",
|
||||
swish: "/_static/icons/payment/swish.svg",
|
||||
vipps: "/_static/icons/payment/vipps.svg",
|
||||
mobilePay: "/_static/icons/payment/mobilepay.svg",
|
||||
applePay: "/_static/icons/payment/apple-pay.svg",
|
||||
googlePay: "/_static/icons/payment/google-pay.svg",
|
||||
alipayPlus: "/_static/icons/payment/alipay-plus.svg",
|
||||
weChatPay: "/_static/icons/payment/wechat-pay.svg",
|
||||
payPal: "/_static/icons/payment/paypal.svg",
|
||||
klarna: "/_static/icons/payment/klarna.svg",
|
||||
americanExpress: "/_static/icons/payment/american-express.svg",
|
||||
dankort: "/_static/icons/payment/dankort.svg",
|
||||
dinersClub: "/_static/icons/payment/diners-club.svg",
|
||||
jcb: "/_static/icons/payment/jcb.svg",
|
||||
masterCard: "/_static/icons/payment/mastercard.svg",
|
||||
visa: "/_static/icons/payment/visa.svg",
|
||||
maestro: "/_static/icons/payment/maestro.svg",
|
||||
chinaUnionPay: "/_static/icons/payment/china-union-pay.svg",
|
||||
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",
|
||||
}
|
||||
|
||||
type BedTypes = keyof typeof BedTypeEnum | keyof typeof ExtraBedTypeEnum
|
||||
|
||||
export const BED_TYPE_ICONS: Record<
|
||||
BedTypes,
|
||||
(props: IconProps) => JSX.Element
|
||||
> = {
|
||||
King: KingBedIcon,
|
||||
Queen: QueenBedIcon,
|
||||
Single: SingleBedIcon,
|
||||
Twin: TwinBedsIcon,
|
||||
SofaBed: ExtraSofaBedIcon,
|
||||
WallBed: ExtraWallBedIcon,
|
||||
BunkBed: ExtraBunkBedIcon,
|
||||
PullOutBed: ExtraPullOutBedIcon,
|
||||
Other: SingleBedIcon,
|
||||
}
|
||||
|
||||
export enum CancellationRuleEnum {
|
||||
CancellableBefore6PM = "CancellableBefore6PM",
|
||||
NonCancellable = "NonCancellable",
|
||||
Changeable = "Changeable",
|
||||
}
|
||||
|
||||
export enum PaymentCallbackStatusEnum {
|
||||
Success = "success",
|
||||
Error = "error",
|
||||
Cancel = "cancel",
|
||||
}
|
||||
Reference in New Issue
Block a user