feat: SW-2028 Added reward night info in booking widget

This commit is contained in:
Hrishikesh Vaipurkar
2025-03-24 14:29:31 +01:00
parent 198927e6aa
commit 779495017e
8 changed files with 48 additions and 3 deletions

View File

@@ -8,7 +8,10 @@ import { MaterialIcon } from "@scandic-hotels/design-system/Icons"
import { REDEMPTION } from "@/constants/booking"
import Modal from "@/components/Modal"
import Button from "@/components/TempDesignSystem/Button"
import Checkbox from "@/components/TempDesignSystem/Form/Checkbox"
import Body from "@/components/TempDesignSystem/Text/Body"
import Caption from "@/components/TempDesignSystem/Text/Caption"
import { RemoveExtraRooms } from "../BookingCode"
@@ -27,6 +30,9 @@ export default function RewardNight() {
} = useFormContext<BookingWidgetSchema>()
const ref = useRef<HTMLDivElement | null>(null)
const reward = intl.formatMessage({ id: "Book Reward Night" })
const rewardNightTooltip = intl.formatMessage({
id: "As a Scandic Friends member you need to be logged in to book a reward night (membership number and password). The points can be used to book reward nights at all Scandic hotels.",
})
const redemptionErr = errors[REDEMPTION]
const isMultiRoomError = redemptionErr?.message?.indexOf("Multi-room") === 0
@@ -81,9 +87,31 @@ export default function RewardNight() {
},
}}
>
<Caption color="uiTextMediumContrast" asChild>
<span>{reward}</span>
</Caption>
<div className={styles.rewardNightLabel}>
<Caption color="uiTextMediumContrast" asChild>
<span>{reward}</span>
</Caption>
<Modal
trigger={
<Button intent="text">
<MaterialIcon
icon="info"
size={20}
color="Icon/Feedback/Information"
className={styles.errorIcon}
/>
</Button>
}
title={reward}
>
<Body
color="uiTextHighContrast"
className={styles.rewardNightTooltip}
>
{rewardNightTooltip}
</Body>
</Modal>
</div>
</Checkbox>
{redemptionErr && (
<div className={styles.errorContainer}>

View File

@@ -17,3 +17,14 @@
.errorIcon {
min-width: 20px;
}
.rewardNightLabel {
align-items: center;
display: flex;
gap: var(--Spacing-x1);
}
.rewardNightTooltip {
max-width: 560px;
margin-top: var(--Spacing-x2);
}

View File

@@ -75,6 +75,7 @@
"Are you sure you want to remove this product?": "Er du sikker på, at du vil fjerne dette produkt?",
"Are you sure you want to unlink your account?": "Are you sure you want to unlink your account?",
"Arrival date": "Ankomstdato",
"As a Scandic Friends member you need to be logged in to book a reward night (membership number and password). The points can be used to book reward nights at all Scandic hotels.": "Du skal logge ind for at kunne booke en bonusnat. Som Scandic Friends medlem optjener du point, når du bor hos os, som du kan bruge til bonusnætter på alle vores hoteller.",
"As our Close Friend": "Som vores nære ven",
"As our {level}": "Som vores {level}",
"As this is a multiroom stay, any dates changes are applicable to all rooms. Please ask the person who booked the stay to contact customer service.": "Da dette er et multiroom ophold, gælder alle datoændringer for alle værelser. Bedes du personen, der bookede opholdet, kontakte kundeservice.",

View File

@@ -75,6 +75,7 @@
"Are you sure you want to remove this product?": "Möchten Sie dieses Produkt wirklich entfernen?",
"Are you sure you want to unlink your account?": "Are you sure you want to unlink your account?",
"Arrival date": "Ankunftsdatum",
"As a Scandic Friends member you need to be logged in to book a reward night (membership number and password). The points can be used to book reward nights at all Scandic hotels.": "Als Scandic Friends-Mitglied müssen Sie angemeldet sein, um eine Bonusnacht mit Punkten zu buchen (mit Mitgliedsnummer und Passwort). Die Punkte können für Bonusnächte in allen Scandic Hotels genutzt werden.Bitte beachten Sie, Bonusnächte können nicht bei der Auswhal \"Mehrere Hotels buchen\" gebucht werden.",
"As our Close Friend": "Als unser enger Freund",
"As our {level}": "Als unser {level}",
"As this is a multiroom stay, any dates changes are applicable to all rooms. Please ask the person who booked the stay to contact customer service.": "As this is a multiroom stay, any dates changes are applicable to all rooms. Bitte bitten Sie den Person, der die Buchung gemacht hat, uns zu kontaktieren.",

View File

@@ -74,6 +74,7 @@
"Are you sure you want to remove this product?": "Are you sure you want to remove this product?",
"Are you sure you want to unlink your account?": "Are you sure you want to unlink your account?",
"Arrival date": "Arrival date",
"As a Scandic Friends member you need to be logged in to book a reward night (membership number and password). The points can be used to book reward nights at all Scandic hotels.": "As a Scandic Friends member you need to be logged in to book a reward night (membership number and password). The points can be used to book reward nights at all Scandic hotels.",
"As our Close Friend": "As our Close Friend",
"As our {level}": "As our {level}",
"As this is a multiroom stay, any dates changes are applicable to all rooms. Please ask the person who booked the stay to contact customer service.": "As this is a multiroom stay, any dates changes are applicable to all rooms. Please ask the person who booked the stay to contact customer service.",

View File

@@ -74,6 +74,7 @@
"Are you sure you want to remove this product?": "Haluatko varmasti poistaa tämän tuotteen?",
"Are you sure you want to unlink your account?": "Are you sure you want to unlink your account?",
"Arrival date": "Saapumispäivä",
"As a Scandic Friends member you need to be logged in to book a reward night (membership number and password). The points can be used to book reward nights at all Scandic hotels.": "Kirjaudu sisään Scandic Friends -profiiliisi varataksesi palkintoyöpymisen. Pisteitä voit käyttää palkintoyövarauksiin kaikissa Scandic-hotelleissa.",
"As our Close Friend": "Läheisenä ystävänämme",
"As our {level}": "{level}-etu",
"As this is a multiroom stay, any dates changes are applicable to all rooms. Please ask the person who booked the stay to contact customer service.": "Tämä on monihuoneinen majoitus, joten kaikki päivämäärämuutokset koskevat kaikkia huoneita. Pyydämme henkilöä, joka teki varauksen, ottamaan yhteyttä asiakaspalveluun.",

View File

@@ -74,6 +74,7 @@
"Are you sure you want to remove this product?": "Er du sikker på at du vil fjerne dette produktet?",
"Are you sure you want to unlink your account?": "Are you sure you want to unlink your account?",
"Arrival date": "Ankomstdato",
"As a Scandic Friends member you need to be logged in to book a reward night (membership number and password). The points can be used to book reward nights at all Scandic hotels.": "Du må logge inn for å booke en bonusnatt. Som Scandic Friends medlem tjener du poeng når du bor hos oss, som du kan benytte til bonusnetter på alle våre hotell.",
"As our Close Friend": "Som vår nære venn",
"As our {level}": "Som vår {level}",
"As this is a multiroom stay, any dates changes are applicable to all rooms. Please ask the person who booked the stay to contact customer service.": "Som dette er et multiroom ophold, gælder alle datoændringer for alle værelser. Bedes du personen, der bookede opholdet, kontakte kundeservice.",

View File

@@ -74,6 +74,7 @@
"Are you sure you want to remove this product?": "Är du säker på att du vill ta bort den här produkten?",
"Are you sure you want to unlink your account?": "Are you sure you want to unlink your account?",
"Arrival date": "Ankomstdatum",
"As a Scandic Friends member you need to be logged in to book a reward night (membership number and password). The points can be used to book reward nights at all Scandic hotels.": "Gäller medlemmar i Scandic Friends. För att boka en bonusnatt behöver du logga in med ditt medlemsnummer och lösenord.",
"As our Close Friend": "Som vår nära vän",
"As our {level}": "Som vår {level}",
"As this is a multiroom stay, any dates changes are applicable to all rooms. Please ask the person who booked the stay to contact customer service.": "Då detta är ett multiroom uppehåll, gäller alla datumändringar för alla rum. Vänligen be personen som bokade uppehållet kontakta kundtjänsten.",