Merged in feat/SW-1710-access-checks-my-stay (pull request #1486)

feat(SW-1710): add access checks to my stay page for viewing booking

Approved-by: Michael Zetterberg
Approved-by: Chuma Mcphoy (We Ahead)
Approved-by: Pontus Dreij
This commit is contained in:
Christian Andolf
2025-03-10 09:25:18 +00:00
21 changed files with 527 additions and 133 deletions
@@ -4,7 +4,7 @@ import { Lang } from "@/constants/languages"
import { env } from "@/env/server"
import * as api from "@/lib/api"
import encryptValue from "../utils/encryptValue"
import { encrypt } from "../utils/encryption"
import type { FriendTransaction, Stay } from "./output"
@@ -93,7 +93,7 @@ async function updateStaysBookingUrl(
d.attributes.confirmationNumber.toString() +
"," +
apiJson.data.attributes.lastName
const encryptedBookingValue = encryptValue(originalString)
const encryptedBookingValue = encrypt(originalString)
if (!!encryptedBookingValue) {
bookingUrl.searchParams.set("RefId", encryptedBookingValue)
} else {