Merged in feat/SW-1557-implement-booking-code-select (pull request #1304)
feat: SW-1577 Implemented booking code city search * feat: SW-1577 Implemented booking code city search * feat: SW-1557 Strict comparison * feat: SW-1557 Review comments fix Approved-by: Michael Zetterberg Approved-by: Pontus Dreij
This commit is contained in:
@@ -8,6 +8,7 @@ import { selectRate } from "@/constants/routes/hotelReservation"
|
||||
import { useHotelsMapStore } from "@/stores/hotels-map"
|
||||
|
||||
import { mapFacilityToIcon } from "@/components/ContentType/HotelPage/data"
|
||||
import { PriceTagIcon } from "@/components/Icons"
|
||||
import HotelLogo from "@/components/Icons/Logos"
|
||||
import ImageGallery from "@/components/ImageGallery"
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
@@ -36,6 +37,7 @@ function HotelCard({
|
||||
isUserLoggedIn,
|
||||
state = "default",
|
||||
type = HotelCardListingTypeEnum.PageListing,
|
||||
bookingCode = "",
|
||||
}: HotelCardProps) {
|
||||
const params = useParams()
|
||||
const lang = params.lang as Lang
|
||||
@@ -71,6 +73,7 @@ function HotelCard({
|
||||
const galleryImages = mapApiImagesToGalleryImages(
|
||||
hotelData.galleryImages || []
|
||||
)
|
||||
const fullPrice = hotel.price?.public?.rateType?.toLowerCase() === "regular"
|
||||
|
||||
return (
|
||||
<article
|
||||
@@ -161,9 +164,18 @@ function HotelCard({
|
||||
<NoPriceAvailableCard />
|
||||
) : (
|
||||
<>
|
||||
{!isUserLoggedIn && price.public && (
|
||||
<HotelPriceCard productTypePrices={price.public} />
|
||||
{bookingCode && (
|
||||
<span
|
||||
className={`${styles.bookingCode} ${fullPrice ? styles.strikedText : ""}`}
|
||||
>
|
||||
<PriceTagIcon height={20} width={20} />
|
||||
{bookingCode}
|
||||
</span>
|
||||
)}
|
||||
{(!isUserLoggedIn || (bookingCode && !fullPrice)) &&
|
||||
price.public && (
|
||||
<HotelPriceCard productTypePrices={price.public} />
|
||||
)}
|
||||
{price.member && (
|
||||
<HotelPriceCard
|
||||
productTypePrices={price.member}
|
||||
|
||||
Reference in New Issue
Block a user