mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-29 21:21:19 +10:00
Add booking help text for closed booking
This commit is contained in:
parent
2748d68773
commit
e0d206df21
2 changed files with 17 additions and 7 deletions
|
|
@ -222,13 +222,20 @@ export class ListingPageComponent extends Component {
|
|||
</div>
|
||||
: null;
|
||||
|
||||
const showClosedListingHelpText = currentListing.id && !currentListing.attributes.open;
|
||||
const bookingHeading = (
|
||||
<div className={css.bookingHeading}>
|
||||
<h2 className={css.bookingTitle}>
|
||||
<FormattedMessage id="ListingPage.bookingTitle" values={{ title }} />
|
||||
</h2>
|
||||
<div className={css.bookingHelp}>
|
||||
<FormattedMessage id="ListingPage.bookingHelp" />
|
||||
<FormattedMessage
|
||||
id={
|
||||
showClosedListingHelpText
|
||||
? 'ListingPage.bookingHelpClosedListing'
|
||||
: 'ListingPage.bookingHelp'
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
@ -366,12 +373,14 @@ export class ListingPageComponent extends Component {
|
|||
</div>
|
||||
|
||||
{bookingHeading}
|
||||
<BookingDatesForm
|
||||
className={css.bookingForm}
|
||||
onSubmit={handleBookingSubmit}
|
||||
price={price}
|
||||
isOwnListing={isOwnListing}
|
||||
/>
|
||||
{currentListing.attributes.open
|
||||
? <BookingDatesForm
|
||||
className={css.bookingForm}
|
||||
onSubmit={handleBookingSubmit}
|
||||
price={price}
|
||||
isOwnListing={isOwnListing}
|
||||
/>
|
||||
: null}
|
||||
</ModalInMobile>
|
||||
<div className={css.openBookingForm}>
|
||||
<div className={css.priceContainer}>
|
||||
|
|
|
|||
|
|
@ -143,6 +143,7 @@
|
|||
"ListingCard.unsupportedPrice": "({currency})",
|
||||
"ListingCard.unsupportedPriceTitle": "Unsupported currency ({currency})",
|
||||
"ListingPage.bookingHelp": "Start by choosing your dates.",
|
||||
"ListingPage.bookingHelpClosedListing": "Sorry, this listing has been closed.",
|
||||
"ListingPage.bookingTitle": "Book {title}",
|
||||
"ListingPage.closedListing": "This listing has been closed and can't be booked.",
|
||||
"ListingPage.ctaButtonMessage": "Request to book",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue