Merged in fix/SW-2926-hotel-special-alerts- (pull request #2580)
fix(SW-2926): Display alerts in booking flow if date range matches search dates and in hotel page if current date is in date range * fix(SW-2926): Display alerts in booking flow if date range matches search dates and in hotel page if current date is in date range * fix(SW-2926) Updated hotel alerts with respect to booking dates * fix(SW-2926): Optimized code Approved-by: Matilda Landström
This commit is contained in:
@@ -40,6 +40,8 @@ import { getIntl } from "@/i18n"
|
||||
import MyStayProvider from "@/providers/MyStay"
|
||||
import { isLoggedInUser } from "@/utils/isLoggedInUser"
|
||||
|
||||
import { getHotelAlertsForBookingDates } from "../utils"
|
||||
|
||||
import styles from "./index.module.css"
|
||||
|
||||
import type { Lang } from "@scandic-hotels/common/constants/language"
|
||||
@@ -199,6 +201,12 @@ export default async function MyStay(props: {
|
||||
} satisfies SafeUser)
|
||||
: null
|
||||
|
||||
hotel.specialAlerts = getHotelAlertsForBookingDates(
|
||||
hotel.specialAlerts,
|
||||
fromDate,
|
||||
toDate
|
||||
)
|
||||
|
||||
return (
|
||||
<MyStayProvider
|
||||
bookingConfirmation={maskedBookingConfirmation}
|
||||
|
||||
Reference in New Issue
Block a user