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,17 +12,54 @@ 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: 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.", "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
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>
),
}
)
: 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) => ( termsAndConditionsLink: (str) => (

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
}