chore: check types before build * chore: check types before build * remove unused package.json scripts * merge Approved-by: Linus Flood
37 lines
1.3 KiB
TypeScript
37 lines
1.3 KiB
TypeScript
import {
|
|
bookingTerms,
|
|
customerService,
|
|
privacy,
|
|
scandicFriends,
|
|
} 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)
|
|
}
|