Skip to content

Dynamic group link for more than 2 user fixed#2416

Merged
pumfleet merged 5 commits intomainfrom
bugfix/dynamic-group-booking
Apr 7, 2022
Merged

Dynamic group link for more than 2 user fixed#2416
pumfleet merged 5 commits intomainfrom
bugfix/dynamic-group-booking

Conversation

@alishaz-polymath
Copy link
Copy Markdown
Member

@alishaz-polymath alishaz-polymath commented Apr 7, 2022

What does this PR do?

  • Dynamic group booking only supports 2 users currently because of the use of replace added in PR Dynamic group booking fix to accept "+" in URL and updated Head SEO for dynamic booking #2414. This PR adds support for more than 2 users by building on that PR logic.
  • This PR also fixes the dynamic group link logic which earlier only allowed 2 users, but now provides the expected link with all the users as part of the booking.
  • This PR updates the availability and booking pages to use Name instead of usernames of the dynamic group for title

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How should this be tested?

  • Try booking /pro+rick+free+usa in staging

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 7, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

docs – ./apps/docs

🔍 Inspect: https://vercel.com/cal/docs/6nY8coJwNiutTaKsKy7FpgQjL9iL
✅ Preview: Canceled

[Deployment for 4476294 canceled]

calendso – ./apps/web

🔍 Inspect: https://vercel.com/cal/calendso/AzwX7bQYuRBzZikF6sDNvAnKKr4Q
✅ Preview: https://calendso-git-bugfix-dynamic-group-booking-cal.vercel.app

@vercel vercel Bot temporarily deployed to Preview – docs April 7, 2022 11:05 Inactive
@vercel vercel Bot temporarily deployed to Preview – calendso April 7, 2022 11:05 Inactive
@vercel vercel Bot temporarily deployed to Preview – docs April 7, 2022 11:13 Inactive
@vercel vercel Bot temporarily deployed to Preview – calendso April 7, 2022 11:13 Inactive
@vercel vercel Bot temporarily deployed to Preview – docs April 7, 2022 11:15 Inactive
@alishaz-polymath alishaz-polymath marked this pull request as ready for review April 7, 2022 11:17
@alishaz-polymath alishaz-polymath self-assigned this Apr 7, 2022
@alishaz-polymath alishaz-polymath added 🐛 bug Something isn't working 🚧 wip / in the making This is currently being worked on labels Apr 7, 2022
@vercel vercel Bot temporarily deployed to Preview – calendso April 7, 2022 11:18 Inactive
@alishaz-polymath alishaz-polymath added 👀 ready for review and removed 🚧 wip / in the making This is currently being worked on labels Apr 7, 2022
@vercel vercel Bot temporarily deployed to Preview – docs April 7, 2022 13:01 Inactive
@vercel vercel Bot temporarily deployed to Preview – calendso April 7, 2022 13:01 Inactive
const profile = isDynamicGroup
? {
name: getGroupName(usernameList),
name: getGroupName(dynamicNames),
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Adds user's Names instead of username for title

const profile = isDynamicGroupBooking
? {
name: getGroupName(usernameList),
name: getGroupName(dynamicNames),
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Uses Name isntead of username for title

let combinedUsername = ``;
for (let i = 0; i < users.length - 1; i++) {
combinedUsername = `${users[i].username}+`;
let combinedUsername = `${users[0].username}`;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixes multi user username slug logic

Copy link
Copy Markdown
Member

@hariombalhara hariombalhara left a comment

Choose a reason for hiding this comment

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

Code LGTM.

Comment thread packages/lib/defaultEvents.ts Outdated
Comment thread packages/lib/defaultEvents.ts
@alishaz-polymath alishaz-polymath added 🚧 wip / in the making This is currently being worked on and removed 👀 ready for review labels Apr 7, 2022
@pumfleet pumfleet merged commit a551919 into main Apr 7, 2022
@pumfleet pumfleet deleted the bugfix/dynamic-group-booking branch April 7, 2022 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working 🚧 wip / in the making This is currently being worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants