Merged in fix/SW-998-select-room-change-lang-issues (pull request #977)

fix(SW-998): fix issues related to non-english languages

* fix(SW-998): reverse price logic


Approved-by: Niclas Edenvin
This commit is contained in:
Bianca Widstam
2024-11-26 09:00:15 +00:00
parent d6cff63c5e
commit 9fc65b6e53
15 changed files with 95 additions and 95 deletions

View File

@@ -6,7 +6,6 @@ import { FormProvider, useForm } from "react-hook-form"
import { useIntl } from "react-intl"
import { z } from "zod"
import { InfoCircleIcon } from "@/components/Icons"
import CheckboxChip from "@/components/TempDesignSystem/Form/FilterChip/Checkbox"
import Body from "@/components/TempDesignSystem/Text/Body"
import Caption from "@/components/TempDesignSystem/Text/Caption"
@@ -78,10 +77,14 @@ export default function RoomFilter({
</div>
<div className={styles.infoMobile}>
<div className={styles.filterInfo}>
<Caption type="label" color="burgundy" textTransform="uppercase">
<Caption
type="label"
color="baseTextMediumContrast"
textTransform="uppercase"
>
{intl.formatMessage({ id: "Filter" })}
</Caption>
<Caption type="label" color="burgundy">
<Caption type="label" color="baseTextMediumContrast">
{Object.entries(selectedFilters)
.filter(([_, value]) => value)
.map(([key]) => intl.formatMessage({ id: key }))

View File

@@ -16,7 +16,8 @@
display: flex;
flex-direction: row;
gap: var(--Spacing-x-half);
align-items: flex-end;
flex-wrap: wrap;
margin-right: var(--Spacing-x1);
}
.infoDesktop {

View File

@@ -46,6 +46,13 @@ input[type="radio"]:checked + .card .checkIcon {
.header {
display: flex;
gap: var(--Spacing-x-half);
align-items: flex-start;
}
.priceType {
display: flex;
gap: var(--Spacing-x-half);
flex-wrap: wrap;
}
.button {

View File

@@ -89,8 +89,10 @@ export default function FlexibilityOption({
</Caption>
))}
</Popover>
<Caption color="uiTextHighContrast">{name}</Caption>
<Caption color="uiTextPlaceholder">({paymentTerm})</Caption>
<div className={styles.priceType}>
<Caption color="uiTextHighContrast">{name}</Caption>
<Caption color="uiTextPlaceholder">({paymentTerm})</Caption>
</div>
</div>
<PriceTable
publicPrice={publicPrice}

View File

@@ -77,11 +77,13 @@ export default function RoomCard({
packages?.find((pkg) => pkg.code === RoomPackageCodeEnum.PET_ROOM)) ||
undefined
const selectedRoom = roomCategories.find(
(room) => room.name === roomConfiguration.roomType
const selectedRoom = roomCategories.find((roomCategory) =>
roomCategory.roomTypes.some(
(roomType) => roomType.code === roomConfiguration.roomTypeCode
)
)
const { roomSize, occupancy, images } = selectedRoom || {}
const { name, roomSize, occupancy, images } = selectedRoom || {}
const freeCancelation = intl.formatMessage({ id: "Free cancellation" })
const nonRefundable = intl.formatMessage({ id: "Non-refundable" })
@@ -174,7 +176,7 @@ export default function RoomCard({
</div>
<div className={styles.roomDetails}>
<Subtitle className={styles.name} type="two">
{roomConfiguration.roomType}
{name}
</Subtitle>
{/* Out of scope for now
<Body>{descriptions?.short}</Body>

View File

@@ -20,9 +20,9 @@
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
gap: var(--Spacing-x1);
padding: 0 var(--Spacing-x1) 0 var(--Spacing-x-one-and-half);
height: 40px;
}
.specification .guests {
@@ -34,6 +34,10 @@
margin-left: auto;
}
.toggleSidePeek button {
text-align: start;
}
.container {
padding: var(--Spacing-x1) var(--Spacing-x2) var(--Spacing-x2);
display: flex;