Skip to content

Run available user check if event type does not have seats#4646

Merged
emrysal merged 5 commits intomainfrom
hotfix/seats-no-user-available
Sep 21, 2022
Merged

Run available user check if event type does not have seats#4646
emrysal merged 5 commits intomainfrom
hotfix/seats-no-user-available

Conversation

@joeauyeung
Copy link
Copy Markdown
Contributor

What does this PR do?

Available users should be run if there are no seats on the event type.

Fixes # (issue)

Environment: Staging(main branch) / Production

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How should this be tested?

  • Add seats to an event type
  • Book the same time slot twice to take up two seats

Checklist

  • I haven't added tests that prove my fix is effective or that my feature works
  • I haven't checked if new and existing unit tests pass locally with my changes

@vercel
Copy link
Copy Markdown

vercel bot commented Sep 21, 2022

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

Name Status Preview Updated
cal ✅ Ready (Inspect) Visit Preview Sep 21, 2022 at 4:28PM (UTC)

checked={seatsInputVisible}
onCheckedChange={(e) => {
setSeatsInputVisible(e);
formMethods.setValue("seatsPerTimeSlot", seatsPerTimeSlot);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Set default seats on event type when switch is clicked


// Add an if conditional if there are no seats on the event type
// Assign to only one user when ROUND_ROBIN
if (!eventType.seatsPerTimeSlot) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We should only run ensureAvailableUsers if there are no seats. Currently since the user that made the event type is counted as "booked" if there is already one attendee.

@emrysal emrysal added ♻️ autoupdate tells kodiak to keep this branch up-to-date automerge labels Sep 21, 2022
@emrysal emrysal enabled auto-merge (squash) September 21, 2022 16:21
@emrysal emrysal merged commit 830f42b into main Sep 21, 2022
@emrysal emrysal deleted the hotfix/seats-no-user-available branch September 21, 2022 16:30
joeauyeung added a commit that referenced this pull request Sep 21, 2022
* Move available users if there are no seats

* Fix adding default seat to event type

Co-authored-by: Alex van Andel <me@alexvanandel.com>
emrysal added a commit that referenced this pull request Sep 21, 2022
* Move available users if there are no seats

* Fix adding default seat to event type

Co-authored-by: Alex van Andel <me@alexvanandel.com>
emrysal added a commit that referenced this pull request Sep 21, 2022
…4654)

* Move available users if there are no seats

* Fix adding default seat to event type

Co-authored-by: Alex van Andel <me@alexvanandel.com>

Co-authored-by: Alex van Andel <me@alexvanandel.com>
@joeauyeung joeauyeung changed the title Run available user check if event type does not have checks Run available user check if event type does not have seats Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge ♻️ autoupdate tells kodiak to keep this branch up-to-date

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants