* feat: fetch public event data for booking pages server-side
* fix types
* refactor
* Replace the getPublicEvent with other smaller calls
* Change username to teamSlug
* Fixing types
* Type checks
* Pushing latest for Benny - this still has type errors
* fix type checks
* fill data for team pages too
---------
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
## What does this PR do?
<!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. -->
We were parsing routes based on `eventTypeId` but routes could be pointing to the same event type. This was causing misroutings.
- Fixes #XXXX (GitHub issue number)
- Fixes CAL-XXXX (Linear issue number - should be visible at the bottom of the GitHub issue description)
<!-- Please provide a loom video for visual changes to speed up reviews
Loom Video: https://www.loom.com/
-->
## Mandatory Tasks (DO NOT REMOVE)
- [x] I have self-reviewed the code (A decent size PR without self-review might be rejected).
- [ ] I have updated the developer docs in /docs if this PR makes changes that would require a [documentation change](https://cal.com/docs). If N/A, write N/A here and check the checkbox.
- [ ] I confirm automated tests are in place that prove my fix is effective or that my feature works.
* wip
* Add preview mode in router
* only fetch bookings of this month for weighted rr
* test set up
* only get bookings of current month
* reverts test setup
* first changes for weight adjustments
* reset booking count + adjust calibration
* depreciate weightAdjustment
* get only bookings created this month
* fix typo
* make sure createdAt for hosts is correct
* use earliest possibel date as fallback
* add missing createdAt date to tests
* fix typo
* clean up changes in tests
* fix typo
* change end date to current date
* fix: Fall back to empty host array when no hosts are found
* fix: Restructure code a little
* fixed test, incorrectly used now outdated var
* perf: remove Dayjs from getLuckyUser
* Refactor getHostsWithCalibration for optimised performance, intentionally break test as findMany is always an array
* Better mock for host.findMany
* Remove team-event-types.test.ts, move to appropriate package
* TypeScript cannot auto-infer that an array is non-empty when assigning to a var
* fix: Type Fixes and DistributionMethod enum add
* Optimise tests
* Added test to show that bookings made before a newHost was added affect the lucky user result
* Throw error when the usersWithHighestPriority is empty, which should never happen
* WIP
* remove comment
* update migrations
* get attributes weights and virtual queue data
* use attribute weights and use bookings of virtual queue only
* clean up migrations
* Add shortfall column and add tests
* code clean up from feedback
* wrapper function for getLuckyUser
* code clean up
* fetch routingFormResponse in handleNewBooking
* fix type errors
* fix type errors in tests
* fix getAttributesQueryValue import for tests
* fix totalWeight
* add test for attributes weights and virtual queues
* clean up code
* add test for prepareQueuesAndAttributesData
* remove console.log
* use lazy import
* Add more tests and more columns to matching members queue
* fix issue from merge
* always send usersAndTheirBookingShortfalls
---------
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* move types to types file
* Create salesforce routing form components
* Save salesforce data to routing form
* Fixes
* Add event type service
* Change commenting
* Pass data from routing form to CRM
* Init Salesforce routing form booking form handler
* Salesforce find user associated with lookup field
* Add looking up the contact owner
* If salesforce is disabled then don't change the Salesforce option
* Small refactor
* Refactor getting event type app metadata
* Refactor eventType service
* Type fix
* Clean up
* Add translations
Co-authored-by: Alex van Andel <emrysal@users.noreply.github.com>
---------
Co-authored-by: Alex van Andel <emrysal@users.noreply.github.com>
* adding posthog libs for node + js
* updating lock
* move to init posthog client - pageview component
* adding identify in shell
* removing test event captures
* add signout tracking to dropdown as it was missed in merge
---------
Co-authored-by: sean <sean@brydon.io>
Co-authored-by: Bailey Pumfleet <bailey@pumfleet.co.uk>
* wip virtual list for reassignemnt
* order in alpha and prio order
* loading state
* add flex shrink so status symbol doesnt move
* add gap to each item to make hovering not feel squished
* a11y indexing tab group
* useInViewObserver hook and move to lib
* use correct intersection target
* fix type errors
* remove type
* fix: theme is not configured in app router
* fix type error
* remove logs
* use testBothFutureAndLegacyRoutes
* add APP_ROUTER_SETTINGS_MY_ACCOUNT_ENABLED
* modules for platform plans and billing pages
* add platform billing and plans related pages
* update platform navigation to include billing tab
* custom hook to upgrade team subscription
* refactors
* export cta row component
* fixup
* only pass in subscription id instead of whole subscription
* refactor :teamId/subscribe endpoint logic, add endpoint for upgrading stripe and shift all webhooks logic into services
* refactor team subscription logic, add logic for upgrading stripe and webhooks logic from billing controller
---------
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
* fix: Flakyness on pages that use a hard refres
Signed-off-by: zomars <zomars@me.com>
* Update Shell.tsx
---------
Signed-off-by: zomars <zomars@me.com>
* remove references to /pages for sso, setup, signin pages in /auth
* remove references to pages for insights
* remove references to pages for d
* remove references to pages for signup
* add page for /future index page
* fix routing-forms
* fix
* add missing defaults
* use getServerSessionForAppDir instead
* fix apps/[slug]/[...pages]
* fix metadata in apps/slug/pages
* refactor
* refactor
* remove duplicate code for PageProps
* remove references to pages for /reschedule
* fix
* fix routing forms
* type fix
* fix routing forms again
* revert changes for app/slug/pages
* revert
* revert changes in yarn lock
---------
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
* feat: remove dropdown from app-store and redirect to new-app-install-flow
* removed extra code
* fix: account select loading issue
* removed getPaymentCredential (unused)
* fix: only redirect after the app has been added to all the event-types
* remove overflowIndicatorStyles
* refactor getUserAdminTeams
* send teamId instead of id
* seperate locations component
* for conferencing apps skip select account page
* refactor InstallAppButtonChild
* installing conferencing apps shows locations dropdown in configure step
* send location data to the handler
* send location data to the handler
* add the newly installed to the locations dropdown (prefillLocation)
* fix: type errors
* fix: handle es-lint errors
* fix: app is added again on submit
* only add app if not already added
* fix: type erros
* filter out managed events for now
* fix: show installed count badge
* remove 2 toast message
* feat: added tests for conferencing apps
* fix: loading indicator
* Update apps/web/pages/apps/installation/[[...step]].tsx
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
* Update apps/web/pages/apps/installation/[[...step]].tsx
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
* move `getUserAdminTeams` to `UserRepository`
* fix: zoom and jelly not redirecting to the new app install flow
* fix: typo
* add `installableOnTeams` prop
* split `configureStepCard` into smaller components
* fix: step count
* fix: show loading indicator until the new page is loaded
* fix: organizer_default_conferencing_app not visible in a team
* Introduce QueryClient to app card tests
* fix: typo
* add installableOnTeams prop
* fix: tests
* seated events shouldn't have multiple locations #15174
* fix: o365 callback
* fix: office365_video not redirecting to event-types step
* Revert "fix: o365 callback"
This reverts commit bba841035ea34f8c31201b64c77221b8d8c3e626.
* add TEAM_SELECT_STEP
* add apps to orgs and their sub-teams initial commit
* undo team select step
* small ui fix
* fix: wrong step numbers
* fix: dont allow app installation without cretendialId
* fix: don't show acme team as it cannot have any events
* refactor useAddAppMutation
* removed console.log
* added comment
* added comment
* move locationOptions from getServerSideProps a trpc query
* fix: failing tests
* Update conferencingApps.e2e.ts
* refactor useAddAppMutation
* refactor useAddAppMutation 2
* fix: test failing
* fix: unit test
* Revert "fix: unit test"
This reverts commit 6d74032211d094478c6d7cf9aedbce696dfb768d.
* fix: failing test
* Increase test timeout for conferencing app tests
* fix: write separate tests for each conferencing app to prevent hitting 6000 ms timeout
* improved tests naming
* fix: correct message and translation key #15657
* fix: write separate tests for each analytics app to prevent hitting 6000 ms timeout
* fix: analytics apps test
* attempt to fix failing tests
* fix typo
* refactor
* update: replace text-gray with text-stuble
- works with light mode too
* update: use userRepository.getUserAdminTeams
* Merge branch 'main' into feat/org-team-app-install-2
* fix: after merge conflict from app router migration
* remove consoles
---------
Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
Co-authored-by: Joe Au-Yeung <j.auyeung419@gmail.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
* FEAT: Implement Dub.co for conversion tracking
* add link creation, @vercel/functions
* use refer.cal.com/:username instead of go.cal.com/r/:username
* sale conversion tracking
* add copy referral link
* limit to IS_CALCOM only
* Update yarn.lock
* fix DubAnalytics
* use workaround for isNewUser
* pass req to getOptions
* Update next-auth-options.ts
* fix ts errors
* only show DubAnalytics outside EU
* add Dub Analytics to /signup
* use WEBSITE_URL instead
* on-demand generate links
* add migration
* add check for existing link + change fetch method to poast
* remove refer.cal.com from PoweredByCal
* limit DubAnalytics to /signup only
* simplify generate-referral-link
* restore yarn.lock
* add yarn with dub sdk in
* add yarn with dub sdk in
* yarn
* Update yarn.lock
---------
Co-authored-by: sean <sean@brydon.io>
Co-authored-by: Peer Richelsen <peer@cal.com>
* added lockedSMS to future routes
* add orgMigrations routes to future
* correct metadata
* small fix
* add orgMigrations to future
* Move components to client components
* Remove tRPC element from edit user RSC
* Get username for meta
* Remove suspense query
* Remove orgMigrations from app router
* Type fix
* Revert "Remove suspense query"
This reverts commit eadd814f6e4a5d6856d9218342b7909c22fe62c6.
* Handle suspenseQuery in app router
* User edit page, fetch data server side
* Update yarn.lock
* Export getFixedT
* Set PageWrapper as root layout for settings
* Settings Layout accepts strings for shell heading
* Add OOO to app router settings
* Refactor layout for my-account pages
* Remove instances of pages router from my-account
* Refactor security pages
* Add billing to app router
* Add admin API link to layout
* Add api keys page
* Webhooks WIP
* Refactor SettingsHeader to client component
* Add webhook pages
* Refactor API keys page
* Add admin app page
* Type fix
* fix types
* fix developer/webhooks/[id] param value type error
* remove unnecessary code
* do not pass t prop to CreateNewWebhookButton
* fix type errors in webhook-edit-view
* fix the remaining type errors
* do not use prisma directly in generateMetadata
* remove use client if unnecessary
* Remove unused shell heading from SettingsLayoutAppDir
* improve metadata
* fix billing page
* fix import in settings/teams
* Use next `notFound()`
* fix type check
* fix type check
* remove unused code
* Fix calendar setting page
* Separate settings pages into route groups
* Refactor admin settings pages
* Remove meta instance from billing page route
* Update settings layoutAppDir
* Refactor developer settings pages
* Refactor out of office
* Refactor my account settings
* Refactor admin api page
* Refactor security pages
* Type fix
* fix styling in settings layout
---------
Co-authored-by: Somay Chauhan <somaychauhan98@gmail.com>
Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: Benny Joo <sldisek783@gmail.com>