-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
feat: atoms team booking #14525
feat: atoms team booking #14525
Conversation
…name to not return empty users[]
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
5 Ignored Deployments
|
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
Current Playwright Test Results Summary✅ 37 Passing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 05/07/2024 12:49:40pm UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: 334811f Started: 05/07/2024 12:47:47pm UTC
|
|
2 Test Cases Affected |
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Update Profile Can update a users email (verification enabled)
Retry 2 • Retry 1 • Initial Attempt |
19.81% (63)63 / 318 runsfailed over last 7 days |
32.39% (103)103 / 318 runsflaked over last 7 days |
Update Profile Newly added secondary email should show as Unverified
Retry 1 • Initial Attempt |
0.94% (3)3 / 319 runsfailed over last 7 days |
11.29% (36)36 / 319 runsflaked over last 7 days |
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (04/11/24)1 reviewer was added to this PR based on Keith Williams's automation. "Add platform team as reviewer" took an action on this PR • (04/11/24)1 reviewer was added to this PR based on Keith Williams's automation. |
entity={{ | ||
orgSlug: "ecorp", | ||
considerUnpublished: false, | ||
}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering what are the potential risk of enabling users to control their orgSlug
* feat: setup usePublicEvent with orgSlug and duration * feat: setup useAvailableSlots with eventTypeSlug and orgSlug * fix & feat: fix TS issues and allow passing multiple users to Booker * refactor: dont show [15min] [30min] [60min] [1h30min] picker * fix: pass orgSlug to handleNewBooking -> loadUsers -> findUsersByUsername to not return empty users[] * refactor: display attendees in booking confirmation screen * fix: getting slots get orgSlug from props not event * revert: Booker username use props instead of hardcoded values * refactor: setup BookerStore org and use it for selectedTime + isDynamic logic * refactor: hide 'what is this meeting about' input in final booking step * fix: TS error * revert: what is the meeting about field hiding * revert: make org as org? in booker store * revert: createNewBooking -> loadUsers -> get forced orgSlug from header not body * refactor: useHandleBookEvent get orgSlug from booker store not props * fix: if entity undefined dont access orgSlug * refactor: add isDynamic prop as queryKey for usePublicEvent * refactor: remove unused prop * re-add docs * fix: typescript error * fix: force platform orgSlug in handleNewBooking.ts * fix: remove duplicate setSelectedDuration declaration * refactor: destructure properies from body instead of req.body * fix: entity optional and hide event members --------- Co-authored-by: Morgan <[email protected]> Co-authored-by: Morgan Vernay <[email protected]>
Use dynamic bookings logic to simulate a team event using atoms booker.
For PlatformBookerWrapper to act as a team booking we need:
❗ Forced slug - important to enable feature
When booking atom makes a booking, it calls v2 bookings.controller.ts which calls handleNewBooking.ts which calls loadUsers, which calls orgDomainConfig which returns orgSlug and if it's valid. The orgSlug is based on organization subdomain e.g. acme.cal.com, and is created so that someone booking acme organization does not book another organization.
Platform teams do not have subdomains, so we can enforce orgSlug that is necessary for handleNewBooking.ts to work by:
x-cal-client-id
request header to note that request is coming from platform.x-cal-force-slug
request header as a way to pass the enforced orgSlug, which is passed to Booker atom via "entity.orgSlug prop".Implemented in fix: force platform orgSlug in handleNewBooking.ts and confirmed with Hariom that approach of client ID + enforced slug as headers is fine.