From ad5ec80645121ca12d0680225c663170bfdb3541 Mon Sep 17 00:00:00 2001 From: Linus Flood Date: Wed, 21 May 2025 09:11:02 +0000 Subject: [PATCH] Merged in feat/sw-2855-urls (pull request #2177) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat: sw-2855 urls * feat: sw-2855 urls Approved-by: Joakim Jäderberg --- .../sas-x-scandic/link/LinkAccountForm.tsx | 2 +- .../components/Forms/Signup/index.tsx | 2 +- .../Header/MainMenu/MobileMenu/index.tsx | 2 +- .../RoomOne/JoinScandicFriendsCard/index.tsx | 2 +- .../PaymentCallback/TimeoutSpinner/index.tsx | 2 +- .../Payment/TermsAndConditions/index.tsx | 5 +- .../HotelReservation/FindMyBooking/index.tsx | 2 +- .../Steps/ConfirmationStep/index.tsx | 5 +- .../GuaranteeLateArrival/Form/index.tsx | 5 +- .../components/MyPages/Surprises/Client.tsx | 2 +- .../Sidebar/JoinLoyalty/ReadMore/index.tsx | 2 +- apps/scandic-web/constants/currentWebHrefs.ts | 64 ------------------- apps/scandic-web/constants/webHrefs.ts | 57 +++++++++++++++++ 13 files changed, 68 insertions(+), 84 deletions(-) delete mode 100644 apps/scandic-web/constants/currentWebHrefs.ts create mode 100644 apps/scandic-web/constants/webHrefs.ts diff --git a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/link/LinkAccountForm.tsx b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/link/LinkAccountForm.tsx index e8311574d..4a10fdf8c 100644 --- a/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/link/LinkAccountForm.tsx +++ b/apps/scandic-web/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/link/LinkAccountForm.tsx @@ -8,8 +8,8 @@ import { useIntl } from "react-intl" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { Typography } from "@scandic-hotels/design-system/Typography" -import { sasPartnershipTermsAndConditions } from "@/constants/currentWebHrefs" import { profileEdit } from "@/constants/routes/myPages" +import { sasPartnershipTermsAndConditions } from "@/constants/webHrefs" import Image from "@/components/Image" import Button from "@/components/TempDesignSystem/Button" diff --git a/apps/scandic-web/components/Forms/Signup/index.tsx b/apps/scandic-web/components/Forms/Signup/index.tsx index 01acee9f1..f1b52d317 100644 --- a/apps/scandic-web/components/Forms/Signup/index.tsx +++ b/apps/scandic-web/components/Forms/Signup/index.tsx @@ -8,7 +8,7 @@ import { useIntl } from "react-intl" import { membershipTermsAndConditions, privacyPolicy, -} from "@/constants/currentWebHrefs" +} from "@/constants/webHrefs" import { trpc } from "@/lib/trpc/client" import Button from "@/components/TempDesignSystem/Button" diff --git a/apps/scandic-web/components/Header/MainMenu/MobileMenu/index.tsx b/apps/scandic-web/components/Header/MainMenu/MobileMenu/index.tsx index dccf96174..899f00064 100644 --- a/apps/scandic-web/components/Header/MainMenu/MobileMenu/index.tsx +++ b/apps/scandic-web/components/Header/MainMenu/MobileMenu/index.tsx @@ -5,11 +5,11 @@ import { Dialog, Modal } from "react-aria-components" import { useIntl } from "react-intl" import { useMediaQuery } from "usehooks-ts" -import { customerService } from "@/constants/currentWebHrefs" import { findMyBooking, findMyBookingCurrentWebPath, } from "@/constants/routes/findMyBooking" +import { customerService } from "@/constants/webHrefs" import { env } from "@/env/client" import useDropdownStore from "@/stores/main-menu" diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Details/RoomOne/JoinScandicFriendsCard/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Details/RoomOne/JoinScandicFriendsCard/index.tsx index 5230dbe0d..136e421d0 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Details/RoomOne/JoinScandicFriendsCard/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Details/RoomOne/JoinScandicFriendsCard/index.tsx @@ -5,7 +5,7 @@ import { useIntl } from "react-intl" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" -import { privacyPolicy } from "@/constants/currentWebHrefs" +import { privacyPolicy } from "@/constants/webHrefs" import LoginButton from "@/components/LoginButton" import Checkbox from "@/components/TempDesignSystem/Form/Checkbox" diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/PaymentCallback/TimeoutSpinner/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/PaymentCallback/TimeoutSpinner/index.tsx index 82e6cda65..cf6de311c 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/PaymentCallback/TimeoutSpinner/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/PaymentCallback/TimeoutSpinner/index.tsx @@ -2,7 +2,7 @@ import { useIntl } from "react-intl" -import { customerService } from "@/constants/currentWebHrefs" +import { customerService } from "@/constants/webHrefs" import LoadingSpinner from "@/components/LoadingSpinner" import Link from "@/components/TempDesignSystem/Link" diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/TermsAndConditions/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/TermsAndConditions/index.tsx index 1eaa7be40..010dc4efb 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/TermsAndConditions/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/TermsAndConditions/index.tsx @@ -1,9 +1,6 @@ import { useIntl } from "react-intl" -import { - bookingTermsAndConditions, - privacyPolicy, -} from "@/constants/currentWebHrefs" +import { bookingTermsAndConditions, privacyPolicy } from "@/constants/webHrefs" import Checkbox from "@/components/TempDesignSystem/Form/Checkbox" import Link from "@/components/TempDesignSystem/Link" diff --git a/apps/scandic-web/components/HotelReservation/FindMyBooking/index.tsx b/apps/scandic-web/components/HotelReservation/FindMyBooking/index.tsx index 253b6c75e..c3e0b21ff 100644 --- a/apps/scandic-web/components/HotelReservation/FindMyBooking/index.tsx +++ b/apps/scandic-web/components/HotelReservation/FindMyBooking/index.tsx @@ -5,8 +5,8 @@ import { useRouter } from "next/navigation" import { FormProvider, useForm } from "react-hook-form" import { useIntl } from "react-intl" -import { customerService } from "@/constants/currentWebHrefs" import { myStay } from "@/constants/routes/myStay" +import { customerService } from "@/constants/webHrefs" import { trpc } from "@/lib/trpc/client" import Button from "@/components/TempDesignSystem/Button" diff --git a/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/AddAncillaryFlowModal/Steps/ConfirmationStep/index.tsx b/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/AddAncillaryFlowModal/Steps/ConfirmationStep/index.tsx index 7dad19129..4e8d55e38 100644 --- a/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/AddAncillaryFlowModal/Steps/ConfirmationStep/index.tsx +++ b/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/AddAncillaryFlowModal/Steps/ConfirmationStep/index.tsx @@ -5,10 +5,7 @@ import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { Typography } from "@scandic-hotels/design-system/Typography" import { PaymentMethodEnum } from "@/constants/booking" -import { - bookingTermsAndConditions, - privacyPolicy, -} from "@/constants/currentWebHrefs" +import { bookingTermsAndConditions, privacyPolicy } from "@/constants/webHrefs" import { dt } from "@/lib/dt" import { useAddAncillaryStore } from "@/stores/my-stay/add-ancillary-flow" diff --git a/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/GuaranteeLateArrival/Form/index.tsx b/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/GuaranteeLateArrival/Form/index.tsx index efbddfd4d..59bacbcb3 100644 --- a/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/GuaranteeLateArrival/Form/index.tsx +++ b/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/GuaranteeLateArrival/Form/index.tsx @@ -6,11 +6,8 @@ import { useIntl } from "react-intl" import { Typography } from "@scandic-hotels/design-system/Typography" import { PaymentMethodEnum } from "@/constants/booking" -import { - bookingTermsAndConditions, - privacyPolicy, -} from "@/constants/currentWebHrefs" import { guaranteeCallback } from "@/constants/routes/hotelReservation" +import { bookingTermsAndConditions, privacyPolicy } from "@/constants/webHrefs" import { env } from "@/env/client" import { useMyStayStore } from "@/stores/my-stay" diff --git a/apps/scandic-web/components/MyPages/Surprises/Client.tsx b/apps/scandic-web/components/MyPages/Surprises/Client.tsx index f20192486..bfb40dbf6 100644 --- a/apps/scandic-web/components/MyPages/Surprises/Client.tsx +++ b/apps/scandic-web/components/MyPages/Surprises/Client.tsx @@ -6,12 +6,12 @@ import React, { useState } from "react" import { Dialog, Modal, ModalOverlay } from "react-aria-components" import { useIntl } from "react-intl" -import { customerService } from "@/constants/currentWebHrefs" import { benefits } from "@/constants/routes/myPages" import { benefits as webviewBenefits, myPagesWebviews, } from "@/constants/routes/webviews" +import { customerService } from "@/constants/webHrefs" import { trpc } from "@/lib/trpc/client" import Link from "@/components/TempDesignSystem/Link" diff --git a/apps/scandic-web/components/Sidebar/JoinLoyalty/ReadMore/index.tsx b/apps/scandic-web/components/Sidebar/JoinLoyalty/ReadMore/index.tsx index 69de97bdd..533b9a55f 100644 --- a/apps/scandic-web/components/Sidebar/JoinLoyalty/ReadMore/index.tsx +++ b/apps/scandic-web/components/Sidebar/JoinLoyalty/ReadMore/index.tsx @@ -1,6 +1,6 @@ import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" -import { faq, membershipTermsAndConditions } from "@/constants/currentWebHrefs" +import { faq, membershipTermsAndConditions } from "@/constants/webHrefs" import Link from "@/components/TempDesignSystem/Link" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" diff --git a/apps/scandic-web/constants/currentWebHrefs.ts b/apps/scandic-web/constants/currentWebHrefs.ts deleted file mode 100644 index 6adc05e3e..000000000 --- a/apps/scandic-web/constants/currentWebHrefs.ts +++ /dev/null @@ -1,64 +0,0 @@ -import type { LangRoute } from "@/types/routes" - -const baseUrl: LangRoute = { - da: "https://www.scandichotels.dk", - de: "https://www.scandichotels.de", - en: "https://www.scandichotels.com", - fi: "https://www.scandichotels.fi", - no: "https://www.scandichotels.no", - sv: "https://www.scandichotels.se", -} - -export const bookingTermsAndConditions: LangRoute = { - da: `${baseUrl.da}/kundeservice/priser-og-bookingvilkar/vilkar-og-betingelser3`, - de: `${baseUrl.de}/kundenbetreuung/preise-und-richtlinien/reservierungsbedingungen`, - en: `${baseUrl.en}/customer-service/rates-and-policies/terms-conditions`, - fi: `${baseUrl.fi}/asiakaspalvelu/hinnat-ja-varausehdot/varausehdot`, - no: `${baseUrl.no}/kundeservice/priser-og-bestillingsvilkar/reservasjonsbetingelser`, - sv: `${baseUrl.sv}/kundservice/priser-och-bokningsregler/bokningsregler`, -} - -export const membershipTermsAndConditions: LangRoute = { - da: `${baseUrl.da}/kundeservice/priser-og-bookingvilkar/vilkar-betingelser-for-medlemsskab`, - de: `${baseUrl.de}/kundenbetreuung/preise-und-richtlinien/scandic-friends-allgemeine-geschaftsbedingungen`, - en: `${baseUrl.en}/customer-service/rates-and-policies/scandic-friends-terms-conditions`, - fi: `${baseUrl.fi}/asiakaspalvelu/hinnat-ja-varausehdot/jasenyyden-ehdot`, - no: `${baseUrl.no}/kundeservice/priser-og-bestillingsvilkar/betingelser-for-medlemskap`, - sv: `${baseUrl.sv}/kundservice/priser-och-bokningsregler/medlemsvillkor`, -} - -export const sasPartnershipTermsAndConditions: LangRoute = { - da: `${baseUrl.da}/kundeservice/priser-og-bookingvilkar/vilkar-betingelser-for-medlemsskab/sas-eurobonus`, - de: `${baseUrl.de}/kundenbetreuung/preise-und-richtlinien/scandic-friends-allgemeine-geschaftsbedingungen/sas-eurobonus`, - en: `${baseUrl.en}/customer-service/rates-and-policies/scandic-friends-terms-conditions/sas-eurobonus`, - fi: `${baseUrl.fi}/asiakaspalvelu/hinnat-ja-varausehdot/jasenyyden-ehdot/sas-eurobonus`, - no: `${baseUrl.no}/kundeservice/priser-og-bestillingsvilkar/betingelser-for-medlemskap/sas-eurobonus`, - sv: `${baseUrl.sv}/kundservice/priser-och-bokningsregler/medlemsvillkor/sas-eurobonus`, -} - -export const faq: LangRoute = { - da: `${baseUrl.da}/scandic-friends/hjalp-og-service/ofte-stillede-sporgsmal`, - de: `${baseUrl.de}/scandic-friends/hilfe-und-service/haufig-gestellte-fragen`, - en: `${baseUrl.en}/scandic-friends/help-service/faq`, - fi: `${baseUrl.fi}/scandic-friends/apua-ongelmatilanteissa/usein-kysyttya`, - no: `${baseUrl.no}/scandic-friends/hjelp-og-medlemsservice/ofte-stilte-sporsmal`, - sv: `${baseUrl.sv}/scandic-friends/hjalp-och-service/vanliga-fragor`, -} - -export const privacyPolicy: LangRoute = { - da: `${baseUrl.da}/kundeservice/priser-og-bookingvilkar/persondatapolitik`, - de: `${baseUrl.de}/kundenbetreuung/preise-und-richtlinien/datenschutzrichtlinie`, - en: `${baseUrl.en}/customer-service/rates-and-policies/privacy-policy`, - fi: `${baseUrl.fi}/asiakaspalvelu/hinnat-ja-varausehdot/tietosuojaseloste`, - no: `${baseUrl.no}/kundeservice/priser-og-bestillingsvilkar/personvernpolicy`, - sv: `${baseUrl.sv}/kundservice/priser-och-bokningsregler/integritetspolicy`, -} - -export const customerService: LangRoute = { - da: `${baseUrl.da}/kundeservice`, - de: `${baseUrl.de}/kundenbetreuung`, - en: `${baseUrl.en}/customer-service`, - fi: `${baseUrl.fi}/asiakaspalvelu`, - no: `${baseUrl.no}/kundeservice`, - sv: `${baseUrl.sv}/kundservice`, -} diff --git a/apps/scandic-web/constants/webHrefs.ts b/apps/scandic-web/constants/webHrefs.ts new file mode 100644 index 000000000..41af7620c --- /dev/null +++ b/apps/scandic-web/constants/webHrefs.ts @@ -0,0 +1,57 @@ +import { Lang } from "./languages" + +import type { LangRoute } from "@/types/routes" + +export const bookingTermsAndConditions: LangRoute = { + da: `/${Lang.da}/kundeservice/priser-og-bookingvilkar/vilkar-og-betingelser3`, + de: `/${Lang.de}/kundenbetreuung/preise-und-richtlinien/reservierungsbedingungen`, + en: `/${Lang.en}/customer-service/rates-and-policies/terms-conditions`, + fi: `/${Lang.fi}/asiakaspalvelu/hinnat-ja-varausehdot/varausehdot`, + no: `/${Lang.no}/kundeservice/priser-og-bestillingsvilkar/reservasjonsbetingelser`, + sv: `/${Lang.sv}/kundservice/priser-och-bokningsregler/bokningsregler`, +} + +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`, +} + +export const sasPartnershipTermsAndConditions: LangRoute = { + da: `/${Lang.da}/kundeservice/politikker/scandic-friends-betingelser/sas-eurobonus`, + de: `/${Lang.de}/kundenbetreuung/richtlinien/scandic-friends-allgemeine-geschaeftsbedingungen/sas-eurobonus`, + en: `/${Lang.en}/customer-service/policies/scandic-friends/sas-eurobonus`, + fi: `/${Lang.fi}/asiakaspalvelu/ehdot/scandic-friends/sas-eurobonus`, + no: `/${Lang.no}/kundeservice/betingelser/scandic-friends-betingelser/sas-eurobonus`, + sv: `/${Lang.sv}/kundservice/villkor/scandic-friends/sas-eurobonus`, +} + +export const faq: LangRoute = { + da: `/${Lang.da}/scandic-friends/hjalp-og-service/ofte-stillede-sporgsmal`, + de: `/${Lang.de}/scandic-friends/hilfe-und-service/haufig-gestellte-fragen`, + en: `/${Lang.en}/scandic-friends/help-service/faq`, + fi: `/${Lang.fi}/scandic-friends/apua-ongelmatilanteissa/usein-kysyttya`, + no: `/${Lang.no}/scandic-friends/hjelp-og-medlemsservice/ofte-stilte-sporsmal`, + sv: `/${Lang.sv}/scandic-friends/hjalp-och-service/vanliga-fragor`, +} + +export const privacyPolicy: LangRoute = { + da: `/${Lang.da}/kundeservice/politikker/privatliv`, + de: `/${Lang.de}/kundenbetreuung/richtlinien/datenschutz`, + en: `/${Lang.en}/en/customer-service/policies/privacy`, + fi: `/${Lang.fi}/asiakaspalvelu/ehdot/tietosuojaseloste`, + no: `/${Lang.no}/kundeservice/personvernpolicy`, + sv: `/${Lang.sv}/kundservice/villkor/integritetspolicy`, +} + +export const customerService: LangRoute = { + da: `/${Lang.da}/kundeservice`, + de: `/${Lang.de}/kundenbetreuung`, + en: `/${Lang.en}/customer-service`, + fi: `/${Lang.fi}/asiakaspalvelu`, + no: `/${Lang.no}/kundeservice`, + sv: `/${Lang.sv}/kundservice`, +}