feat(BOOK-469): Enter details design changes with guarantee/non-guarantee flow

Approved-by: Bianca Widstam
This commit is contained in:
Erik Tiekstra
2025-11-24 07:24:52 +00:00
parent ea30e59ab7
commit 02aac9006e
18 changed files with 646 additions and 569 deletions

View File

@@ -0,0 +1,41 @@
import type { IntlShape } from "react-intl"
export function getPaymentHeadingConfig(
intl: IntlShape,
bookingMustBeGuaranteed: boolean,
hasOnlyFlexRates: boolean
) {
if (hasOnlyFlexRates) {
return bookingMustBeGuaranteed
? {
heading: intl.formatMessage({
id: "enterDetails.payment.guaranteePaymentHeading",
defaultMessage: "Guarantee with card",
}),
subHeading: intl.formatMessage({
id: "enterDetails.payment.guaranteePaymentSubheading",
defaultMessage: "(your card won't be charged now)",
}),
showLearnMore: true,
}
: {
heading: intl.formatMessage({
id: "enterDetails.payment.onlyFlexRatesTitle",
defaultMessage: "Final step",
}),
showLearnMore: false,
}
}
return {
preHeading: intl.formatMessage({
id: "enterDetails.payment.label",
defaultMessage: "Payment",
}),
heading: intl.formatMessage({
id: "enterDetails.payment.title",
defaultMessage: "Select payment method",
}),
showLearnMore: false,
}
}