Merged in feat/sw-1688-list-breakfast (pull request #1615)

Feat/sw-1688 list breakfast

Approved-by: Pontus Dreij
This commit is contained in:
Niclas Edenvin
2025-03-25 09:56:05 +00:00
parent a3950c5072
commit fef3a785d0
21 changed files with 196 additions and 43 deletions

View File

@@ -44,7 +44,7 @@ export default function PriceSummary({
label={intl.formatMessage({ id: "Price including VAT" })}
value={formatPrice(
intl,
selectedAncillary.price.total,
selectedAncillary.price.totalPrice,
selectedAncillary.price.currency
)}
/>

View File

@@ -36,7 +36,7 @@ export default function PriceDetails({
}
const totalPrice =
quantityWithCard && selectedAncillary
? selectedAncillary.price.total * quantityWithCard
? selectedAncillary.price.totalPrice * quantityWithCard
: null
const totalPoints =

View File

@@ -12,6 +12,7 @@ import Select from "@/components/TempDesignSystem/Form/Select"
import styles from "./selectQuantityStep.module.css"
import type { SelectQuantityStepProps } from "@/types/components/myPages/myStay/ancillaries"
import { BreakfastPackageEnum } from "@/types/enums/breakfast"
export default function SelectQuantityStep({ user }: SelectQuantityStepProps) {
const intl = useIntl()
@@ -46,6 +47,13 @@ export default function SelectQuantityStep({ user }: SelectQuantityStepProps) {
? intl.formatMessage({ id: "Insufficient points" })
: intl.formatMessage({ id: "Select quantity" })
// TODO: Remove this when add breakfast is implemented
if (
selectedAncillary?.id === BreakfastPackageEnum.ANCILLARY_REGULAR_BREAKFAST
) {
return "Breakfast TBI"
}
return (
<div className={styles.selectContainer}>
{selectedAncillary?.points && user && (

View File

@@ -40,6 +40,7 @@ import Steps from "./Steps"
import styles from "./addAncillaryFlowModal.module.css"
import type { AddAncillaryFlowModalProps } from "@/types/components/myPages/myStay/ancillaries"
import { BreakfastPackageEnum } from "@/types/enums/breakfast"
export default function AddAncillaryFlowModal({
booking,
@@ -218,6 +219,7 @@ export default function AddAncillaryFlowModal({
</div>
)
}
const modalTitle =
currentStep === AncillaryStepEnum.selectAncillary
? intl.formatMessage({ id: "Upgrade your stay" })
@@ -251,7 +253,7 @@ export default function AddAncillaryFlowModal({
<p>
{formatPrice(
intl,
selectedAncillary.price.total,
selectedAncillary.price.totalPrice,
selectedAncillary.price.currency
)}
</p>
@@ -290,7 +292,10 @@ export default function AddAncillaryFlowModal({
<Steps user={user} savedCreditCards={savedCreditCards} />
</div>
</form>
{currentStep === AncillaryStepEnum.selectAncillary ? null : (
{/* TODO: Remove the berakfast check when add breakfast is implemented */}
{currentStep === AncillaryStepEnum.selectAncillary ||
selectedAncillary?.id ===
BreakfastPackageEnum.ANCILLARY_REGULAR_BREAKFAST ? null : (
<div
className={
currentStep === AncillaryStepEnum.confirmation