Merged in SW-3459-setup-booking-confirmation-page-in-sas (pull request #2794)
Setup booking-confirmation page in SAS * Setup booking-confirmation page in SAS move booking-confirmation tracking to booking-flow * remove unused param * Add test cards to documentation * Fix payment callback page to use correct status Approved-by: Anton Gunnarsson Approved-by: Hrishikesh Vaipurkar
This commit is contained in:
@@ -1,4 +1,22 @@
|
||||
export default async function BookingConfirmationPage() {
|
||||
// eslint-disable-next-line formatjs/no-literal-string-in-jsx
|
||||
return <div>booking-confirmation</div>
|
||||
import { BookingConfirmationPage as BookingConfirmationPagePrimitive } from "@scandic-hotels/booking-flow/pages/BookingConfirmationPage"
|
||||
|
||||
import { getIntl } from "@/i18n"
|
||||
import { getLang } from "@/i18n/serverContext"
|
||||
|
||||
import type { LangParams, PageArgs } from "@/types/params"
|
||||
|
||||
export default async function BookingConfirmationPage(
|
||||
props: PageArgs<LangParams>
|
||||
) {
|
||||
const searchParams = await props.searchParams
|
||||
const lang = await getLang()
|
||||
const intl = await getIntl()
|
||||
|
||||
return (
|
||||
<BookingConfirmationPagePrimitive
|
||||
intl={intl}
|
||||
lang={lang}
|
||||
searchParams={searchParams}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
import { PaymentCallbackPage as PaymentCallbackPagePrimitive } from "@scandic-hotels/booking-flow/pages/PaymentCallbackPage"
|
||||
import { logger } from "@scandic-hotels/common/logger"
|
||||
|
||||
import type { PaymentCallbackStatusEnum } from "@scandic-hotels/common/constants/paymentCallbackStatusEnum"
|
||||
|
||||
import type { LangParams, PageArgs } from "@/types/params"
|
||||
|
||||
export default async function PaymentCallbackPage(props: PageArgs<LangParams>) {
|
||||
export default async function PaymentCallbackPage(
|
||||
props: PageArgs<LangParams & { status: string }>
|
||||
) {
|
||||
const searchParams = await props.searchParams
|
||||
const params = await props.params
|
||||
logger.debug(`[payment-callback] callback started`)
|
||||
@@ -21,6 +25,7 @@ export default async function PaymentCallbackPage(props: PageArgs<LangParams>) {
|
||||
lang={lang}
|
||||
userAccessToken={userAccessToken}
|
||||
searchParams={searchParams}
|
||||
status={params.status as PaymentCallbackStatusEnum}
|
||||
/>
|
||||
)
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "PORT=3001 NEXT_PUBLIC_PORT=3001 next dev",
|
||||
"dev": "NODE_OPTIONS=--openssl-legacy-provider PORT=3001 NEXT_PUBLIC_PORT=3001 next dev",
|
||||
"build": "next build",
|
||||
"start": "node .next/standalone/server.js",
|
||||
"lint": "next lint --max-warnings 0 && tsc --noEmit",
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { BookingConfirmationPage as BookingConfirmationPagePrimitive } from "@scandic-hotels/booking-flow/pages/BookingConfirmationPage"
|
||||
|
||||
import Tracking from "@/components/HotelReservation/BookingConfirmation/Tracking"
|
||||
import { getIntl } from "@/i18n"
|
||||
import { getLang } from "@/i18n/serverContext"
|
||||
|
||||
@@ -18,12 +17,6 @@ export default async function BookingConfirmationPage(
|
||||
intl={intl}
|
||||
lang={lang}
|
||||
searchParams={searchParams}
|
||||
renderTracking={(props) => (
|
||||
<Tracking
|
||||
bookingConfirmation={props.bookingConfirmation}
|
||||
refId={props.refId}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -33,6 +33,8 @@ export default async function PaymentCallbackPage(
|
||||
lang={lang}
|
||||
userAccessToken={userAccessToken}
|
||||
searchParams={searchParams}
|
||||
// TODO refactor this route to get this from params instead of rewriting in next.config
|
||||
status={searchParams.status as PaymentCallbackStatusEnum}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user