Merged in fix/sw-2543-toc-text (pull request #1921)

fix(SW-2543): Change terms and conditions text for flex

* fix(SW-2543): Change terms and conditions text for flex

Approved-by: Michael Zetterberg
This commit is contained in:
Niclas Edenvin
2025-05-02 07:45:37 +00:00
parent 43bdd80dff
commit d7708b682a
5 changed files with 78 additions and 37 deletions

View File

@@ -135,7 +135,7 @@ export default function ConfirmBooking({
) : null} ) : null}
</div> </div>
<div className={styles.checkboxContainer}> <div className={styles.checkboxContainer}>
<TermsAndConditions /> <TermsAndConditions isFlexBookingTerms />
</div> </div>
</div> </div>
) )
@@ -156,7 +156,7 @@ export function ConfirmBookingRedemption() {
</Typography> </Typography>
</div> </div>
<div className={styles.checkboxContainer}> <div className={styles.checkboxContainer}>
<TermsAndConditions /> <TermsAndConditions isFlexBookingTerms />
</div> </div>
</div> </div>
) )

View File

@@ -586,7 +586,7 @@ export default function PaymentClient({
</section> </section>
<section className={styles.section}> <section className={styles.section}>
<TermsAndConditions /> <TermsAndConditions isFlexBookingTerms={hasOnlyFlexRates} />
</section> </section>
</> </>
)} )}

View File

@@ -12,45 +12,82 @@ import useLang from "@/hooks/useLang"
import styles from "../payment.module.css" import styles from "../payment.module.css"
export default function TermsAndConditions() { import type { TermsAndConditionsProps } from "@/types/components/hotelReservation/enterDetails/payment"
export default function TermsAndConditions({
isFlexBookingTerms,
}: TermsAndConditionsProps) {
const intl = useIntl() const intl = useIntl()
const lang = useLang() const lang = useLang()
return ( return (
<> <>
<Caption> <Caption>
{intl.formatMessage( {isFlexBookingTerms
{ ? intl.formatMessage(
defaultMessage: {
"I accept the terms for this booking and the general <termsAndConditionsLink>Terms & Conditions</termsAndConditionsLink>, and understand that Scandic will process my personal data for this booking in accordance with <privacyPolicyLink>Scandic's Privacy policy</privacyPolicyLink>. I also accept that Scandic requires a valid payment card during my visit in case anything is left unpaid.", defaultMessage:
}, "I accept the terms for this booking and the general <termsAndConditionsLink>Terms & Conditions</termsAndConditionsLink>, and understand that Scandic will process my personal data for this booking in accordance with <privacyPolicyLink>Scandic's Privacy policy</privacyPolicyLink>.",
{ },
termsAndConditionsLink: (str) => ( {
<Link termsAndConditionsLink: (str) => (
className={styles.link} <Link
variant="underscored" className={styles.link}
href={bookingTermsAndConditions[lang]} variant="underscored"
target="_blank" href={bookingTermsAndConditions[lang]}
weight="bold" target="_blank"
size="small" weight="bold"
> size="small"
{str} >
</Link> {str}
), </Link>
privacyPolicyLink: (str) => ( ),
<Link privacyPolicyLink: (str) => (
className={styles.link} <Link
variant="underscored" className={styles.link}
href={privacyPolicy[lang]} variant="underscored"
target="_blank" href={privacyPolicy[lang]}
weight="bold" target="_blank"
size="small" weight="bold"
> size="small"
{str} >
</Link> {str}
), </Link>
} ),
)} }
)
: intl.formatMessage(
{
defaultMessage:
"By paying with any of the payment methods available, I accept the terms for this booking and the general <termsAndConditionsLink>Terms & Conditions</termsAndConditionsLink>, and understand that Scandic will process my personal data for this booking in accordance with <privacyPolicyLink>Scandic's Privacy policy</privacyPolicyLink>. I also accept that Scandic requires a valid payment card during my visit in case anything is left unpaid.",
},
{
termsAndConditionsLink: (str) => (
<Link
className={styles.link}
variant="underscored"
href={bookingTermsAndConditions[lang]}
target="_blank"
weight="bold"
size="small"
>
{str}
</Link>
),
privacyPolicyLink: (str) => (
<Link
className={styles.link}
variant="underscored"
href={privacyPolicy[lang]}
target="_blank"
weight="bold"
size="small"
>
{str}
</Link>
),
}
)}
</Caption> </Caption>
<Checkbox name="termsAndConditions"> <Checkbox name="termsAndConditions">
<Caption> <Caption>

View File

@@ -105,7 +105,7 @@ export default function Form() {
const guaranteeMsg = intl.formatMessage( const guaranteeMsg = intl.formatMessage(
{ {
defaultMessage: defaultMessage:
"By guaranteeing with any of the payment methods available, I accept the terms for this stay and the general <termsAndConditionsLink>Terms & Conditions</termsAndConditionsLink>, and understand Scandic will process my personal data for this stay in accordance with <privacyPolicyLink>Scandic's Privacy Policy</privacyPolicyLink>. I accept Scandic requiring a valid credit card during my visit in case anything is left unpaid.", "I accept the terms for this stay and the general <termsAndConditionsLink>Terms & Conditions</termsAndConditionsLink>, and understand Scandic will process my personal data for this stay in accordance with <privacyPolicyLink>Scandic's Privacy Policy</privacyPolicyLink>. ",
}, },
{ {
termsAndConditionsLink: (str) => ( termsAndConditionsLink: (str) => (

View File

@@ -17,3 +17,7 @@ export type PriceChangeData = Array<{
totalPrice: number totalPrice: number
packagePrice?: number packagePrice?: number
} | null> } | null>
export interface TermsAndConditionsProps {
isFlexBookingTerms: boolean
}