Merged in feat(SW-1944)-update-url-to-mystay (pull request #1566)

feat(SW-1944) Update to correct URL to my stay (for my pages/my stays and confirmation page)

* feat(SW-1944) Update to correct URL to my stay (for my pages/my stays and confirmation page)

* feat(SW-1944) updated to RefId

* feat(SW-1944) updated myStay path

* feat(SW-1944) updated refId check


Approved-by: Christian Andolf
This commit is contained in:
Pontus Dreij
2025-03-20 09:55:24 +00:00
parent e0b7c3be7b
commit 8f9e268802
13 changed files with 93 additions and 65 deletions

View File

@@ -1,6 +1,7 @@
import { notFound } from "next/navigation"
import { getBookingConfirmation } from "@/lib/trpc/memoizedRequests"
import { encrypt } from "@/server/routers/utils/encryption"
import HotelDetails from "@/components/HotelReservation/BookingConfirmation/HotelDetails"
import PaymentDetails from "@/components/HotelReservation/BookingConfirmation/PaymentDetails"
@@ -33,6 +34,10 @@ export default async function BookingConfirmation({
return notFound()
}
const refId = encrypt(
`${booking.confirmationNumber},${booking.guest.lastName}`
)
return (
<BookingConfirmationProvider
bookingCode={booking.bookingCode}
@@ -46,7 +51,7 @@ export default async function BookingConfirmation({
]}
vat={booking.vatPercentage}
>
<Confirmation booking={booking} hotel={hotel} room={room}>
<Confirmation booking={booking} hotel={hotel} room={room} refId={refId}>
<div className={styles.booking}>
<Alerts booking={booking} />
<Rooms