Merge remote-tracking branch 'origin' into feat/tracking-payment

This commit is contained in:
Linus Flood
2025-01-10 09:13:04 +01:00
111 changed files with 2371 additions and 875 deletions

View File

@@ -126,7 +126,7 @@ export default async function StepPage({
return notFound()
}
const mustBeGuaranteed = roomAvailability?.mustBeGuaranteed ?? false
const { mustBeGuaranteed, breakfastIncluded } = roomAvailability
const paymentGuarantee = intl.formatMessage({
id: "Payment Guarantee",
@@ -190,13 +190,18 @@ export default async function StepPage({
isMember: !!user,
rateDetails: roomAvailability.rateDetails,
roomType: roomAvailability.selectedRoom.roomType,
breakfastIncluded,
}
const showBreakfastStep = Boolean(
breakfastPackages?.length && !breakfastIncluded
)
return (
<EnterDetailsProvider
bedTypes={roomAvailability.bedTypes}
booking={booking}
breakfastPackages={breakfastPackages}
showBreakfastStep={showBreakfastStep}
packages={packages}
roomRate={{
memberRate: roomAvailability.memberRate,
@@ -230,13 +235,13 @@ export default async function StepPage({
</SectionAccordion>
) : null}
{breakfastPackages?.length ? (
{showBreakfastStep ? (
<SectionAccordion
header={intl.formatMessage({ id: "Food options" })}
label={intl.formatMessage({ id: "Select breakfast options" })}
step={StepEnum.breakfast}
>
<Breakfast packages={breakfastPackages} />
<Breakfast packages={breakfastPackages!} />
</SectionAccordion>
) : null}