Merged in refactor/SW-2826-align-urls (pull request #3359)
refactor(SW-2826): align urls * refactor(SW-2826): align urls Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
import { bookingTermsAndConditionsRoutes } from "@scandic-hotels/common/constants/routes/bookingTermsAndConditionsRoutes"
|
import {
|
||||||
import { customerService } from "@scandic-hotels/common/constants/routes/customerService"
|
bookingTerms,
|
||||||
import { membershipTermsAndConditions } from "@scandic-hotels/common/constants/routes/membershipTermsAndConditions"
|
customerService,
|
||||||
|
scandicFriends,
|
||||||
|
privacy,
|
||||||
|
} from "@scandic-hotels/common/constants/routes/customerService"
|
||||||
import { myStay } from "@scandic-hotels/common/constants/routes/myStay"
|
import { myStay } from "@scandic-hotels/common/constants/routes/myStay"
|
||||||
import { privacyPolicyRoutes } from "@scandic-hotels/common/constants/routes/privacyPolicyRoutes"
|
|
||||||
|
|
||||||
import { env } from "@/env/server"
|
import { env } from "@/env/server"
|
||||||
|
|
||||||
@@ -18,14 +20,10 @@ export const bookingFlowConfig: BookingFlowConfig = {
|
|||||||
variant: "partner-sas",
|
variant: "partner-sas",
|
||||||
routes: {
|
routes: {
|
||||||
myStay: routeToScandicWeb(myStay),
|
myStay: routeToScandicWeb(myStay),
|
||||||
bookingTermsAndConditions: routeToScandicWeb(
|
bookingTermsAndConditions: routeToScandicWeb(bookingTerms),
|
||||||
bookingTermsAndConditionsRoutes
|
membershipTermsAndConditions: routeToScandicWeb(scandicFriends),
|
||||||
),
|
|
||||||
membershipTermsAndConditions: routeToScandicWeb(
|
|
||||||
membershipTermsAndConditions
|
|
||||||
),
|
|
||||||
customerService: routeToScandicWeb(customerService),
|
customerService: routeToScandicWeb(customerService),
|
||||||
privacyPolicy: routeToScandicWeb(privacyPolicyRoutes),
|
privacyPolicy: routeToScandicWeb(privacy),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,6 @@ import { useRouter } from "next/navigation"
|
|||||||
import { FormProvider, useForm } from "react-hook-form"
|
import { FormProvider, useForm } from "react-hook-form"
|
||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
import { membershipTermsAndConditions } from "@scandic-hotels/common/constants/routes/membershipTermsAndConditions"
|
|
||||||
import { privacyPolicyRoutes } from "@scandic-hotels/common/constants/routes/privacyPolicyRoutes"
|
|
||||||
import { logger } from "@scandic-hotels/common/logger"
|
import { logger } from "@scandic-hotels/common/logger"
|
||||||
import {
|
import {
|
||||||
formatPhoneNumber,
|
formatPhoneNumber,
|
||||||
@@ -40,6 +38,10 @@ import { requestOpen } from "@/utils/profilingConsent"
|
|||||||
import { trackLinkClick } from "@/utils/tracking/profilingConsent"
|
import { trackLinkClick } from "@/utils/tracking/profilingConsent"
|
||||||
|
|
||||||
import styles from "./form.module.css"
|
import styles from "./form.module.css"
|
||||||
|
import {
|
||||||
|
privacy,
|
||||||
|
scandicFriends,
|
||||||
|
} from "@scandic-hotels/common/constants/routes/customerService"
|
||||||
|
|
||||||
interface SignUpFormProps {
|
interface SignUpFormProps {
|
||||||
title: string
|
title: string
|
||||||
@@ -362,7 +364,7 @@ export default function SignupForm({
|
|||||||
<TextLink
|
<TextLink
|
||||||
color="Text/Interactive/Secondary"
|
color="Text/Interactive/Secondary"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
href={membershipTermsAndConditions[lang]}
|
href={scandicFriends[lang]}
|
||||||
isInline
|
isInline
|
||||||
>
|
>
|
||||||
{str}
|
{str}
|
||||||
@@ -372,7 +374,7 @@ export default function SignupForm({
|
|||||||
<TextLink
|
<TextLink
|
||||||
color="Text/Interactive/Secondary"
|
color="Text/Interactive/Secondary"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
href={privacyPolicyRoutes[lang]}
|
href={privacy[lang]}
|
||||||
isInline
|
isInline
|
||||||
>
|
>
|
||||||
{str}
|
{str}
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import { useFormContext } from "react-hook-form"
|
import { useFormContext } from "react-hook-form"
|
||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
import { bookingTermsAndConditionsRoutes } from "@scandic-hotels/common/constants/routes/bookingTermsAndConditionsRoutes"
|
|
||||||
import { privacyPolicyRoutes } from "@scandic-hotels/common/constants/routes/privacyPolicyRoutes"
|
|
||||||
import Checkbox from "@scandic-hotels/design-system/Form/Checkbox"
|
import Checkbox from "@scandic-hotels/design-system/Form/Checkbox"
|
||||||
import { ErrorMessage } from "@scandic-hotels/design-system/Form/ErrorMessage"
|
import { ErrorMessage } from "@scandic-hotels/design-system/Form/ErrorMessage"
|
||||||
import { TextLink } from "@scandic-hotels/design-system/TextLink"
|
import { TextLink } from "@scandic-hotels/design-system/TextLink"
|
||||||
@@ -12,6 +10,10 @@ import useLang from "@/hooks/useLang"
|
|||||||
import { getErrorMessage } from "@/utils/getErrorMessage"
|
import { getErrorMessage } from "@/utils/getErrorMessage"
|
||||||
|
|
||||||
import styles from "./termsAndConditions.module.css"
|
import styles from "./termsAndConditions.module.css"
|
||||||
|
import {
|
||||||
|
bookingTerms,
|
||||||
|
privacy,
|
||||||
|
} from "@scandic-hotels/common/constants/routes/customerService"
|
||||||
|
|
||||||
export default function TermsAndConditions() {
|
export default function TermsAndConditions() {
|
||||||
const intl = useIntl()
|
const intl = useIntl()
|
||||||
@@ -28,7 +30,7 @@ export default function TermsAndConditions() {
|
|||||||
{
|
{
|
||||||
termsAndConditionsLink: (str) => (
|
termsAndConditionsLink: (str) => (
|
||||||
<TextLink
|
<TextLink
|
||||||
href={bookingTermsAndConditionsRoutes[lang]}
|
href={bookingTerms[lang]}
|
||||||
theme="InteractiveDefault"
|
theme="InteractiveDefault"
|
||||||
typography="Link/sm"
|
typography="Link/sm"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
@@ -39,7 +41,7 @@ export default function TermsAndConditions() {
|
|||||||
),
|
),
|
||||||
privacyPolicyLink: (str) => (
|
privacyPolicyLink: (str) => (
|
||||||
<TextLink
|
<TextLink
|
||||||
href={privacyPolicyRoutes[lang]}
|
href={privacy[lang]}
|
||||||
theme="InteractiveDefault"
|
theme="InteractiveDefault"
|
||||||
typography="Link/sm"
|
typography="Link/sm"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { membershipTermsAndConditions } from "@scandic-hotels/common/constants/routes/membershipTermsAndConditions"
|
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/OldDSLink"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
||||||
@@ -9,6 +8,7 @@ import { getIntl } from "@/i18n"
|
|||||||
import { getLang } from "@/i18n/serverContext"
|
import { getLang } from "@/i18n/serverContext"
|
||||||
|
|
||||||
import styles from "./readMore.module.css"
|
import styles from "./readMore.module.css"
|
||||||
|
import { scandicFriends } from "@scandic-hotels/common/constants/routes/myPages"
|
||||||
|
|
||||||
export default async function ReadMore() {
|
export default async function ReadMore() {
|
||||||
const [intl, lang] = await Promise.all([getIntl(), getLang()])
|
const [intl, lang] = await Promise.all([getIntl(), getLang()])
|
||||||
@@ -22,7 +22,7 @@ export default async function ReadMore() {
|
|||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
href: membershipTermsAndConditions[lang],
|
href: scandicFriends[lang],
|
||||||
text: intl.formatMessage({
|
text: intl.formatMessage({
|
||||||
id: "loyalty.membershipTermsAndConditions",
|
id: "loyalty.membershipTermsAndConditions",
|
||||||
defaultMessage: "Membership terms and conditions",
|
defaultMessage: "Membership terms and conditions",
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
import { bookingTermsAndConditionsRoutes } from "@scandic-hotels/common/constants/routes/bookingTermsAndConditionsRoutes"
|
import {
|
||||||
import { customerService } from "@scandic-hotels/common/constants/routes/customerService"
|
bookingTerms,
|
||||||
import { membershipTermsAndConditions } from "@scandic-hotels/common/constants/routes/membershipTermsAndConditions"
|
customerService,
|
||||||
|
privacy,
|
||||||
|
scandicFriends,
|
||||||
|
} from "@scandic-hotels/common/constants/routes/customerService"
|
||||||
import { myStay } from "@scandic-hotels/common/constants/routes/myStay"
|
import { myStay } from "@scandic-hotels/common/constants/routes/myStay"
|
||||||
import { privacyPolicyRoutes } from "@scandic-hotels/common/constants/routes/privacyPolicyRoutes"
|
|
||||||
|
|
||||||
import type { BookingFlowConfig } from "@scandic-hotels/booking-flow/BookingFlowConfig"
|
import type { BookingFlowConfig } from "@scandic-hotels/booking-flow/BookingFlowConfig"
|
||||||
|
|
||||||
@@ -15,8 +17,8 @@ export const bookingFlowConfig: BookingFlowConfig = {
|
|||||||
routes: {
|
routes: {
|
||||||
myStay,
|
myStay,
|
||||||
customerService,
|
customerService,
|
||||||
bookingTermsAndConditions: bookingTermsAndConditionsRoutes,
|
bookingTermsAndConditions: bookingTerms,
|
||||||
membershipTermsAndConditions,
|
membershipTermsAndConditions: scandicFriends,
|
||||||
privacyPolicy: privacyPolicyRoutes,
|
privacyPolicy: privacy,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
import { Lang } from "../language"
|
|
||||||
|
|
||||||
import type { LangRoute } from "./langRoute"
|
|
||||||
|
|
||||||
export const bookingTermsAndConditionsRoutes = {
|
|
||||||
da: `/${Lang.da}/kundeservice/politikker/bookingsvilkar`,
|
|
||||||
de: `/${Lang.de}/kundenbetreuung/richtlinien/reservierungsbedingungen`,
|
|
||||||
en: `/${Lang.en}/customer-service/policies/booking-terms`,
|
|
||||||
fi: `/${Lang.fi}/asiakaspalvelu/ehdot/varausehdot`,
|
|
||||||
no: `/${Lang.no}/kundeservice/betingelser/reservasjonsbetingelser`,
|
|
||||||
sv: `/${Lang.sv}/kundservice/villkor/bokningsvillkor`,
|
|
||||||
} as const satisfies LangRoute
|
|
||||||
@@ -46,3 +46,21 @@ export const privacy = {
|
|||||||
no: `${customerService[Lang.no]}/personvernpolicy`,
|
no: `${customerService[Lang.no]}/personvernpolicy`,
|
||||||
sv: `${policies[Lang.sv]}/integritetspolicy`,
|
sv: `${policies[Lang.sv]}/integritetspolicy`,
|
||||||
} as const satisfies LangRoute
|
} as const satisfies LangRoute
|
||||||
|
|
||||||
|
export const scandicFriends = {
|
||||||
|
da: `/${policies[Lang.da]}/scandic-friends-betingelser`,
|
||||||
|
de: `/${policies[Lang.de]}/scandic-friends-allgemeine-geschaeftsbedingungen`,
|
||||||
|
en: `/${policies[Lang.en]}/scandic-friends`,
|
||||||
|
fi: `/${policies[Lang.fi]}/scandic-friends`,
|
||||||
|
no: `/${policies[Lang.no]}/scandic-friends-betingelser`,
|
||||||
|
sv: `/${policies[Lang.sv]}/scandic-friends`,
|
||||||
|
} as const satisfies LangRoute
|
||||||
|
|
||||||
|
export const bookingTerms = {
|
||||||
|
da: `/${policies[Lang.da]}/bookingsvilkar`,
|
||||||
|
de: `/${policies[Lang.da]}/reservierungsbedingungen`,
|
||||||
|
en: `/${policies[Lang.da]}/booking-terms`,
|
||||||
|
fi: `/${policies[Lang.da]}/varausehdot`,
|
||||||
|
no: `/${policies[Lang.da]}/reservasjonsbetingelser`,
|
||||||
|
sv: `/${policies[Lang.da]}/bokningsvillkor`,
|
||||||
|
} as const satisfies LangRoute
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
import { Lang } from "../language"
|
|
||||||
|
|
||||||
import type { LangRoute } from "./langRoute"
|
|
||||||
|
|
||||||
export const membershipTermsAndConditions: LangRoute = {
|
|
||||||
da: `/${Lang.da}/kundeservice/politikker/scandic-friends-betingelser`,
|
|
||||||
de: `/${Lang.de}/kundenbetreuung/richtlinien/scandic-friends-allgemeine-geschaeftsbedingungen`,
|
|
||||||
en: `/${Lang.en}/customer-service/policies/scandic-friends`,
|
|
||||||
fi: `/${Lang.fi}/asiakaspalvelu/ehdot/scandic-friends`,
|
|
||||||
no: `/${Lang.no}/kundeservice/betingelser/scandic-friends-betingelser`,
|
|
||||||
sv: `/${Lang.sv}/kundservice/villkor/scandic-friends`,
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
import { Lang } from "../language"
|
|
||||||
|
|
||||||
import type { LangRoute } from "./langRoute"
|
|
||||||
|
|
||||||
export const privacyPolicyRoutes = {
|
|
||||||
da: `/${Lang.da}/kundeservice/politikker/privatliv`,
|
|
||||||
de: `/${Lang.de}/kundenbetreuung/richtlinien/datenschutz`,
|
|
||||||
en: `/${Lang.en}/customer-service/policies/privacy`,
|
|
||||||
fi: `/${Lang.fi}/asiakaspalvelu/ehdot/tietosuojaseloste`,
|
|
||||||
no: `/${Lang.no}/kundeservice/personvernpolicy`,
|
|
||||||
sv: `/${Lang.sv}/kundservice/villkor/integritetspolicy`,
|
|
||||||
} as const satisfies LangRoute
|
|
||||||
Reference in New Issue
Block a user