Merged in feat/sw-1839-show-added-breakfast (pull request #1673)
Feat/sw-1839 show added breakfast * Fix wrong space character * Change to correct CSS variable * Show added breakfast ancillary in the "My add-ons" section * Show breakfast info in room card * Show breakfast in price details table * Format price Approved-by: Pontus Dreij
This commit is contained in:
@@ -199,34 +199,20 @@ export default function PriceDetailsTable({
|
||||
<Row
|
||||
label={intl.formatMessage(
|
||||
{
|
||||
id: "Breakfast ({totalAdults, plural, one {# adult} other {# adults}}) x {totalBreakfasts}",
|
||||
id: "Breakfast ({totalAdults, plural, one {# adult} other {# adults}}{totalChildren, plural, =0 {} one {, # child} other {, # children}}) x {totalBreakfasts}",
|
||||
},
|
||||
{ totalAdults: room.adults, totalBreakfasts: diff }
|
||||
{
|
||||
totalAdults: room.adults,
|
||||
totalChildren: room.childrenInRoom.length,
|
||||
totalBreakfasts: diff,
|
||||
}
|
||||
)}
|
||||
value={formatPrice(
|
||||
intl,
|
||||
room.breakfast.localPrice.price * room.adults,
|
||||
room.breakfast.localPrice.totalPrice,
|
||||
room.breakfast.localPrice.currency
|
||||
)}
|
||||
/>
|
||||
{room.childrenInRoom?.length ? (
|
||||
<Row
|
||||
label={intl.formatMessage(
|
||||
{
|
||||
id: "Breakfast ({totalChildren, plural, one {# child} other {# children}}) x {totalBreakfasts}",
|
||||
},
|
||||
{
|
||||
totalChildren: room.childrenInRoom.length,
|
||||
totalBreakfasts: diff,
|
||||
}
|
||||
)}
|
||||
value={formatPrice(
|
||||
intl,
|
||||
0,
|
||||
room.breakfast.localPrice.currency
|
||||
)}
|
||||
/>
|
||||
) : null}
|
||||
<Row
|
||||
bold
|
||||
label={intl.formatMessage({
|
||||
@@ -234,7 +220,7 @@ export default function PriceDetailsTable({
|
||||
})}
|
||||
value={formatPrice(
|
||||
intl,
|
||||
room.breakfast.localPrice.price * room.adults * diff,
|
||||
room.breakfast.localPrice.totalPrice,
|
||||
room.breakfast.localPrice.currency
|
||||
)}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user