Files
web/packages/common/constants/routes/hotelReservation.ts
Bianca Widstam 800948bb94 Merged in fix/STAY-67-redirect-to-webview-after-gla (pull request #2795)
fix(STAY-67): redirect to webview after guarantee on my stay

* fix(STAY-67): redirect to webview after guarantee on my stay

* fix(STAY-67): add callback page for guarantee on webview


Approved-by: Linus Flood
2025-09-15 07:18:58 +00:00

53 lines
1.4 KiB
TypeScript

import type { Lang } from "../language"
export function selectRate(lang: Lang) {
return `/${lang}/hotelreservation/select-rate`
}
export function hotelreservation(lang: Lang) {
return `/${lang}/hotelreservation`
}
export function webviewHotelreservation(lang: Lang) {
return `/${lang}/webview/hotelreservation`
}
export function bookingConfirmation(lang: Lang) {
return `${hotelreservation(lang)}/booking-confirmation`
}
export function details(lang: Lang) {
return `${hotelreservation(lang)}/details`
}
export function selectHotel(lang: Lang) {
return `${hotelreservation(lang)}/select-hotel`
}
export function selectHotelMap(lang: Lang) {
return `${hotelreservation(lang)}/select-hotel/map`
}
export function selectRateWithParams(
lang: Lang,
hotelId: string,
fromdate: string,
todate: string
) {
return `${hotelreservation(lang)}/select-rate?room%5B0%5D.adults=1&fromdate=${fromdate}&todate=${todate}&hotel=${hotelId}`
}
export function alternativeHotels(lang: Lang) {
return `${hotelreservation(lang)}/alternative-hotels`
}
export function alternativeHotelsMap(lang: Lang) {
return `${hotelreservation(lang)}/alternative-hotels/map`
}
export function guaranteeCallback(lang: Lang, isWebview: boolean) {
return isWebview
? `${webviewHotelreservation(lang)}/gla-payment-callback`
: `${hotelreservation(lang)}/gla-payment-callback`
}