From a66427fcccbeed5bb7b796765400b28888a64f75 Mon Sep 17 00:00:00 2001 From: Pontus Dreij Date: Wed, 13 Nov 2024 15:49:40 +0100 Subject: [PATCH 1/6] feat(SW-826): Hide Button if not isSelectHotelPage and removed accordion for Accessibility --- components/SidePeeks/HotelSidePeek/index.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/components/SidePeeks/HotelSidePeek/index.tsx b/components/SidePeeks/HotelSidePeek/index.tsx index 481db8564..8664ace88 100644 --- a/components/SidePeeks/HotelSidePeek/index.tsx +++ b/components/SidePeeks/HotelSidePeek/index.tsx @@ -31,6 +31,8 @@ export default function HotelSidePeek({ const intl = useIntl() const amenitiesList = getAmenitiesList(hotel) + const isSelectHotelPage = window.location.href.includes("select-hotel") + return ( ) : null} - - TODO: What content should be in the accessibility section? - +
+ {intl.formatMessage({ id: "Accessibility" })} +
{amenitiesList.map((amenity) => { return (
@@ -62,8 +64,10 @@ export default function HotelSidePeek({ ) })} - {/* TODO: handle linking to Hotel Page */} - + {isSelectHotelPage && ( + /* TODO: handle linking to Hotel Page */ + + )}
) From 1595b18644545d633b3ef5a4e051b460f0167c91 Mon Sep 17 00:00:00 2001 From: Pontus Dreij Date: Wed, 13 Nov 2024 15:57:49 +0100 Subject: [PATCH 2/6] feat(SW-826): Added Google Maps Link --- components/HotelReservation/Contact/contact.module.css | 6 ++++++ components/HotelReservation/Contact/index.tsx | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/components/HotelReservation/Contact/contact.module.css b/components/HotelReservation/Contact/contact.module.css index 768e01ca2..b9fba3d9b 100644 --- a/components/HotelReservation/Contact/contact.module.css +++ b/components/HotelReservation/Contact/contact.module.css @@ -46,3 +46,9 @@ flex-direction: column; justify-content: center; } + +.googleMaps { + text-decoration: none; + font-family: var(--typography-Body-Regular-fontFamily); + color: var(--Base-Text-Medium-contrast); +} diff --git a/components/HotelReservation/Contact/index.tsx b/components/HotelReservation/Contact/index.tsx index 2f4e8ccd5..b490b6e89 100644 --- a/components/HotelReservation/Contact/index.tsx +++ b/components/HotelReservation/Contact/index.tsx @@ -13,6 +13,7 @@ import styles from "./contact.module.css" import { ContactProps } from "@/types/components/hotelReservation/selectHotel/selectHotel" export default function Contact({ hotel }: ContactProps) { + console.log(hotel) const lang = useLang() const intl = useIntl() @@ -32,9 +33,12 @@ export default function Contact({ hotel }: ContactProps) { {intl.formatMessage({ id: "Driving directions" })} - + Google Maps - +
  • From 56139f4e3c1adb5a24cf2b2f8ebe4ddf47934018 Mon Sep 17 00:00:00 2001 From: Pontus Dreij Date: Wed, 13 Nov 2024 15:58:44 +0100 Subject: [PATCH 3/6] feat(SW-826) removed log --- components/HotelReservation/Contact/index.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/components/HotelReservation/Contact/index.tsx b/components/HotelReservation/Contact/index.tsx index b490b6e89..5aca6f1eb 100644 --- a/components/HotelReservation/Contact/index.tsx +++ b/components/HotelReservation/Contact/index.tsx @@ -13,7 +13,6 @@ import styles from "./contact.module.css" import { ContactProps } from "@/types/components/hotelReservation/selectHotel/selectHotel" export default function Contact({ hotel }: ContactProps) { - console.log(hotel) const lang = useLang() const intl = useIntl() From 69ca6211ec899ac9618c5af54814bb692805e6ac Mon Sep 17 00:00:00 2001 From: Pontus Dreij Date: Wed, 13 Nov 2024 20:13:24 +0100 Subject: [PATCH 4/6] feat(SW-826): Added target="_blank" --- components/HotelReservation/Contact/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/components/HotelReservation/Contact/index.tsx b/components/HotelReservation/Contact/index.tsx index 5aca6f1eb..8eea2e95a 100644 --- a/components/HotelReservation/Contact/index.tsx +++ b/components/HotelReservation/Contact/index.tsx @@ -35,6 +35,7 @@ export default function Contact({ hotel }: ContactProps) { Google Maps From 5c85e59bba520c309323bea0e6986cb7845ba0f1 Mon Sep 17 00:00:00 2001 From: Pontus Dreij Date: Wed, 13 Nov 2024 20:39:13 +0100 Subject: [PATCH 5/6] feat(SW-826): Added showCTA prop --- components/HotelReservation/ReadMore/index.tsx | 4 ++-- .../HotelReservation/SelectRate/HotelInfoCard/index.tsx | 1 + components/HotelReservation/SidePeek/index.tsx | 2 ++ components/SidePeeks/HotelSidePeek/index.tsx | 5 ++--- stores/sidepeek.ts | 8 ++++++-- types/components/hotelReservation/hotelSidePeek.ts | 1 + .../hotelReservation/selectHotel/selectHotel.ts | 1 + 7 files changed, 15 insertions(+), 7 deletions(-) diff --git a/components/HotelReservation/ReadMore/index.tsx b/components/HotelReservation/ReadMore/index.tsx index fbd6be1ae..f7ec2af84 100644 --- a/components/HotelReservation/ReadMore/index.tsx +++ b/components/HotelReservation/ReadMore/index.tsx @@ -10,12 +10,12 @@ import styles from "./readMore.module.css" import { ReadMoreProps } from "@/types/components/hotelReservation/selectHotel/selectHotel" import { SidePeekEnum } from "@/types/components/hotelReservation/sidePeek" -export default function ReadMore({ label, hotelId }: ReadMoreProps) { +export default function ReadMore({ label, hotelId, showCTA }: ReadMoreProps) { const openSidePeek = useSidePeekStore((state) => state.openSidePeek) return ( )} diff --git a/stores/sidepeek.ts b/stores/sidepeek.ts index 30d6a00e2..9912617ac 100644 --- a/stores/sidepeek.ts +++ b/stores/sidepeek.ts @@ -6,14 +6,17 @@ interface SidePeekState { activeSidePeek: SidePeekEnum | null hotelId: string | null roomTypeCode: string | null + showCTA: boolean openSidePeek: ({ key, hotelId, roomTypeCode, + showCTA, }: { key: SidePeekEnum | null hotelId: string roomTypeCode?: string + showCTA?: boolean }) => void closeSidePeek: () => void } @@ -22,8 +25,9 @@ const useSidePeekStore = create((set) => ({ activeSidePeek: null, hotelId: null, roomTypeCode: null, - openSidePeek: ({ key, hotelId, roomTypeCode }) => - set({ activeSidePeek: key, hotelId, roomTypeCode }), + showCTA: true, + openSidePeek: ({ key, hotelId, roomTypeCode, showCTA }) => + set({ activeSidePeek: key, hotelId, roomTypeCode, showCTA }), closeSidePeek: () => set({ activeSidePeek: null, hotelId: null, roomTypeCode: null }), })) diff --git a/types/components/hotelReservation/hotelSidePeek.ts b/types/components/hotelReservation/hotelSidePeek.ts index 3f5b2ce7c..b531498ae 100644 --- a/types/components/hotelReservation/hotelSidePeek.ts +++ b/types/components/hotelReservation/hotelSidePeek.ts @@ -5,4 +5,5 @@ export type HotelSidePeekProps = { hotel: Hotel activeSidePeek: SidePeekEnum close: () => void + showCTA?: boolean } diff --git a/types/components/hotelReservation/selectHotel/selectHotel.ts b/types/components/hotelReservation/selectHotel/selectHotel.ts index b50521040..233cf0076 100644 --- a/types/components/hotelReservation/selectHotel/selectHotel.ts +++ b/types/components/hotelReservation/selectHotel/selectHotel.ts @@ -9,6 +9,7 @@ export interface ReadMoreProps { label: string hotelId: string hotel: Hotel + showCTA: boolean } export interface ContactProps { From 71ef99147890ce58d453ca87cd0c05375f5e6ce3 Mon Sep 17 00:00:00 2001 From: Pontus Dreij Date: Wed, 13 Nov 2024 20:40:22 +0100 Subject: [PATCH 6/6] feat(SW-826): added showCTA --- components/HotelReservation/HotelCard/index.tsx | 1 + components/SidePeeks/HotelSidePeek/index.tsx | 2 +- types/components/hotelReservation/hotelSidePeek.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/HotelReservation/HotelCard/index.tsx b/components/HotelReservation/HotelCard/index.tsx index 248d08779..86a483536 100644 --- a/components/HotelReservation/HotelCard/index.tsx +++ b/components/HotelReservation/HotelCard/index.tsx @@ -108,6 +108,7 @@ export default function HotelCard({ label={intl.formatMessage({ id: "See hotel details" })} hotelId={hotelData.operaId} hotel={hotelData} + showCTA={true} />
    diff --git a/components/SidePeeks/HotelSidePeek/index.tsx b/components/SidePeeks/HotelSidePeek/index.tsx index 2cc0eb53a..06ac3e5f2 100644 --- a/components/SidePeeks/HotelSidePeek/index.tsx +++ b/components/SidePeeks/HotelSidePeek/index.tsx @@ -27,7 +27,7 @@ export default function HotelSidePeek({ hotel, activeSidePeek, close, - showCTA = true, + showCTA, }: HotelSidePeekProps) { const intl = useIntl() const amenitiesList = getAmenitiesList(hotel) diff --git a/types/components/hotelReservation/hotelSidePeek.ts b/types/components/hotelReservation/hotelSidePeek.ts index b531498ae..d188215b5 100644 --- a/types/components/hotelReservation/hotelSidePeek.ts +++ b/types/components/hotelReservation/hotelSidePeek.ts @@ -5,5 +5,5 @@ export type HotelSidePeekProps = { hotel: Hotel activeSidePeek: SidePeekEnum close: () => void - showCTA?: boolean + showCTA: boolean }