Merged in revert-pr-1925 (pull request #1927)
Revert "Feat/sw 2323 find booking (pull request #1925)" Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -20,16 +20,14 @@ import { CurrencyEnum } from "@/types/enums/currency"
|
||||
export function LinkedReservation({
|
||||
checkInTime,
|
||||
checkOutTime,
|
||||
refId,
|
||||
confirmationNumber,
|
||||
roomIndex,
|
||||
}: LinkedReservationProps) {
|
||||
const lang = useLang()
|
||||
|
||||
const { data, refetch, isLoading } = trpc.booking.confirmation.useQuery({
|
||||
refId,
|
||||
const { data, refetch, isLoading } = trpc.booking.get.useQuery({
|
||||
confirmationNumber,
|
||||
lang,
|
||||
})
|
||||
|
||||
const {
|
||||
setRoom,
|
||||
setFormattedTotalCost,
|
||||
@@ -43,7 +41,6 @@ export function LinkedReservation({
|
||||
totalBookingPrice: state.totalBookingPrice,
|
||||
totalBookingCheques: state.totalBookingCheques,
|
||||
}))
|
||||
|
||||
const intl = useIntl()
|
||||
|
||||
useEffect(() => {
|
||||
@@ -82,20 +79,13 @@ export function LinkedReservation({
|
||||
return <Retry handleRefetch={refetch} />
|
||||
}
|
||||
|
||||
const { booking, room } = data
|
||||
|
||||
return (
|
||||
<Room
|
||||
checkInDate={booking.checkInDate}
|
||||
checkOutDate={booking.checkOutDate}
|
||||
booking={data.booking}
|
||||
checkInTime={checkInTime}
|
||||
checkOutTime={checkOutTime}
|
||||
confirmationNumber={booking.confirmationNumber}
|
||||
guaranteeInfo={booking.guaranteeInfo}
|
||||
guest={booking.guest}
|
||||
img={room.images[0]}
|
||||
rateDefinition={booking.rateDefinition}
|
||||
roomName={room.name}
|
||||
img={data.room.images[0]}
|
||||
roomName={data.room.name}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user