Merged in feature/warmup (pull request #1887)
* unified warmup function Approved-by: Linus Flood
This commit is contained in:
@@ -210,17 +210,17 @@ export default function SummaryUI({
|
||||
<Body color={showMemberPrice ? "red" : "uiTextHighContrast"}>
|
||||
{showMemberPrice
|
||||
? formatPrice(
|
||||
intl,
|
||||
memberPrice.amount,
|
||||
memberPrice.currency
|
||||
)
|
||||
intl,
|
||||
memberPrice.amount,
|
||||
memberPrice.currency
|
||||
)
|
||||
: formatPrice(
|
||||
intl,
|
||||
room.roomPrice.perStay.local.price,
|
||||
room.roomPrice.perStay.local.currency,
|
||||
room.roomPrice.perStay.local.additionalPrice,
|
||||
room.roomPrice.perStay.local.additionalPriceCurrency
|
||||
)}
|
||||
intl,
|
||||
room.roomPrice.perStay.local.price,
|
||||
room.roomPrice.perStay.local.currency,
|
||||
room.roomPrice.perStay.local.additionalPrice,
|
||||
room.roomPrice.perStay.local.additionalPriceCurrency
|
||||
)}
|
||||
</Body>
|
||||
</div>
|
||||
<Caption color="uiTextMediumContrast">
|
||||
@@ -272,22 +272,22 @@ export default function SummaryUI({
|
||||
</div>
|
||||
{room.roomFeatures
|
||||
? room.roomFeatures.map((feature) => (
|
||||
<div className={styles.entry} key={feature.code}>
|
||||
<div>
|
||||
<div className={styles.entry} key={feature.code}>
|
||||
<div>
|
||||
<Body color="uiTextHighContrast">
|
||||
{feature.description}
|
||||
</Body>
|
||||
</div>
|
||||
|
||||
<Body color="uiTextHighContrast">
|
||||
{feature.description}
|
||||
{formatPrice(
|
||||
intl,
|
||||
feature.localPrice.price,
|
||||
feature.localPrice.currency
|
||||
)}
|
||||
</Body>
|
||||
</div>
|
||||
|
||||
<Body color="uiTextHighContrast">
|
||||
{formatPrice(
|
||||
intl,
|
||||
feature.localPrice.price,
|
||||
feature.localPrice.currency
|
||||
)}
|
||||
</Body>
|
||||
</div>
|
||||
))
|
||||
))
|
||||
: null}
|
||||
{room.bedType ? (
|
||||
<div className={styles.entry}>
|
||||
|
||||
@@ -144,8 +144,8 @@ export default function ConfirmationStep({
|
||||
label={
|
||||
savedCreditCards?.length
|
||||
? intl.formatMessage({
|
||||
defaultMessage: "OTHER",
|
||||
})
|
||||
defaultMessage: "OTHER",
|
||||
})
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
|
||||
@@ -2,14 +2,13 @@
|
||||
import { Button as ButtonRAC } from "react-aria-components"
|
||||
|
||||
import {
|
||||
MaterialIcon
|
||||
,type
|
||||
MaterialIconProps} from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
MaterialIcon,
|
||||
type MaterialIconProps,
|
||||
} from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import styles from "./button.module.css"
|
||||
|
||||
|
||||
interface ButtonProps extends React.PropsWithChildren {
|
||||
icon: MaterialIconProps["icon"]
|
||||
isDisabled?: boolean
|
||||
|
||||
@@ -9,14 +9,13 @@ import {
|
||||
clearGlaSessionStorage,
|
||||
readGlaFromSessionStorage,
|
||||
} from "@/components/HotelReservation/EnterDetails/Payment/PaymentCallback/helpers"
|
||||
import LoadingSpinner from "@/components/LoadingSpinner"
|
||||
import { trackEvent } from "@/utils/tracking/base"
|
||||
import { buildAncillaries } from "@/utils/tracking/myStay"
|
||||
|
||||
import {
|
||||
buildAncillaryPackages,
|
||||
getAncillarySessionData,
|
||||
} from "@/components/HotelReservation/MyStay/utils/ancillaries"
|
||||
import LoadingSpinner from "@/components/LoadingSpinner"
|
||||
import { trackEvent } from "@/utils/tracking/base"
|
||||
import { buildAncillaries } from "@/utils/tracking/myStay"
|
||||
|
||||
interface TrackGuaranteeProps {
|
||||
status: string
|
||||
@@ -93,21 +92,21 @@ export default function TrackGuarantee({
|
||||
case PaymentCallbackStatusEnum.Cancel:
|
||||
isAncillaryFlow
|
||||
? trackAncillaryPaymentEvent(
|
||||
"GuaranteeCancelAncillary",
|
||||
"glacardsavecancelled"
|
||||
)
|
||||
"GuaranteeCancelAncillary",
|
||||
"glacardsavecancelled"
|
||||
)
|
||||
: trackGuaranteePaymentEvent(
|
||||
"glaCardSaveCancelled",
|
||||
"glacardsavecancelled"
|
||||
)
|
||||
"glaCardSaveCancelled",
|
||||
"glacardsavecancelled"
|
||||
)
|
||||
break
|
||||
|
||||
case PaymentCallbackStatusEnum.Error:
|
||||
isAncillaryFlow
|
||||
? trackAncillaryPaymentEvent(
|
||||
"GuaranteeFailAncillary",
|
||||
"glacardsavefailed"
|
||||
)
|
||||
"GuaranteeFailAncillary",
|
||||
"glacardsavefailed"
|
||||
)
|
||||
: trackGuaranteePaymentEvent("glaCardSaveFailed", "glacardsavefailed")
|
||||
break
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type TbodyProps,tbodyVariants } from "./variants"
|
||||
import { type TbodyProps, tbodyVariants } from "./variants"
|
||||
|
||||
export default function Tbody({ border, children }: TbodyProps) {
|
||||
const classNames = tbodyVariants({ border })
|
||||
|
||||
@@ -29,12 +29,8 @@ export default function Campaign({
|
||||
roomTypeCode,
|
||||
}: CampaignProps) {
|
||||
const intl = useIntl()
|
||||
const {
|
||||
roomNr,
|
||||
selectedFilter,
|
||||
selectedPackages,
|
||||
selectedRate,
|
||||
} = useRoomContext()
|
||||
const { roomNr, selectedFilter, selectedPackages, selectedRate } =
|
||||
useRoomContext()
|
||||
const rateTitles = useRateTitles()
|
||||
|
||||
const isCampaignRate = campaign.some(
|
||||
@@ -78,21 +74,21 @@ export default function Campaign({
|
||||
|
||||
const rateTermDetails = product.rateDefinitionMember
|
||||
? [
|
||||
{
|
||||
title: product.rateDefinition.title,
|
||||
terms: product.rateDefinition.generalTerms,
|
||||
},
|
||||
{
|
||||
title: product.rateDefinitionMember.title,
|
||||
terms: product.rateDefinition.generalTerms,
|
||||
},
|
||||
]
|
||||
{
|
||||
title: product.rateDefinition.title,
|
||||
terms: product.rateDefinition.generalTerms,
|
||||
},
|
||||
{
|
||||
title: product.rateDefinitionMember.title,
|
||||
terms: product.rateDefinition.generalTerms,
|
||||
},
|
||||
]
|
||||
: [
|
||||
{
|
||||
title: product.rateDefinition.title,
|
||||
terms: product.rateDefinition.generalTerms,
|
||||
},
|
||||
]
|
||||
{
|
||||
title: product.rateDefinition.title,
|
||||
terms: product.rateDefinition.generalTerms,
|
||||
},
|
||||
]
|
||||
|
||||
const isSelected = isSelectedPriceProduct(
|
||||
product,
|
||||
@@ -127,12 +123,12 @@ export default function Campaign({
|
||||
|
||||
const pricePerNightMember = product.member
|
||||
? calculatePricePerNightPriceProduct(
|
||||
product.member.localPrice.pricePerNight,
|
||||
product.member.requestedPrice?.pricePerNight,
|
||||
nights,
|
||||
pkgsSum.price,
|
||||
pkgsSumRequested.price
|
||||
)
|
||||
product.member.localPrice.pricePerNight,
|
||||
product.member.requestedPrice?.pricePerNight,
|
||||
nights,
|
||||
pkgsSum.price,
|
||||
pkgsSumRequested.price
|
||||
)
|
||||
: undefined
|
||||
|
||||
let approximateRatePrice = undefined
|
||||
@@ -148,12 +144,12 @@ export default function Campaign({
|
||||
const approximateRate =
|
||||
approximateRatePrice && product.public.requestedPrice
|
||||
? {
|
||||
label: intl.formatMessage({
|
||||
defaultMessage: "Approx.",
|
||||
}),
|
||||
price: approximateRatePrice,
|
||||
unit: product.public.requestedPrice.currency,
|
||||
}
|
||||
label: intl.formatMessage({
|
||||
defaultMessage: "Approx.",
|
||||
}),
|
||||
price: approximateRatePrice,
|
||||
unit: product.public.requestedPrice.currency,
|
||||
}
|
||||
: undefined
|
||||
|
||||
return (
|
||||
@@ -167,12 +163,12 @@ export default function Campaign({
|
||||
memberRate={
|
||||
pricePerNightMember
|
||||
? {
|
||||
label: intl.formatMessage({
|
||||
defaultMessage: "Member price",
|
||||
}),
|
||||
price: pricePerNightMember.totalPrice,
|
||||
unit: `${product.member!.localPrice.currency}/${night}`,
|
||||
}
|
||||
label: intl.formatMessage({
|
||||
defaultMessage: "Member price",
|
||||
}),
|
||||
price: pricePerNightMember.totalPrice,
|
||||
unit: `${product.member!.localPrice.currency}/${night}`,
|
||||
}
|
||||
: undefined
|
||||
}
|
||||
name={`rateCode-${roomNr}-${product.public.rateCode}`}
|
||||
@@ -186,15 +182,15 @@ export default function Campaign({
|
||||
omnibusRate={
|
||||
product.public.localPrice.omnibusPricePerNight
|
||||
? {
|
||||
label: intl
|
||||
.formatMessage({
|
||||
defaultMessage: "Lowest price (last 30 days)",
|
||||
})
|
||||
.toUpperCase(),
|
||||
price:
|
||||
product.public.localPrice.omnibusPricePerNight.toString(),
|
||||
unit: product.public.localPrice.currency,
|
||||
}
|
||||
label: intl
|
||||
.formatMessage({
|
||||
defaultMessage: "Lowest price (last 30 days)",
|
||||
})
|
||||
.toUpperCase(),
|
||||
price:
|
||||
product.public.localPrice.omnibusPricePerNight.toString(),
|
||||
unit: product.public.localPrice.currency,
|
||||
}
|
||||
: undefined
|
||||
}
|
||||
rateTermDetails={rateTermDetails}
|
||||
|
||||
@@ -79,9 +79,9 @@ export default function Redemptions({
|
||||
additionalPrice:
|
||||
additionalPrice && additionalPriceCurrency
|
||||
? {
|
||||
currency: additionalPriceCurrency,
|
||||
price: additionalPrice.toString(),
|
||||
}
|
||||
currency: additionalPriceCurrency,
|
||||
price: additionalPrice.toString(),
|
||||
}
|
||||
: undefined,
|
||||
currency: "PTS",
|
||||
isDisabled: !r.redemption.hasEnoughPoints,
|
||||
|
||||
Reference in New Issue
Block a user