* migration + migrate booking limit page to team settings
* new pages
* use settings toggle for displaying content
* get current team presets
* update mutation
* i18n for settings page
* remove redudant await
* cancelation UI for select
* handle other selection
* extract into a util
* inital cancelation reason flow
* fix i18n to be more readable
* add cancel reason logic
* nits
* improve copy
* ensure is teamMember and not isAdmin for getting internalNotes
* improvie spacing between elements
* fix types
* more type fixes
* correct types
* Update packages/features/bookings/lib/handleNewBooking/getEventTypesFromDB.ts
* use input component and remove mb-2 to allign with icon button
* Update packages/trpc/server/routers/viewer/teams/updateInternalNotesPresets.handler.ts
Co-authored-by: Eunjae Lee <hey@eunjae.dev>
* nits
* type fixs
* fix type
* fix type
* fix nullable option lost in merge
---------
Co-authored-by: Eunjae Lee <hey@eunjae.dev>
* update env vars
* update middleware
* remove pages router and move pages to /app
* move to /team
* update imports
* fix
* remove pages router and move org pages to /app
* wip
* fix orgSlug/user pages
* fix orgSlug/user/type pages
* remove generateMetadata from embed pages
* fix
* remove pages router for /user pages
* generateMetadata is not needed in embed pages
* remove future/org
* no layout in [user] page
* simplify
* fix
* fix OG image for [user]
* fix OG images for org/user and team/slug
* fix OG images for booking page
* fix all metadata
* use isBrandingHidden
* remove BookerSeo and its usages
* rename excludeAppNameFromTitle -> hideBranding
* remove logic for meeting type in HeadSeo
* remove BookerSeo instances from team-view and users-public-view
* create generateMeetingMetadata util and use it to reduce duplicate code
* remove BookerSeo imports
* fix spacing
* remove constructMeetingImage mock from head-seo.test
* fetch avatarUrl using user id for user page metadata
* fix test
* remove unused test cases
* index and follow must be true by default
* invert noindex/nofollow flags
* remove HeadSeo for already migrated pages and refactor prepareMetadata
* fix organization-settings.e2e.ts
* fix order
* enable parallel test execution for dynamic-booking e2e test
* fix
* + could be %2B in app router
* refactor handling logic for embeds in app router
* fix isEmbed
* fix embed-core
* remove dead code
* move embed pages back to /future
* add back embed pages in pages router
* revert some changes
* fix import type checks
* simplify
* fix
* feat: Implement generateBookingPageMetadata function for improved SEO and metadata handling across user and event pages (#18440)
- Added a new utility function `generateBookingPageMetadata` to streamline the generation of metadata for booking and user profile pages.
- Updated multiple page components to utilize the new function, enhancing SEO indexing and metadata consistency.
- Removed redundant code related to previous metadata generation methods, improving code clarity and maintainability.
* fix dirs
* Pr-review-fixes-app-router-team-pages (#18450)
* Remove unnecessary getPublicEvent call
* Remove unused variable
* Fix 404 for team page (#18451)
* Remove console log
---------
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
* fix: removed plain chat from app.cal.com/video
* take user session and open plain out of use effect
* move undefined check and screen size check above useeffect
* turned restrcited paths into env var
* undefeined window below hooks
* chore: add window check
* fix: infinite re rendering
* remove console.log
---------
Co-authored-by: Udit Takkar <udit222001@gmail.com>
* use prefetch function in ScheduleListItem and refactor
* modify app router trpc provider to match the original configs
* revert unneeded change
* move trpc provider up and do refactors
* remove log
* add comment
* fix: Some typing style fixes
---------
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* 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>