Files
web/apps/partner-sas/constants/bookingFlowConfig.ts
Matilda Landström 3dce2d310f Merged in refactor/SW-2826-align-urls (pull request #3359)
refactor(SW-2826): align urls

* refactor(SW-2826): align urls


Approved-by: Anton Gunnarsson
2025-12-17 09:33:08 +00:00

37 lines
1.3 KiB
TypeScript

import {
bookingTerms,
customerService,
scandicFriends,
privacy,
} from "@scandic-hotels/common/constants/routes/customerService"
import { myStay } from "@scandic-hotels/common/constants/routes/myStay"
import { env } from "@/env/server"
import type { BookingFlowConfig } from "@scandic-hotels/booking-flow/BookingFlowConfig"
import type { Lang } from "@scandic-hotels/common/constants/language"
import type { LangRoute } from "@scandic-hotels/common/constants/routes/langRoute"
export const bookingFlowConfig: BookingFlowConfig = {
bookingCodeEnabled: false,
savedCreditCardsEnabled: false,
redemptionType: env.REDEMPTION_ENABLED === true ? "partner" : "disabled",
enterDetailsMembershipIdInputLocation: "join-card",
variant: "partner-sas",
routes: {
myStay: routeToScandicWeb(myStay),
bookingTermsAndConditions: routeToScandicWeb(bookingTerms),
membershipTermsAndConditions: routeToScandicWeb(scandicFriends),
customerService: routeToScandicWeb(customerService),
privacyPolicy: routeToScandicWeb(privacy),
},
}
function routeToScandicWeb(route: LangRoute) {
const url = `https://www.scandichotels.com`
return Object.entries(route).reduce((acc, [key, value]) => {
acc[key as Lang] = `${url}${value}`
return acc
}, {} as LangRoute)
}