diff --git a/apps/scandic-web/components/HotelReservation/MyStay/BookingSummary/index.tsx b/apps/scandic-web/components/HotelReservation/MyStay/BookingSummary/index.tsx
index 39eef31ff..9040073ca 100644
--- a/apps/scandic-web/components/HotelReservation/MyStay/BookingSummary/index.tsx
+++ b/apps/scandic-web/components/HotelReservation/MyStay/BookingSummary/index.tsx
@@ -20,6 +20,7 @@ import { Toast } from "@/components/TempDesignSystem/Toasts"
import useLang from "@/hooks/useLang"
import { formatPrice } from "@/utils/numberFormatting"
+import { useMyStayRoomDetailsStore } from "../stores/myStayRoomDetailsStore"
import { useMyStayTotalPriceStore } from "../stores/myStayTotalPrice"
import SummaryCard from "./SummaryCard"
@@ -40,15 +41,26 @@ export default function BookingSummary({
const intl = useIntl()
const lang = useLang()
const { totalPrice, currencyCode, addRoomPrice } = useMyStayTotalPriceStore()
+ const { addRoomDetails } = useMyStayRoomDetailsStore()
useEffect(() => {
+ // Add price information
addRoomPrice({
id: booking.confirmationNumber ?? "",
totalPrice: booking.totalPrice,
currencyCode: booking.currencyCode,
isMainBooking: true,
})
- }, [booking, addRoomPrice])
+
+ // Add room details
+ addRoomDetails({
+ id: booking.confirmationNumber ?? "",
+ roomName: booking.roomTypeCode || "Main Room",
+ roomTypeCode: booking.roomTypeCode || "",
+ rateDefinition: booking.rateDefinition,
+ isMainBooking: true,
+ })
+ }, [booking, addRoomPrice, addRoomDetails])
const directionsUrl = `https://www.google.com/maps/dir/?api=1&destination=${hotel.location.latitude},${hotel.location.longitude}`
const isPaid =
@@ -130,7 +142,7 @@ export default function BookingSummary({
{hotel.specialAlerts.length > 0 && (
-
+
{hotel.specialAlerts.map((alert) => (
-
{alert.text}
diff --git a/apps/scandic-web/components/HotelReservation/MyStay/CancelStay/Confirmation/index.tsx b/apps/scandic-web/components/HotelReservation/MyStay/CancelStay/Confirmation/index.tsx
index d30e032e1..a3adff9b9 100644
--- a/apps/scandic-web/components/HotelReservation/MyStay/CancelStay/Confirmation/index.tsx
+++ b/apps/scandic-web/components/HotelReservation/MyStay/CancelStay/Confirmation/index.tsx
@@ -1,32 +1,29 @@
+"use client"
+
+import { useFormContext } from "react-hook-form"
import { useIntl } from "react-intl"
+import Checkbox from "@/components/TempDesignSystem/Form/Checkbox"
import Body from "@/components/TempDesignSystem/Text/Body"
import Caption from "@/components/TempDesignSystem/Text/Caption"
-import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
+
+import PriceContainer from "../Pricecontainer"
import styles from "../cancelStay.module.css"
-import type { Hotel } from "@/types/hotel"
-import type { BookingConfirmation } from "@/types/trpc/routers/booking/confirmation"
-
-interface CancelStayConfirmationProps {
- hotel: Hotel
- booking: BookingConfirmation["booking"]
- stayDetails: {
- checkInDate: string
- checkOutDate: string
- nightsText: string
- adultsText: string
- childrenText: string
- }
-}
+import type {
+ CancelStayConfirmationProps,
+ FormValues,
+} from "@/types/components/hotelReservation/myStay/cancelStay"
export function CancelStayConfirmation({
hotel,
booking,
stayDetails,
+ roomDetails = [],
}: CancelStayConfirmationProps) {
const intl = useIntl()
+ const { getValues } = useFormContext()
return (
<>
@@ -47,24 +44,51 @@ export function CancelStayConfirmation({
{intl.formatMessage({ id: "No charges were made." })}
-
-
-
- {intl.formatMessage({ id: "Cancellation cost" })}
-
-
- {stayDetails.nightsText}, {stayDetails.adultsText}
- {booking.childrenAges?.length > 0
- ? `, ${stayDetails.childrenText}`
- : ""}
-
-
-
-
- 0 {booking.currencyCode}
-
-
-
+ {booking.multiRoom && (
+ <>
+
+ {intl.formatMessage({ id: "Select rooms" })}
+
+
+
+ {getValues("rooms").map((room, index) => {
+ // Find room details from store by confirmationNumber
+ const roomDetail = roomDetails.find(
+ (detail) => detail.id === room.confirmationNumber
+ )
+
+ return (
+
+
+
+
+ {intl.formatMessage({ id: "Room" })} {index + 1}
+
+ {roomDetail && (
+ <>
+
+ {roomDetail.roomName}
+
+ >
+ )}
+
+
+
+ )
+ })}
+
+ >
+ )}
+ {getValues("rooms").some((room) => room.checked) && (
+
+ )}
>
)
}
diff --git a/apps/scandic-web/components/HotelReservation/MyStay/CancelStay/FinalConfirmation/index.tsx b/apps/scandic-web/components/HotelReservation/MyStay/CancelStay/FinalConfirmation/index.tsx
index ea97e67f5..95d7e08ea 100644
--- a/apps/scandic-web/components/HotelReservation/MyStay/CancelStay/FinalConfirmation/index.tsx
+++ b/apps/scandic-web/components/HotelReservation/MyStay/CancelStay/FinalConfirmation/index.tsx
@@ -1,21 +1,12 @@
import { useIntl } from "react-intl"
import Body from "@/components/TempDesignSystem/Text/Body"
-import Caption from "@/components/TempDesignSystem/Text/Caption"
-import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
+
+import PriceContainer from "../Pricecontainer"
import styles from "../cancelStay.module.css"
-import type { BookingConfirmation } from "@/types/trpc/routers/booking/confirmation"
-
-interface FinalConfirmationProps {
- booking: BookingConfirmation["booking"]
- stayDetails: {
- nightsText: string
- adultsText: string
- childrenText: string
- }
-}
+import type { FinalConfirmationProps } from "@/types/components/hotelReservation/myStay/cancelStay"
export function FinalConfirmation({
booking,
@@ -32,24 +23,7 @@ export function FinalConfirmation({
})}