From d2bbc59f47424f72a171be7a3f8e4cfeb1ebd8fc Mon Sep 17 00:00:00 2001 From: Hrishikesh Vaipurkar Date: Mon, 5 May 2025 09:17:44 +0000 Subject: [PATCH] Merged in fix/SW-2602-select-hotel-page-booking-code (pull request #1941) Fix/SW-2602 select hotel page booking code filtering * fix: SW-2602 Fixed booking code filtering * fix: SW-2602 Fixed lint issues Approved-by: Niclas Edenvin --- .../(public)/hotelreservation/(standard)/details/page.tsx | 6 ++++-- .../components/HotelReservation/HotelCardListing/index.tsx | 2 +- .../components/HotelReservation/SelectRate/index.tsx | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/details/page.tsx b/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/details/page.tsx index 35dbbdcee..7ffa673ee 100644 --- a/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/details/page.tsx +++ b/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/details/page.tsx @@ -2,8 +2,10 @@ import { cookies } from "next/headers" import { notFound, redirect } from "next/navigation" import { Suspense } from "react" -import { BookingErrorCodeEnum } from "@/constants/booking" -import { FamilyAndFriendsCodes } from "@/constants/booking" +import { + BookingErrorCodeEnum, + FamilyAndFriendsCodes, +} from "@/constants/booking" import { selectRate } from "@/constants/routes/hotelReservation" import { getBreakfastPackages, diff --git a/apps/scandic-web/components/HotelReservation/HotelCardListing/index.tsx b/apps/scandic-web/components/HotelReservation/HotelCardListing/index.tsx index 84a661759..abda0ece5 100644 --- a/apps/scandic-web/components/HotelReservation/HotelCardListing/index.tsx +++ b/apps/scandic-web/components/HotelReservation/HotelCardListing/index.tsx @@ -64,7 +64,7 @@ export default function HotelCardListing({ : false const showOnlyBookingCodeRates = isBookingCodeRateAvailable && - activeCodeFilter !== BookingCodeFilterEnum.Discounted + activeCodeFilter === BookingCodeFilterEnum.Discounted const hotels = useMemo(() => { const sortedHotels = getSortedHotels({ diff --git a/apps/scandic-web/components/HotelReservation/SelectRate/index.tsx b/apps/scandic-web/components/HotelReservation/SelectRate/index.tsx index 687a450db..5e247dcba 100644 --- a/apps/scandic-web/components/HotelReservation/SelectRate/index.tsx +++ b/apps/scandic-web/components/HotelReservation/SelectRate/index.tsx @@ -13,8 +13,8 @@ import { setLang } from "@/i18n/serverContext" import { getHotelSearchDetails } from "@/utils/hotelSearchDetails" import { convertSearchParamsToObj } from "@/utils/url" -import AvailabilityError from "./AvailabilityError" import FnFNotAllowedAlert from "../FnFNotAllowedAlert/FnFNotAllowedAlert" +import AvailabilityError from "./AvailabilityError" import { getValidDates } from "./getValidDates" import { getTracking } from "./tracking"