Merged in feat/sw-3587-add-partner-copy-for-member-price (pull request #3053)

feat(SW-3587): Add new member price copy to partner variants

* Add new member price copy to partner variants


Approved-by: Joakim Jäderberg
This commit is contained in:
Anton Gunnarsson
2025-11-03 07:57:23 +00:00
parent a7593597a6
commit b2398dba4a
7 changed files with 57 additions and 13 deletions

View File

@@ -62,6 +62,7 @@ export const Default: Story = {
},
state: 'default',
isAlternative: false,
isPartnerBrand: false,
type: 'pageListing',
isUserLoggedIn: false,
distanceToCityCenter: 0,

View File

@@ -21,6 +21,7 @@ export type PriceCardProps = {
isMemberPrice?: boolean
className?: string
isCampaign?: boolean
isPartnerBrand: boolean
}
export function HotelPriceCard({
@@ -28,6 +29,7 @@ export function HotelPriceCard({
isMemberPrice = false,
className,
isCampaign = false,
isPartnerBrand,
}: PriceCardProps) {
const intl = useIntl()
const isRegularOrPublicPromotionRate =
@@ -45,10 +47,19 @@ export function HotelPriceCard({
className={styles.redColor}
>
<p>
{intl.formatMessage({
id: 'booking.memberPrice',
defaultMessage: 'Member price',
})}
{isPartnerBrand
? intl.formatMessage({
id: 'booking.scandicFriendsMemberPrice',
defaultMessage: 'Scandic Friends member price',
description: {
context:
'Member price label in white label partner sites',
},
})
: intl.formatMessage({
id: 'booking.memberPrice',
defaultMessage: 'Member price',
})}
</p>
</Typography>
</dt>

View File

@@ -106,6 +106,7 @@ export type HotelCardProps = {
state?: 'default' | 'active'
bookingCode?: string | null
isAlternative?: boolean
isPartnerBrand: boolean
pointsCurrency?: CurrencyEnum
fullPrice: boolean
isCampaignWithBookingCode: boolean
@@ -128,6 +129,7 @@ export const HotelCard = memo(
type = 'pageListing',
bookingCode = '',
isAlternative,
isPartnerBrand,
pointsCurrency,
images,
lang,
@@ -288,6 +290,7 @@ export const HotelCard = memo(
prices?.public && (
<HotelPriceCard
productTypePrices={prices.public}
isPartnerBrand={isPartnerBrand}
className={styles.priceCard}
isCampaign={isCampaign}
/>
@@ -295,6 +298,7 @@ export const HotelCard = memo(
{prices.member && (
<HotelPriceCard
productTypePrices={prices.member}
isPartnerBrand={isPartnerBrand}
className={styles.priceCard}
isMemberPrice
/>