Merged in feat/SW-589-breakfast-copy-select-rate (pull request #921)
feat(SW-589): Added correct breakfastMessage, also fixed some small issues Approved-by: Niclas Edenvin
This commit is contained in:
@@ -54,9 +54,23 @@ export default function RoomCard({
|
|||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPriceInformationForRate(rate: RateDefinition | undefined) {
|
function getRateDefinitionForRate(rate: RateDefinition | undefined) {
|
||||||
return rateDefinitions.find((def) => def.rateCode === rate?.rateCode)
|
return rateDefinitions.find((def) => def.rateCode === rate?.rateCode)
|
||||||
?.generalTerms
|
}
|
||||||
|
|
||||||
|
const getBreakfastMessage = (rate: RateDefinition | undefined) => {
|
||||||
|
const breakfastIncluded = getRateDefinitionForRate(rate)?.breakfastIncluded
|
||||||
|
|
||||||
|
switch (breakfastIncluded) {
|
||||||
|
case true:
|
||||||
|
return intl.formatMessage({ id: "Breakfast is included." })
|
||||||
|
case false:
|
||||||
|
return intl.formatMessage({ id: "Breakfast selection in next step." })
|
||||||
|
default:
|
||||||
|
return intl.formatMessage({
|
||||||
|
id: "Breakfast deal can be purchased at the hotel.",
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const petRoomPackage =
|
const petRoomPackage =
|
||||||
@@ -168,9 +182,7 @@ export default function RoomCard({
|
|||||||
</div>
|
</div>
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
<Caption color="uiTextHighContrast" type="bold">
|
<Caption color="uiTextHighContrast" type="bold">
|
||||||
{intl.formatMessage({
|
{getBreakfastMessage(rates.flexRate)}
|
||||||
id: "Breakfast selection in next step.",
|
|
||||||
})}
|
|
||||||
</Caption>
|
</Caption>
|
||||||
{roomConfiguration.status === "NotAvailable" ? (
|
{roomConfiguration.status === "NotAvailable" ? (
|
||||||
<div className={styles.noRoomsContainer}>
|
<div className={styles.noRoomsContainer}>
|
||||||
@@ -192,7 +204,7 @@ export default function RoomCard({
|
|||||||
value={key.toLowerCase()}
|
value={key.toLowerCase()}
|
||||||
paymentTerm={key === "flexRate" ? payLater : payNow}
|
paymentTerm={key === "flexRate" ? payLater : payNow}
|
||||||
product={findProductForRate(rate)}
|
product={findProductForRate(rate)}
|
||||||
priceInformation={getPriceInformationForRate(rate)}
|
priceInformation={getRateDefinitionForRate(rate)?.generalTerms}
|
||||||
handleSelectRate={handleSelectRate}
|
handleSelectRate={handleSelectRate}
|
||||||
roomType={roomConfiguration.roomType}
|
roomType={roomConfiguration.roomType}
|
||||||
roomTypeCode={roomConfiguration.roomTypeCode}
|
roomTypeCode={roomConfiguration.roomTypeCode}
|
||||||
|
|||||||
@@ -12,18 +12,7 @@
|
|||||||
|
|
||||||
.card.noAvailability {
|
.card.noAvailability {
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
}
|
opacity: 0.6;
|
||||||
|
|
||||||
.card.noAvailability:before {
|
|
||||||
background-color: rgba(0, 0, 0, 40%);
|
|
||||||
content: "";
|
|
||||||
display: block;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
z-index: 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.specification {
|
.specification {
|
||||||
|
|||||||
@@ -47,8 +47,10 @@
|
|||||||
"Booking number": "Bookingnummer",
|
"Booking number": "Bookingnummer",
|
||||||
"Breakfast": "Morgenmad",
|
"Breakfast": "Morgenmad",
|
||||||
"Breakfast buffet": "Morgenbuffet",
|
"Breakfast buffet": "Morgenbuffet",
|
||||||
|
"Breakfast deal can be purchased at the hotel.": "Morgenmad kan købes på hotellet.",
|
||||||
"Breakfast excluded": "Morgenmad ikke inkluderet",
|
"Breakfast excluded": "Morgenmad ikke inkluderet",
|
||||||
"Breakfast included": "Morgenmad inkluderet",
|
"Breakfast included": "Morgenmad inkluderet",
|
||||||
|
"Breakfast is included.": "Morgenmad er inkluderet.",
|
||||||
"Breakfast restaurant": "Breakfast restaurant",
|
"Breakfast restaurant": "Breakfast restaurant",
|
||||||
"Breakfast selection in next step.": "Valg af morgenmad i næste trin.",
|
"Breakfast selection in next step.": "Valg af morgenmad i næste trin.",
|
||||||
"Bus terminal": "Busstation",
|
"Bus terminal": "Busstation",
|
||||||
|
|||||||
@@ -47,8 +47,10 @@
|
|||||||
"Booking number": "Buchungsnummer",
|
"Booking number": "Buchungsnummer",
|
||||||
"Breakfast": "Frühstück",
|
"Breakfast": "Frühstück",
|
||||||
"Breakfast buffet": "Frühstücksbuffet",
|
"Breakfast buffet": "Frühstücksbuffet",
|
||||||
|
"Breakfast deal can be purchased at the hotel.": "Frühstücksangebot kann im Hotel gekauft werden.",
|
||||||
"Breakfast excluded": "Frühstück nicht inbegriffen",
|
"Breakfast excluded": "Frühstück nicht inbegriffen",
|
||||||
"Breakfast included": "Frühstück inbegriffen",
|
"Breakfast included": "Frühstück inbegriffen",
|
||||||
|
"Breakfast is included.": "Frühstück ist inbegriffen.",
|
||||||
"Breakfast restaurant": "Breakfast restaurant",
|
"Breakfast restaurant": "Breakfast restaurant",
|
||||||
"Breakfast selection in next step.": "Frühstücksauswahl in nächsten Schritt.",
|
"Breakfast selection in next step.": "Frühstücksauswahl in nächsten Schritt.",
|
||||||
"Bus terminal": "Busbahnhof",
|
"Bus terminal": "Busbahnhof",
|
||||||
|
|||||||
@@ -51,8 +51,10 @@
|
|||||||
"Booking number": "Booking number",
|
"Booking number": "Booking number",
|
||||||
"Breakfast": "Breakfast",
|
"Breakfast": "Breakfast",
|
||||||
"Breakfast buffet": "Breakfast buffet",
|
"Breakfast buffet": "Breakfast buffet",
|
||||||
|
"Breakfast deal can be purchased at the hotel.": "Breakfast deal can be purchased at the hotel.",
|
||||||
"Breakfast excluded": "Breakfast excluded",
|
"Breakfast excluded": "Breakfast excluded",
|
||||||
"Breakfast included": "Breakfast included",
|
"Breakfast included": "Breakfast included",
|
||||||
|
"Breakfast is included.": "Breakfast is included.",
|
||||||
"Breakfast restaurant": "Breakfast restaurant",
|
"Breakfast restaurant": "Breakfast restaurant",
|
||||||
"Breakfast selection in next step.": "Breakfast selection in next step.",
|
"Breakfast selection in next step.": "Breakfast selection in next step.",
|
||||||
"Bus terminal": "Bus terminal",
|
"Bus terminal": "Bus terminal",
|
||||||
|
|||||||
@@ -47,8 +47,10 @@
|
|||||||
"Booking number": "Varausnumero",
|
"Booking number": "Varausnumero",
|
||||||
"Breakfast": "Aamiainen",
|
"Breakfast": "Aamiainen",
|
||||||
"Breakfast buffet": "Aamiaisbuffet",
|
"Breakfast buffet": "Aamiaisbuffet",
|
||||||
|
"Breakfast deal can be purchased at the hotel.": "Aamiaisdeali voidaan ostaa hotellissa.",
|
||||||
"Breakfast excluded": "Aamiainen ei sisälly",
|
"Breakfast excluded": "Aamiainen ei sisälly",
|
||||||
"Breakfast included": "Aamiainen sisältyy",
|
"Breakfast included": "Aamiainen sisältyy",
|
||||||
|
"Breakfast is included.": "Aamiainen sisältyy.",
|
||||||
"Breakfast restaurant": "Breakfast restaurant",
|
"Breakfast restaurant": "Breakfast restaurant",
|
||||||
"Breakfast selection in next step.": "Aamiaisvalinta seuraavassa vaiheessa.",
|
"Breakfast selection in next step.": "Aamiaisvalinta seuraavassa vaiheessa.",
|
||||||
"Bus terminal": "Bussiasema",
|
"Bus terminal": "Bussiasema",
|
||||||
|
|||||||
@@ -47,8 +47,10 @@
|
|||||||
"Booking number": "Bestillingsnummer",
|
"Booking number": "Bestillingsnummer",
|
||||||
"Breakfast": "Frokost",
|
"Breakfast": "Frokost",
|
||||||
"Breakfast buffet": "Breakfast buffet",
|
"Breakfast buffet": "Breakfast buffet",
|
||||||
|
"Breakfast deal can be purchased at the hotel.": "Frokostdeal kan kjøpes på hotellet.",
|
||||||
"Breakfast excluded": "Frokost ekskludert",
|
"Breakfast excluded": "Frokost ekskludert",
|
||||||
"Breakfast included": "Frokost inkludert",
|
"Breakfast included": "Frokost inkludert",
|
||||||
|
"Breakfast is included.": "Frokost er inkludert.",
|
||||||
"Breakfast restaurant": "Breakfast restaurant",
|
"Breakfast restaurant": "Breakfast restaurant",
|
||||||
"Breakfast selection in next step.": "Frokostvalg i neste steg.",
|
"Breakfast selection in next step.": "Frokostvalg i neste steg.",
|
||||||
"Bus terminal": "Bussterminal",
|
"Bus terminal": "Bussterminal",
|
||||||
|
|||||||
@@ -47,8 +47,10 @@
|
|||||||
"Booking number": "Bokningsnummer",
|
"Booking number": "Bokningsnummer",
|
||||||
"Breakfast": "Frukost",
|
"Breakfast": "Frukost",
|
||||||
"Breakfast buffet": "Frukostbuffé",
|
"Breakfast buffet": "Frukostbuffé",
|
||||||
|
"Breakfast deal can be purchased at the hotel.": "Frukostdeal kan köpas på hotellet.",
|
||||||
"Breakfast excluded": "Frukost ingår ej",
|
"Breakfast excluded": "Frukost ingår ej",
|
||||||
"Breakfast included": "Frukost ingår",
|
"Breakfast included": "Frukost ingår",
|
||||||
|
"Breakfast is included.": "Frukost ingår.",
|
||||||
"Breakfast restaurant": "Breakfast restaurant",
|
"Breakfast restaurant": "Breakfast restaurant",
|
||||||
"Breakfast selection in next step.": "Frukostval i nästa steg.",
|
"Breakfast selection in next step.": "Frukostval i nästa steg.",
|
||||||
"Bus terminal": "Bussterminal",
|
"Bus terminal": "Bussterminal",
|
||||||
|
|||||||
Reference in New Issue
Block a user