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

Enable requesting to book straight from enquiry #976

Merged
merged 15 commits into from
Dec 20, 2018
Merged

Conversation

lyyder
Copy link
Contributor

@lyyder lyyder commented Dec 10, 2018

Show BookingPanel on tx page for enquired transactions and allow the user to create a booking straight from the enquiry. The transaction created for the enquiry is transitioned to create the booking so all the previous discussions related to that enquiry are available after the booking.

enquiry

When creating a booking after an enquiry, the initial message input is not shown on checkout page:

checkout

@lyyder lyyder force-pushed the enquire-to-tx branch 2 times, most recently from b5cb090 to 6a94f1b Compare December 17, 2018 20:11
@lyyder lyyder force-pushed the extract-section-booking branch 2 times, most recently from ec2998d to 2b60890 Compare December 17, 2018 20:15
@lyyder lyyder force-pushed the enquire-to-tx branch 2 times, most recently from f27492e to 6fa9690 Compare December 17, 2018 20:17
@lyyder lyyder temporarily deployed to sharetribe-starter-app December 18, 2018 08:53 Inactive
@@ -193,7 +193,7 @@ const routeConfiguration = () => {
auth: true,
authPage: 'LoginPage',
component: props => <TransactionPage {...props} transactionRole="customer" />,
loadData: TransactionPage.loadData,
loadData: params => TransactionPage.loadData({ ...params, transactionRole: 'customer' }),
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@@ -106,7 +106,7 @@ export const AddressLinkMaybe = props => {
const fullAddress =
typeof building === 'string' && building.length > 0 ? `${building}, ${address}` : address;

return (isProvider || txIsAcceptedForCustomer) && hrefToGoogleMaps ? (
return txIsAcceptedForCustomer && hrefToGoogleMaps ? (
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm. A provider could see the location of his listing all the time, but this works too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Gnito I don't quite follow. The idea is to hide the address link from the provider.

Copy link
Contributor

Choose a reason for hiding this comment

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

@lyyder provider owns the listing - he knows where it is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, and that's why it's not relevant to show the address link to the provider.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Solved IRL: When to show the listing location link has been a topic of a debate also before and probably continues to be one in the future. For now, we'll only show it only to customers after a booking has been accepted.

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.

The timeslot query is now dublicated from ListingPage. I think we need to figure out how to gather this kind of page-related code to one place.

If this would be in marketplaceData.duck.js it could be something like:

{
  // other marketplace data
  timeslots: {
    '<listing-id-here>': [/* time slots */], 
    '<listing-id-here>': [/* time slots */], 
  },
}

but that makes it a bit harder to keep immutability in check.

@lyyder
Copy link
Contributor Author

lyyder commented Dec 20, 2018

@Gnito would the time slots be cached in the marketplace data? A problem with that is that the available slots might not be up to date when viewing availability of a listing. But some sort of common solution that would reduce the duplication would be welcome indeed.

@lyyder lyyder temporarily deployed to sharetribe-starter-app December 20, 2018 08:55 Inactive
@Gnito
Copy link
Contributor

Gnito commented Dec 20, 2018

@lyyder, yeah, that solution "draft" would still need to be updated when a user goes to a page that uses timeslots. Anyway, this is just a starting point for a possible solution - it can be solved later.

@lyyder lyyder changed the base branch from extract-section-booking to master December 20, 2018 15:59
@lyyder lyyder merged commit d2e8ea0 into master Dec 20, 2018
@lyyder lyyder deleted the enquire-to-tx branch December 20, 2018 16:10
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