Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add availability support #892

Merged
merged 11 commits into from
Aug 13, 2018
Merged

Add availability support #892

merged 11 commits into from
Aug 13, 2018

Conversation

lyyder
Copy link
Contributor

@lyyder lyyder commented Aug 8, 2018

Notice!

Merging this change to your Flex client project will enable fetching available time slots for listing page and blocking unavailable ones in the date range picker. In order to properly take this feature in to use, an update is required to the transaction process. So if you are planning to merge this change into your Flex client, contact the Sharetribe Flex support at [email protected] in order to get your process updated accordingly.

About the PR

Adds support for time slots fetched for a listing.

Fetching and showing availability in listing page is enabled by default. In order to disable availability set the fetchAvailableTimeSlots variable to false in src/config.js.

EDIT: See #902 for enabling availability in your marketplace

@lyyder lyyder changed the base branch from master to date-range-input-availability August 8, 2018 15:53
@lyyder lyyder requested a review from Gnito August 8, 2018 15:53
@@ -298,6 +299,12 @@ export class CheckoutPageComponent extends Component {
<FormattedMessage id="CheckoutPage.providerStripeAccountMissingError" />
</p>
);
} else if (isTransactionInitiateBookingTimeNotAvailableError(speculateTransactionError)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initiateTransactionError needs some handling too. Otherwise ~parallel checkouts aka different persons pressing of book buttons at the same time might fail miserably.

Copy link
Contributor

@Gnito Gnito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check initiateOrderError

@lyyder lyyder changed the base branch from date-range-input-availability to master August 9, 2018 12:45
@lyyder lyyder temporarily deployed to sharetribe-starter-app August 10, 2018 05:56 Inactive
@lyyder lyyder temporarily deployed to sharetribe-starter-app August 13, 2018 10:56 Inactive
Fixes a bug in daily booking where selected end date styles are not
cleared when updating start date with a date that is before the old
start date and a booked date can be found between those old and new
start dates.
Enable ending booking on the day another booking starts.

if (selectingEndDate) {
// if end date is being selected first, block the day after a
// booked date as a booking can end on the day the following booking starts
Copy link
Contributor

@Gnito Gnito Aug 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// if end date is being selected first, block the day after a booked date
// (as a booking can end on the day the following booking starts)

@lyyder lyyder merged commit f6fbae7 into master Aug 13, 2018
@lyyder lyyder deleted the availability branch August 13, 2018 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants