Merged in feat/SW-2888-facilities (pull request #2267)
Feat/SW-2888 facilities * chore(SW-2944): change order of content * chore(SW-2944): add openinghourstype from api Approved-by: Erik Tiekstra
This commit is contained in:
@@ -11,6 +11,7 @@ import styles from "./facility.module.css"
|
|||||||
import {
|
import {
|
||||||
ExternalGymDetails,
|
ExternalGymDetails,
|
||||||
HealthFacilitiesEnum,
|
HealthFacilitiesEnum,
|
||||||
|
OpeningHoursType,
|
||||||
} from "@/types/components/hotelPage/facilities"
|
} from "@/types/components/hotelPage/facilities"
|
||||||
import type { FacilityProps } from "@/types/components/hotelPage/sidepeek/facility"
|
import type { FacilityProps } from "@/types/components/hotelPage/sidepeek/facility"
|
||||||
|
|
||||||
@@ -29,7 +30,9 @@ export default async function Facility({ data }: FacilityProps) {
|
|||||||
details: data.details,
|
details: data.details,
|
||||||
type: data.type,
|
type: data.type,
|
||||||
})
|
})
|
||||||
|
const showOpeningHours =
|
||||||
|
data.openingDetails.openingHoursType !== OpeningHoursType.SetFreeText &&
|
||||||
|
!isExternalGym
|
||||||
return (
|
return (
|
||||||
<div className={styles.content}>
|
<div className={styles.content}>
|
||||||
{image ? <SidePeekImages images={[image]} /> : null}
|
{image ? <SidePeekImages images={[image]} /> : null}
|
||||||
@@ -46,7 +49,12 @@ export default async function Facility({ data }: FacilityProps) {
|
|||||||
</ul>
|
</ul>
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
{isExternalGym ? null : (
|
{shortDescription ? (
|
||||||
|
<Typography variant="Body/Paragraph/mdRegular">
|
||||||
|
<p>{shortDescription}</p>
|
||||||
|
</Typography>
|
||||||
|
) : null}
|
||||||
|
{showOpeningHours ? (
|
||||||
<div className={styles.openingHoursContainer}>
|
<div className={styles.openingHoursContainer}>
|
||||||
<Typography variant="Title/Subtitle/md">
|
<Typography variant="Title/Subtitle/md">
|
||||||
<h4>
|
<h4>
|
||||||
@@ -92,11 +100,6 @@ export default async function Facility({ data }: FacilityProps) {
|
|||||||
</div>
|
</div>
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
{shortDescription ? (
|
|
||||||
<Typography variant="Body/Paragraph/mdRegular">
|
|
||||||
<p>{shortDescription}</p>
|
|
||||||
</Typography>
|
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ export const healthFacilitySchema = z.object({
|
|||||||
.boolean()
|
.boolean()
|
||||||
.nullish()
|
.nullish()
|
||||||
.transform((b) => !!b),
|
.transform((b) => !!b),
|
||||||
|
openingHoursType: nullableStringValidator,
|
||||||
}),
|
}),
|
||||||
type: nullableStringValidator,
|
type: nullableStringValidator,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -108,3 +108,8 @@ export enum OutdoorPoolDetails {
|
|||||||
export enum SaunaDetails {
|
export enum SaunaDetails {
|
||||||
SeparateMenAndWomen = "SeparateMenAndWomen",
|
SeparateMenAndWomen = "SeparateMenAndWomen",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const OpeningHoursType = {
|
||||||
|
SetWeekDayAndWeekEndSchema: "SetWeekDayAndWeekEndSchema",
|
||||||
|
SetFreeText: "SetFreeText",
|
||||||
|
} as const
|
||||||
|
|||||||
Reference in New Issue
Block a user