Files
web/constants/booking.ts
Tobias Johansson 740419bad2 Merged in feat/SW-459-payment-flow-ui-ux (pull request #657)
Feat/SW-459 payment flow ui ux

* feat(SW-431): List payment methods and handle booking status and redirection

* feat(SW-431): small fix

* fix(SW-431): Added intl string and sorted dictionaries

* fix(SW-431): add todo comments

* feat(SW-459): Added payment method icons

* feat(SW-459): refactored into new component and added form

* feat(SW-459): Localized strings

* feat(SW-459): added checkbox

* feat(SW-459): Refactored payment options and updated payment form

* feat(SW-459): update input bg color

* feat(SW-459): add current web links and style fixes

* fix(SW-459): fix issue with booking confirmation not being accessible

* feat(SW-459): style changes

* feat(SW-459): update max width of payment container

* feat(SW-459): update create booking schema

* feat(SW-459): fixes from PR


Approved-by: Arvid Norlin
2024-10-10 12:20:41 +00:00

53 lines
1.4 KiB
TypeScript

export enum BookingStatusEnum {
CreatedInOhip = "CreatedInOhip",
PaymentRegistered = "PaymentRegistered",
BookingCompleted = "BookingCompleted",
}
export const BOOKING_CONFIRMATION_NUMBER = "bookingConfirmationNumber"
export enum PaymentMethodEnum {
card = "card",
swish = "swish",
vipps = "vipps",
mobilePay = "mobilePay",
applePay = "applePay",
googlePay = "googlePay",
alipayPlus = "alipayPlus",
weChatPay = "weChatPay",
payPal = "payPal",
klarna = "klarna",
}
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",
}
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",
}