feat(SW-2116): Use refId instead of confirmationNumber
This commit is contained in:
@@ -20,13 +20,13 @@ import { CurrencyEnum } from "@/types/enums/currency"
|
||||
export function LinkedReservation({
|
||||
checkInTime,
|
||||
checkOutTime,
|
||||
confirmationNumber,
|
||||
refId,
|
||||
roomIndex,
|
||||
roomNumber,
|
||||
}: LinkedReservationProps) {
|
||||
const lang = useLang()
|
||||
const { data, refetch, isLoading } = trpc.booking.get.useQuery({
|
||||
confirmationNumber,
|
||||
refId,
|
||||
lang,
|
||||
})
|
||||
const {
|
||||
|
||||
@@ -8,12 +8,12 @@ import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import { BookingStatusEnum } from "@/constants/booking"
|
||||
import { trpc } from "@/lib/trpc/client"
|
||||
import { getBookedHotelRoom } from "@/server/routers/booking/utils"
|
||||
import { useBookingConfirmationStore } from "@/stores/booking-confirmation"
|
||||
|
||||
import { convertToChildType } from "@/components/HotelReservation/utils/convertToChildType"
|
||||
import { getPriceType } from "@/components/HotelReservation/utils/getPriceType"
|
||||
import BookedRoomSidePeek from "@/components/SidePeeks/BookedRoomSidePeek"
|
||||
import { getBookedHotelRoom } from "@/utils/booking"
|
||||
|
||||
import styles from "./sidePeek.module.css"
|
||||
|
||||
|
||||
@@ -14,14 +14,13 @@ export default async function Rooms({
|
||||
checkInTime,
|
||||
checkOutTime,
|
||||
mainRoom,
|
||||
linkedReservations,
|
||||
}: BookingConfirmationRoomsProps) {
|
||||
const intl = await getIntl()
|
||||
|
||||
return (
|
||||
<section className={styles.rooms}>
|
||||
<div className={styles.room}>
|
||||
{linkedReservations.length ? (
|
||||
{booking.linkedReservations.length ? (
|
||||
<Typography variant="Title/Subtitle/md">
|
||||
<h2 className={styles.roomTitle}>
|
||||
{intl.formatMessage(
|
||||
@@ -42,7 +41,7 @@ export default async function Rooms({
|
||||
/>
|
||||
</div>
|
||||
|
||||
{linkedReservations.map((reservation, idx) => (
|
||||
{booking.linkedReservations.map((reservation, idx) => (
|
||||
<div className={styles.room} key={reservation.confirmationNumber}>
|
||||
<Typography variant="Title/Subtitle/md">
|
||||
<h2 className={styles.roomTitle}>
|
||||
@@ -57,7 +56,7 @@ export default async function Rooms({
|
||||
<LinkedReservation
|
||||
checkInTime={checkInTime}
|
||||
checkOutTime={checkOutTime}
|
||||
confirmationNumber={reservation.confirmationNumber}
|
||||
refId={reservation.refId}
|
||||
roomIndex={idx + 1}
|
||||
roomNumber={idx + 2}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user