Merged in fix/SW-2642-select-hotel-corporate-ch (pull request #2003)
fix: SW-2642 Fixed corporate chq and voucher rates city search * fix: SW-2642 Fixed corporate chq and voucher rates city search * fix: SW-2642 Fixed no availability alert for all hotels * fix: SW-2642 Combined flags to suitable variable * fix: SW-2642 Fixed map view to show prices Approved-by: Arvid Norlin
This commit is contained in:
@@ -79,11 +79,7 @@ export async function SelectHotelMapContainer({
|
||||
: false
|
||||
|
||||
const isBookingCodeRateAvailable = bookingCode
|
||||
? hotels?.some(
|
||||
(hotel) =>
|
||||
hotel.availability.productType?.public?.bookingCode ||
|
||||
hotel.availability.productType?.member?.bookingCode
|
||||
)
|
||||
? hotels?.some((hotel) => hotel.availability.bookingCode)
|
||||
: false
|
||||
|
||||
const { hotelsTrackingData, pageTrackingData } = getTracking(
|
||||
|
||||
@@ -140,15 +140,23 @@ export default function SelectHotelContent({
|
||||
)
|
||||
|
||||
const isRegularRateAvailable = bookingCode
|
||||
? hotels.some((hotel) => !hotel.availability.bookingCode)
|
||||
: false
|
||||
|
||||
const isSpecialRate = bookingCode
|
||||
? hotels.some(
|
||||
(hotel) =>
|
||||
!(
|
||||
hotel.availability.productType?.public?.bookingCode ||
|
||||
hotel.availability.productType?.member?.bookingCode
|
||||
)
|
||||
hotel.availability.productType?.bonusCheque ||
|
||||
hotel.availability.productType?.voucher
|
||||
)
|
||||
: false
|
||||
|
||||
const showBookingCodeFilter =
|
||||
bookingCode &&
|
||||
isBookingCodeRateAvailable &&
|
||||
isRegularRateAvailable &&
|
||||
!isSpecialRate
|
||||
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<div className={styles.listingContainer} ref={listingContainerRef}>
|
||||
@@ -170,9 +178,7 @@ export default function SelectHotelContent({
|
||||
filters={filterList}
|
||||
setShowSkeleton={setShowSkeleton}
|
||||
/>
|
||||
{bookingCode &&
|
||||
isBookingCodeRateAvailable &&
|
||||
isRegularRateAvailable ? (
|
||||
{showBookingCodeFilter ? (
|
||||
<div className={styles.bookingCodeFilter}>
|
||||
<BookingCodeFilter />
|
||||
</div>
|
||||
|
||||
@@ -101,16 +101,16 @@ export default async function SelectHotel({
|
||||
const isFullPriceHotelAvailable = bookingCode
|
||||
? hotels?.some(
|
||||
(hotel) =>
|
||||
!hotel.availability.productType?.public?.bookingCode &&
|
||||
!hotel.availability.productType?.member?.bookingCode
|
||||
!hotel.availability.bookingCode &&
|
||||
hotel.availability.status === "Available"
|
||||
)
|
||||
: false
|
||||
|
||||
const isBookingCodeRateAvailable = bookingCode
|
||||
? hotels?.some(
|
||||
(hotel) =>
|
||||
hotel.availability.productType?.public?.bookingCode ||
|
||||
hotel.availability.productType?.member?.bookingCode
|
||||
hotel.availability.bookingCode &&
|
||||
hotel.availability.status === "Available"
|
||||
)
|
||||
: false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user