feat: SW-1583 Implemented Reward nights on city search
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
.poinstRow {
|
||||
display: flex;
|
||||
gap: var(--Spacing-x1);
|
||||
align-items: baseline;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
|
||||
|
||||
import styles from "./hotelPointsCard.module.css"
|
||||
|
||||
import type { PointsCardProps } from "@/types/components/hotelReservation/selectHotel/priceCardProps"
|
||||
|
||||
export default function HotelPointsCard({
|
||||
productTypePoints,
|
||||
}: PointsCardProps) {
|
||||
const intl = useIntl()
|
||||
|
||||
return (
|
||||
<div className={styles.poinstRow}>
|
||||
<Subtitle type="two" color="uiTextHighContrast">
|
||||
{productTypePoints.localPrice.pointsPerStay}
|
||||
</Subtitle>
|
||||
<Caption color="uiTextHighContrast">
|
||||
{intl.formatMessage({ id: "Points" })}
|
||||
</Caption>
|
||||
{productTypePoints.localPrice.pricePerStay ? (
|
||||
<>
|
||||
+
|
||||
<Subtitle type="two" color="uiTextHighContrast">
|
||||
{productTypePoints.localPrice.pricePerStay}
|
||||
</Subtitle>
|
||||
<Caption color="uiTextHighContrast">
|
||||
{productTypePoints.localPrice.currency}
|
||||
</Caption>
|
||||
</>
|
||||
) : null}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -96,6 +96,12 @@
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.pointsCard {
|
||||
background-color: var(--Base-Surface-Secondary-light-Normal);
|
||||
padding: var(--Spacing-x-one-and-half);
|
||||
border-radius: var(--Corner-radius-Medium);
|
||||
}
|
||||
|
||||
@media screen and (min-width: 768px) and (max-width: 1024px) {
|
||||
.imageContainer {
|
||||
height: 180px;
|
||||
|
||||
@@ -22,6 +22,7 @@ import { getSingleDecimal } from "@/utils/numberFormatting"
|
||||
|
||||
import ReadMore from "../ReadMore"
|
||||
import TripAdvisorChip from "../TripAdvisorChip"
|
||||
import HotelPointsCard from "./HotelPointsCard"
|
||||
import HotelPriceCard from "./HotelPriceCard"
|
||||
import NoPriceAvailableCard from "./NoPriceAvailableCard"
|
||||
import { hotelCardVariants } from "./variants"
|
||||
@@ -172,7 +173,9 @@ function HotelCard({
|
||||
{bookingCode}
|
||||
</span>
|
||||
)}
|
||||
{(!isUserLoggedIn || (bookingCode && !fullPrice)) &&
|
||||
{(!isUserLoggedIn ||
|
||||
!price.member ||
|
||||
(bookingCode && !fullPrice)) &&
|
||||
price.public && (
|
||||
<HotelPriceCard productTypePrices={price.public} />
|
||||
)}
|
||||
@@ -182,6 +185,20 @@ function HotelCard({
|
||||
isMemberPrice
|
||||
/>
|
||||
)}
|
||||
{price.redemption && (
|
||||
<div className={styles.pointsCard}>
|
||||
<Caption>
|
||||
{intl.formatMessage({ id: "Available rates" })}
|
||||
</Caption>
|
||||
<HotelPointsCard productTypePoints={price.redemption} />
|
||||
{price.redemptionA && (
|
||||
<HotelPointsCard productTypePoints={price.redemptionA} />
|
||||
)}
|
||||
{price.redemptionB && (
|
||||
<HotelPointsCard productTypePoints={price.redemptionB} />
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
<Button
|
||||
asChild
|
||||
theme="base"
|
||||
|
||||
@@ -77,6 +77,7 @@ export default async function SelectHotel({
|
||||
childrenInRoom,
|
||||
hotel: isAlternativeFor,
|
||||
bookingCode,
|
||||
redemption,
|
||||
} = searchDetails
|
||||
|
||||
if (!city) return notFound()
|
||||
@@ -89,6 +90,7 @@ export default async function SelectHotel({
|
||||
adults: adultsInRoom[0],
|
||||
children: childrenInRoomString,
|
||||
bookingCode,
|
||||
redemption,
|
||||
})
|
||||
)
|
||||
: bookingCode
|
||||
@@ -109,6 +111,7 @@ export default async function SelectHotel({
|
||||
roomStayEndDate: selectHotelParams.toDate,
|
||||
adults: adultsInRoom[0],
|
||||
children: childrenInRoomString,
|
||||
redemption,
|
||||
})
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user