Skip to content

Allow user to add as many locations as they want#7279

Merged
hariombalhara merged 16 commits intocalcom:mainfrom
esau-morais:main
Feb 23, 2023
Merged

Allow user to add as many locations as they want#7279
hariombalhara merged 16 commits intocalcom:mainfrom
esau-morais:main

Conversation

@esau-morais
Copy link
Copy Markdown
Contributor

@esau-morais esau-morais commented Feb 22, 2023

What does this PR do?

Closes #7138

Proof

The conclusion I've made is that when locations get the exact length as the locationOptions, it doesn't fit the removed condition (validLocations !== locationOptions), once they are equal, which causes the issue.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • 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?

  • Go to specific event type
  • Add locations
  • Should get to add as many locations as they want

Checklist

  • I haven't added tests that prove my fix is effective or that my feature works

@esau-morais esau-morais requested a review from a team February 22, 2023 14:32
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 22, 2023

@esau-morais is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated
ui ⬜️ Ignored (Inspect) Feb 22, 2023 at 2:33PM (UTC)

@github-actions
Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Analysis

This analysis was generated by the next.js bundle analysis action 🤖

This PR introduced no changes to the javascript bundle 🙌

</div>
)}
{validLocations.length > 0 && validLocations.length !== locationOptions.length && (
{validLocations.length > 0 && (
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This check was actually there to stop showing 'Add a Location' CTA when all possible locations are added. Something has broken it. But for now it is acceptable.

@hariombalhara hariombalhara merged commit e5d44d0 into calcom:main Feb 23, 2023
fritterhoff pushed a commit to hm-edu/cal.com that referenced this pull request Feb 26, 2023
Mythie pushed a commit to Mythie/cal.com that referenced this pull request Mar 5, 2023
dmkav pushed a commit to join-com/cal-com that referenced this pull request Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CAL-1086] Can't add more than 4 locations to an EventType

2 participants