Merged in feat(SW-1973)-mystay-multiroom-cancellation-scenarios (pull request #1613)

My stay access denied

* feat(SW-1973) updated no access view

* feat(SW-1973) small fixes

* feat(SW-1973) Update copy


Approved-by: Niclas Edenvin
This commit is contained in:
Pontus Dreij
2025-03-24 14:52:00 +00:00
parent 34bc877092
commit 710e412414
12 changed files with 90 additions and 57 deletions

View File

@@ -1,6 +1,8 @@
import { cookies } from "next/headers"
import { notFound } from "next/navigation"
import { Typography } from "@scandic-hotels/design-system/Typography"
import { homeHrefs } from "@/constants/homeHrefs"
import { env } from "@/env/server"
import { dt } from "@/lib/dt"
@@ -13,7 +15,6 @@ import {
import { decrypt } from "@/server/routers/utils/encryption"
import Image from "@/components/Image"
import Body from "@/components/TempDesignSystem/Text/Body"
import { getIntl } from "@/i18n"
import { getLang } from "@/i18n/serverContext"
@@ -49,6 +50,7 @@ export async function MyStay({ refId }: { refId: string }) {
const intl = await getIntl()
const access = accessBooking(booking.guest, lastName, user, bv)
if (access === ACCESS_GRANTED) {
const lang = getLang()
const ancillaryPackages = await getAncillaryPackages({
@@ -135,11 +137,20 @@ export async function MyStay({ refId }: { refId: string }) {
return (
<main className={styles.main}>
<div className={styles.logIn}>
<Body textAlign="center">
{intl.formatMessage({
id: "In order to view your booking, please log in.",
})}
</Body>
<Typography variant="Title/md">
<h1>
{intl.formatMessage({
id: "You need to be logged in to view your booking",
})}
</h1>
</Typography>
<Typography variant="Body/Lead text">
<p>
{intl.formatMessage({
id: "And you need to be logged in with the same member account that made the booking.",
})}
</p>
</Typography>
</div>
</main>
)