From 94a1aa625aa4a217ffad8f98a3731b7f53aa8a83 Mon Sep 17 00:00:00 2001 From: Pontus Dreij Date: Tue, 8 Oct 2024 15:51:07 +0200 Subject: [PATCH] feat/SW-415: Added select-rate to hotelReservation --- .env.test | 1 + .../hotelreservation/select-rate/page.module.css | 3 ++- .../RoomSelection/RoomCard/roomCard.module.css | 3 ++- constants/routes/hotelReservation.js | 11 +++++++++++ middleware.ts | 1 + 5 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.env.test b/.env.test index d2d1037ac..ce2b20278 100644 --- a/.env.test +++ b/.env.test @@ -42,3 +42,4 @@ GOOGLE_STATIC_MAP_SIGNATURE_SECRET="test" GOOGLE_STATIC_MAP_ID="test" GOOGLE_DYNAMIC_MAP_ID="test" HIDE_FOR_NEXT_RELEASE="true" +SALESFORCE_PREFERENCE_BASE_URL="test" diff --git a/app/[lang]/(live)/(public)/hotelreservation/select-rate/page.module.css b/app/[lang]/(live)/(public)/hotelreservation/select-rate/page.module.css index 3266c418d..125a12aa2 100644 --- a/app/[lang]/(live)/(public)/hotelreservation/select-rate/page.module.css +++ b/app/[lang]/(live)/(public)/hotelreservation/select-rate/page.module.css @@ -7,13 +7,14 @@ } .content { - max-width: 1134px; + max-width: 1434px; margin-top: var(--Spacing-x5); margin-left: auto; margin-right: auto; display: flex; justify-content: space-between; gap: var(--Spacing-x7); + padding: var(--Spacing-x2); } .main { diff --git a/components/HotelReservation/SelectRate/RoomSelection/RoomCard/roomCard.module.css b/components/HotelReservation/SelectRate/RoomSelection/RoomCard/roomCard.module.css index f03a13252..06b04692e 100644 --- a/components/HotelReservation/SelectRate/RoomSelection/RoomCard/roomCard.module.css +++ b/components/HotelReservation/SelectRate/RoomSelection/RoomCard/roomCard.module.css @@ -31,6 +31,7 @@ .card img { max-width: 100%; - aspect-ratio: 1.5; + aspect-ratio: 16/9; object-fit: cover; + border-radius: var(--Corner-radius-Medium) var(--Corner-radius-Medium) 0 0; } diff --git a/constants/routes/hotelReservation.js b/constants/routes/hotelReservation.js index 4f37fcb6c..23e8c0354 100644 --- a/constants/routes/hotelReservation.js +++ b/constants/routes/hotelReservation.js @@ -18,6 +18,16 @@ export const selectHotel = { de: `${hotelReservation.de}/select-hotel`, } +// TODO: Translate paths +export const selectRate = { + en: `${hotelReservation.en}/select-rate`, + sv: `${hotelReservation.sv}/select-rate`, + no: `${hotelReservation.no}/select-rate`, + fi: `${hotelReservation.fi}/select-rate`, + da: `${hotelReservation.da}/select-rate`, + de: `${hotelReservation.de}/select-rate`, +} + // TODO: Translate paths export const selectBed = { en: `${hotelReservation.en}/select-bed`, @@ -95,4 +105,5 @@ export const bookingFlow = [ ...Object.values(details), ...Object.values(payments), ...Object.values(selectHotelMap), + ...Object.values(selectRate), ] diff --git a/middleware.ts b/middleware.ts index 78b73b7ed..8aaff393e 100644 --- a/middleware.ts +++ b/middleware.ts @@ -17,6 +17,7 @@ import { findLang } from "@/utils/languages" export const middleware: NextMiddleware = async (request, event) => { const headers = getDefaultRequestHeaders(request) const lang = findLang(request.nextUrl.pathname) + if (!lang) { // Lang is required for all our middleware. // Without it we shortcircuit early.