From 13261d425ca70c8a76ad7319b059ea269259ad9a Mon Sep 17 00:00:00 2001 From: Tobias Johansson Date: Tue, 13 May 2025 09:22:34 +0000 Subject: [PATCH] Merged in feat/SW-2703-mobile-summary-improvements (pull request #2060) Feat/SW-2703 mobile price summary improvements * feat(SW-2703): fixes to select rate price summary * feat(SW-2703): fixes enter details summary mobile * fix: z-index issue related to booking widget popover * fix * fix: added accessibility props to overlay div * fix: added button inside header * fix: rename aria button Approved-by: Michael Zetterberg --- .../(standard)/details/page.module.css | 1 + .../Mobile/BottomSheet/bottomSheet.module.css | 2 + .../EnterDetails/Summary/Mobile/index.tsx | 23 ++- .../Summary/Mobile/mobile.module.css | 16 ++- .../EnterDetails/Summary/UI/index.tsx | 25 ++-- .../EnterDetails/Summary/UI/ui.module.css | 9 +- .../RateSummary/MobileSummary/Summary.tsx | 39 +++--- .../RateSummary/MobileSummary/index.tsx | 131 ++++++++++-------- .../MobileSummary/mobileSummary.module.css | 17 +++ .../MobileSummary/summary.module.css | 17 ++- .../RoomsContainer/RateSummary/index.tsx | 3 +- .../RateSummary/rateSummary.module.css | 2 +- .../selectRate/rateSummary.ts | 1 + 13 files changed, 178 insertions(+), 108 deletions(-) diff --git a/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/details/page.module.css b/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/details/page.module.css index d3b72a1ad..7fe08b103 100644 --- a/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/details/page.module.css +++ b/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/details/page.module.css @@ -20,6 +20,7 @@ bottom: 0; left: 0; right: 0; + z-index: 99; } @media screen and (min-width: 1367px) { diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Summary/Mobile/BottomSheet/bottomSheet.module.css b/apps/scandic-web/components/HotelReservation/EnterDetails/Summary/Mobile/BottomSheet/bottomSheet.module.css index 99eb5567f..763237464 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Summary/Mobile/BottomSheet/bottomSheet.module.css +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Summary/Mobile/BottomSheet/bottomSheet.module.css @@ -32,6 +32,8 @@ .wrapper[data-open="true"] { grid-template-rows: 1fr 7.5em; + position: relative; + z-index: var(--default-modal-z-index); } .wrapper[data-open="true"] .bottomSheet { diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Summary/Mobile/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Summary/Mobile/index.tsx index d68193c6a..e34a740b5 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Summary/Mobile/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Summary/Mobile/index.tsx @@ -12,8 +12,11 @@ import styles from "./mobile.module.css" import type { SummaryProps } from "@/types/components/hotelReservation/summary" export default function MobileSummary({ isMember }: SummaryProps) { - const toggleSummaryOpen = useEnterDetailsStore( - (state) => state.actions.toggleSummaryOpen + const { isSummaryOpen, toggleSummaryOpen } = useEnterDetailsStore( + (state) => ({ + isSummaryOpen: state.isSummaryOpen, + toggleSummaryOpen: state.actions.toggleSummaryOpen, + }) ) const { booking, rooms, totalPrice, vat } = useEnterDetailsStore((state) => ({ @@ -31,7 +34,21 @@ export default function MobileSummary({ isMember }: SummaryProps) { return (
- {showPromo ? : null} + {showPromo ? ( +
+ +
+ ) : null} + + {isSummaryOpen && ( +