* refactor: convert findQualifiedHostsWithDelegationCredentials to service class with DI
- Create QualifiedHostsService class following UserAvailabilityService pattern
- Add IQualifiedHostsService interface with prisma and bookingRepo dependencies
- Create DI module and container for qualified hosts service
- Update filterHostsBySameRoundRobinHost to accept prisma as parameter
- Update all usage sites to use the new service:
- loadAndValidateUsers.ts
- slots/util.ts
- test mocks in _post.test.ts
- Maintain backward compatibility with original function export
- Fix type issues in team properties (rrResetInterval, rrTimestampBasis)
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: update filterHostsBySameRoundRobinHost test to include prisma parameter
- Add missing prisma parameter to all test function calls
- Resolves unit test failure caused by function signature change
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: resolve type issues in FilterHostsService
- Import PrismaClient type instead of using unknown
- Fix type compatibility for BookingRepository constructor
- Update test mocks to use proper BookingRepository type
- Ensure all DI dependencies are properly typed
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* refactor: rename DI files to CamelCase and update imports
- Rename all files in packages/lib/di from kebab-case to CamelCase
- Update 22 external files with import statements to use new file names
- Update internal DI module files with corrected imports
- Maintain consistency with TypeScript naming conventions
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* chore: bump platform libs
* chore: bump platform libs
* fix: remove obsolete vitest mock after service class refactoring
- Remove obsolete mock for old function module
- Keep correct mock for new DI container
- Resolves CI unit test failures
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: correct import path for calAIPhone zod-utils module
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: Booker active booking limit can't be switched off (#23005)
* refactor: Get rid of `getServerSideProps` for /getting-started pages (#23003)
* refactor
* fix type check
* fix: Remove Reporting page within Routing Forms (#22990)
* fix error in handleNewBooking (#23011)
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
* Documentation edits made through Mintlify web editor (#23007)
Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
* fix: Contact support button position changed from absolute to fixed (#23002)
* feat: Add private links to API (#22943)
* --init
* address change requests
* adding further changes
* address feedback
* further changes
* further clean-up
* clean up
* fix module import and others
* add guards
* remove unnecessary comments
* remove unnecessary comments
* cleanup
* sort coderabbig suggestions
* improve check
* chore: bump platform libraries
---------
Co-authored-by: Lauris Skraucis <lauris.skraucis@gmail.com>
Co-authored-by: supalarry <laurisskraucis@gmail.com>
* chore: release v5.5.15
* chore: bump platform libs
* chore: bump platform libs
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: morgan@cal.com <morgan@cal.com>
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
Co-authored-by: Benny Joo <sldisek783@gmail.com>
Co-authored-by: Sahitya Chandra <sahityajb@gmail.com>
Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com>
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
Co-authored-by: Ayush Kumar <kumarayushkumar@protonmail.com>
Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com>
Co-authored-by: Lauris Skraucis <lauris.skraucis@gmail.com>
Co-authored-by: supalarry <laurisskraucis@gmail.com>
Co-authored-by: emrysal <me@alexvanandel.com>
* add Add Group button
* add host groups to schema
* UI for host groups
* raname groups to hostGroups
* schema update
* show groups in assignment tab
* add no group hosts to Group 1
* add dummy group for non group hosts
* fix type errors
* use two dimensional array for luckyUserPools
* fix empty array
* group RR hosts in handleNewBooking
* improve logic for grouping lucky users
* find all lucky users of all groups
* allow several RR hosts on booking
* clean up migrations
* create helper function
* group hosts for slots logic
* add group logic to loading available slots
* adding hosts to groups
* add groupId to hostSchema
* disable hosts from other groups
* handle groups in checkedTeamSelect
* fix adding hosts to groups
* remove and add groups
* show hosts if there are no groups
* fixing adding first group with existing hosts
* show groups empty groups correctly
* UI upddate fixes
* fix adding hosts to existing first host group
* small fixes + code clean up
* add availability fix with test
* create new round-robin test file
* disable reassignment
* fix losing fixed hosts
* fix updating weights and priorities
* disable load balancing with Round Robin Groups
* automatically disable load balancing in update handler
* allRRHosts should only include hosts from same group
* fix type errors
* fix type error
* fix tests
* fix type error
* remove undefined from groupId type
* type changes
* add tests for hostGroups
* add tests for host groups
* fixes
* fix type errors with undefined groupId
* remove seperate host groups prop
* fix editing weights
* remove console.log
* code clean up
* improve getAggregatedAvailability tests
* throw error when no available hosts in a group
* add fixme comment
* create constant for DEFAULT_GROUP_ID
* clean up code
* mock default_group_id for unit tests
* don't show fixed hosts in edit weights side bar
* add DEFAULT_GROUP_ID to mock test-setup
* remove unused index variable
* code clean up
* fix updating host groups
* fix imports
* add default_group_id to mocks
* add uuid() to zod schema
* remove unused code
* fix singular translation key
* remove unnessary !!
* Revert formatting changes
* add additional tests for bookingActions
* use createMany
* import DEFAULT_GROUP_ID for mocks
* fix mocks
* clean up EventTeamAssignmentTab
* fix type errors in tests
* fix mocks
* remove constants.example.test.ts
* fix type error
* add missing groupId
* fix margin
* clean up empty host groups
* fix constants mock
* useCalback
* use reduce
* extract handlers into seperate functions
* fix handler functions
* fix border radius
* fix type error in CheckForEmptyAssignment
* fix type error
---------
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
* Return a busy block placeholder if calendar throws an error
* Refactor `getCalendarsEvents` to return an object with a success prop
* Throw error in `getBusyTimes` if failed to fetch calendar availability
* Return empty available days if error getting busy times
* yeet.
* Type fix
* Fix type error in getLuckyUsers
* Type fixes
* Type fix
* Type fix
* Fix test
* Fix test mocks
* Refactor calendars.service to use new calendarBusyTimesQuery
---------
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* refactor: convert checkBookingLimits to class service with dependency injection
- Create CheckBookingLimitsService class following AvailableSlotsService pattern
- Add countBookingsByEventTypeAndDateRange method to BookingRepository
- Move direct prisma calls from service to repository layer
- Implement dependency injection with proper DI tokens and modules
- Update all usage points to use the new service through DI
- Maintain backward compatibility with error-throwing wrapper functions
- Update tests to use the new service pattern
- Resolve TODO comment in AvailableSlotsService for DI integration
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* chore: DI CheckBookingLimitsService in v2 slots service
* chore: bump libraries
* chore: create getCheckBookingLimitsService
* refactor: convert checkBookingAndDurationLimits to service class with DI
- Create CheckBookingAndDurationLimitsService class following DI pattern
- Add DI tokens and module for the new service
- Update booking-limits container to provide the new service
- Refactor handleNewBooking.ts to use service through DI
- Maintain backward compatibility with deprecated function export
- Preserve all existing functionality while improving code organization
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* chore: CheckBookingAndDurationLimitsService
* chore: bump platform libs
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: morgan@cal.com <morgan@cal.com>
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
* init
* fix type
* fix a re-render infinite loop because of missing readOnly (╯°□°)╯︵ ┻━┻)
* further fixes
* improvement
* fix expiry datetime check
* remove unnecessary prismaMock def
* revert
* fix test
* add test ids
* remove unit tests in favor of e2e
* e2e test update
* fix e2e
* fix e2e
* remove unnecessary change
* abstract into injectable object
* further improvements
* fix label not selecting radio
* fix type
* code improvement
* DI implementation
* fix type
* fix quick copy
* code improvement and a few fixes
* further improvements and NITS
* further into DI
* select
* improve link list sorting
* prep for easier conflict resolution
* add back translations
* using useCopy instead
* improvement
* add index to update salt and have different hash generation
* fix private link description
* fix increment regression in expiry logic
* fixes
* address feedback
* use extractHostTimezone in event type listing
* remove unused function
* remove translationBundler
* -_-
* address feedback
* further changes
* address more feedback
* NIT
* address improvement suggestions
* use extractHostTimezone
* remove console log
* pre update
* code improvement
* further fixes
* cleanup
* -_-
* chore: DI available slots service repositories
* remove configService from worker module
* register scheduleRepo in availableSlotsModule
* chore: bump platform libs
* remove useless comment from prisma module
* fix: availableSlotsModule to class deps
* fix: repositoriesModule deps
* chore: container pattern
* refactor: move modules in DI folder
* fixup! refactor: move modules in DI folder
* refactor: GetAvailableSlotsService
* chore: add todo comments where DI is needed
* chore: bump platform libs
* chore: fix unit tests
* fix: only instantiate AvailableSlotsService once per service
* Update packages/trpc/server/routers/viewer/slots/util.ts
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
* fix: bind this on all functions with reporting
---------
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
* migration plus feature flag
* show navigation route + inital roles migration
* add a check permission use case to take in the feature flags for a team
* bulk update script
* inital frontend work for displaying roles
* move to a more "anemic domain models" approach
* update test to match new DDD strutcture
* fix tests
* update transaction call back types to include trx
* align fe types after transaction to DDD
* move away from usecases to a more domain tailored approach
* get permissions per resource and map them to domain permission string
* update permision logic
* correctly get the logic for *.* permissions on owner
* wip sheet logic for ssr
* role list
* use nuqs for sheet parsing on handle change
* fox
* improve hook usage
* enable PBAC router
* delete modal etc
* i18n and inital rough layout of roles + permisions creating
* add color to migrations
* add colors and new method to tests
* move hooks out of infra into client with provider
* move hooks out of infra into client with provider
* memo features and ensure render once
* remove comment
* seed color
* use role colours
* match i18n
* add custom color picker to edit/create form
* fix advanced mode toggle
* more work on adv permission group
* update migrations
* abstract lots of core form logic to a custom hook
* improve UX for selecting all and toggling all
* improve code quality and use domain mappers in role repositoryu
* call server action to revalidate cache
* call invalidate cache on delete
* fix re-render + improves update logic wip
* fix txn for assinging role to member
* wip on assigning users custom roles
* fix repo
* update logic for checking if users can update roles
* remove member from permission check
* check users permission and assign roles
* move to factory approach
* move default rolesIDs to constant
* add facuted values to table
* display custom role in table
* fix type error
* fix role filter
* check pbac feature flag to see what column to filter on
* push repo mocks and other mocks to fix unit tests
* fix and add test for empty permissions when creating a role
* pass updates to repo so we actually update roles
* fix types
* fix types
* restore lock changes
* fix role service test for new updates section
* fix updated at types
* update mocks to use feature repository mock
* remove roletype from db in model
* prevent multiple queries
* fix typeof in role model
* fix and migrate i18n to one registery
* fix and update i18n to be in registery
* fix type error + fall back in service instead of repo for BL
* more type errors
* update members faceted values to bennys refactor
* fix types
* remove the _resource from type conditionally
* fix managment factory types to expose PBAC enbaled obol
* narrow down types
* wip fix for types
* more fix types
* cast role
* fix tests
* attempt of fixing _resoucre key access type
* attempt of fixing _resoucre key access type
* seperate migraations to batches
* add invalidate time to team features
* restore router to main
* push main lock
* Update packages/features/pbac/domain/types/permission-registry.ts
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
* Update packages/features/pbac/domain/mappers/PermissionMapper.ts
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
* Update packages/prisma/migrations/20250527091330_add_color_to_pbac_role/migration.sql
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
* Update packages/prisma/migrations/20250617070118_update_memberships_one_time/migration.sql
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
* Update apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/roles/_components/AdvancedPermissionGroup.tsx
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
* fix mapped type
* restore migration
* skip _resource
* use partical
* fix type errors in tests and hooks
* Simplified the role field in the editSchema to use z.nativeEnum(MembershipRole)
* fix type errors for editsheet
* fix type errors for editsheet
* Apply suggestion from comment 2151515295
* remove footer since we dont have docs yet
* add i18n
* lock all toggle chevron
* use prisma
* tidy up old manage permission
* fix i18n
* remove can manage from role permission check
* auto select read
* address benny feedback
* fix type
* fix type
* update function name due to merge
* fix types
* update tests to match new membership method from merge
* address cubic feedback
---------
Co-authored-by: Eunjae Lee <hey@eunjae.dev>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
* Show distribution option for RR scheduling type
* Add `includeNoShowInRRCalculation` to event type schema
* Add `includeNoShowInRRCalculation` initial event type data
* Add FE option for `includeNoShowInRRCalculation`
* Consider `includeNoShowInRRCalculation` when building `where` clause when getting bookings for RR
* Add `includeNoShowInRRCalculation` param to `getAllBookingsForRoundRobin`
* Add `includeNoShow...` param to `GetLuckyUserParams`
* Pass `includeNoShow...` param to `getBookingsOfInterval` calls
* Add FE option for `includeNoShow...` (actual commit)
* Type fixes
* Fix brackets
* Add booking repository test
* Remove unused method
* Add translation
* Type fix
* Type fix
* Test passing
* Fix tests
* Fix tests
* Fix test
* Type fixes
2025-05-09 16:29:57 +00:00
devin-ai-integration[bot]GitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>keith@cal.com <keith@cal.com>
* Add tests for booking and duration limits in getSchedule.test.ts
Co-Authored-By: keith@cal.com <keith@cal.com>
* fix: use SchedulingType enum instead of string for schedulingType
Co-Authored-By: keith@cal.com <keith@cal.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: keith@cal.com <keith@cal.com>
* feat: implement standard pagination for org member list
* fix type error
* i18n for pagination
* add paginationMode
* apply the change to PlatformManagedUsersTable
* replace useInfiniteQuery with useQuery
* fix type error
* fix type error
* fix type error
* fix type error
* update comment
* remove optimistic update
* minor changes
* update usage on nuqs
---------
Co-authored-by: Benny Joo <sldisek783@gmail.com>
* refactor: Remove intervalLimits from @calcom/lib and export directly
* Tackle other places that use parseBookingLimit/parseDurationLimit
* More type fixups that were hidden by previous fails
* Fixed up booking-limits file
* Remove server-only
* Revert "Revert "chore: rename DWD to DelegationCredential (#19703)" (#19734)"
This reverts commit 340b5ab061.
* chore: fix schema and types for now
* fix: domainWideDelegationCredentialId error type
* fix: Re-instate new slot logic now it's well tested
* Fixup getAggregatedAvailability
* Changes to code-owners to reflect removed/moved code
* Move more files around.
* Fix failed type
---------
Co-authored-by: Omar López <zomars@me.com>
* Add endpoints for testing the flow
* Add MVP
* new route
* Fixes
* Fixes
* Remove enable toggle support from domainWideDelegation
* Fixes
* Revert "Remove enable toggle support from domainWideDelegation"
This reverts commit c29e729206cd1fa063f9c9ce0cf148ef1577d60b.
* Revert yarn.lock
* More fixes
* Fix new workspace platform add
* refactor: improvements
* refactor: bug fixes and improvements
* fix: type errors
* fix: conflicts
* chore: update test
* fix: logic
* chore: improvements
* fix: toglle
* fix: bugs
* fix: type err
* chore: check number type
* fix: after conflicts
* chore: fix type err
* fix: type errors and tests
* fix: tets
* test
* chore: remove unused
* fix: google meet url on booking page and secondary calendar
* fix: add property
* fix: type err
* fix: re assingment bug
* fix: use getAllCredentials
* chore: fix import
* fix: installed count
* fix: pass event type
* fix: import
* fix: [Stacked PR] Review fixes (#17958)
* Review fixes
* fix: destination calendar bug
---------
Co-authored-by: Udit Takkar <udit222001@gmail.com>
* refactor: use repository
* chore: remove duplicate
* fix: More review fixes for domain wide delegation (#17969)
* Reuse buildCredentialPayloadForCalendar
* fixes
---------
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
* fix ts error
* Fix getSchedule not using dwd credentials (#17995)
* fix: Remove direct DWD table access from google-calendar and remove delegatedToId column from Credential (#18015)
* Remove fn rename to reduce number of files changed
* chore: check feature globally
* test: add unit tests
* chore: move function
* test: add booking test
* wip
* Remove domain-wide-delegation team feature flag
* Make sure duplicate calendars are not shown due to DWD. Show DWD when there is conflict
* Fix tests and their ts errors
* Fix more tests
* Move findUsersForAvailabilityCheck to separate file as it has AppStore dependency causing problem with Routing Forms. Build crashes
* fix: Multiple calendar connections from Google not showing up in apps/installed
* DestinationCalendar must have either credentialId or domainWideDeelgationId. Also handle the case when DWD is disabled and there was a non-dwd credential that could be used
* Disable deletetion of DWD as it is destructive and prefer disabling instead
* Show DWD credential calendars at the top
* Fixed tests
* Calendar Cache DWD support
* Self-Review: Verify email required and add more selectedCalendar tests
* Self Review: shorten names
* Self ReviewL Dead code removal
* Revert "Calendar Cache DWD support"
This reverts commit 009f236470fa21eba5986117d4f6e4d4c5e38c34.
* Some misc fixes
* fixes
* Performance improvememt in slots loading and booking
* More cases for handling dwd credentials
* simplify the logic. Ensure that EventManager and the modules below it in the flow have CredentialForCalendarService available
* Fix tests
* Fix installed/conferencing not showing gogole meet
* Shorten name
* Fix ApI v2 tests
* Add some more tests
* add getSchedule tests
* Improve tests
* Make Google Meet default when DWD for google is enabled
* Enable feature flagging for DWD
* chore: bump libraries
* Encrypt serviceaccount private key
* Fix ts errors
* bump platform libraries
* org add dwd
* org add dwd
* bump platform libraries
* fix selected calendars
* fix remove selected dwd calendar
* remove oauthclient id aliad in authedCalendar
* remove oauthclient id aliad in authedCalendar
* refactor: OrganizationsDwdController
* chore: export toggleDwdEnabled from platform-libraries
* feat: v2 update (enable / disable) dwd
* refactor: SelectedCalendarsController check if user belongs to dwd org & for not dwd use previous logic
* wip: DestinationCalendar send domainWideDelegationCredentialId from frontend to api
* try fix set destination calendar api v2
* fixup! try fix set destination calendar api v2
* setting google meet as default location working for dwd
* bump platform libraries version
* allow office 365 workspace slug
* allow office 365 workspace slug
* chore: v2 create dwd MS and Google service keys input
* fix: CreateDwdInput serviceAccountKey
* fix: CredentialForCalendarService type
* fix: check workspace slug
* feat: update serviceAccessKey of DWD
* testing
* fixup! testing
* fix: getAuthUtl bug
* fix: unit tests
* fix: type err and unit test
* fix: e2e test
* fix: credentials bug and failing unit tests
* Update CalendarService.ts
* chore: refactor office365 calendar service and add testDomainWideDelegationSetup
* fix: office365Calendar use correct clientId/Secret for DWD
* fix: office365Calendar dwd no need refresh token
* test: add unit test for outlook dwd and setup
* feat: added dwd support for office365 calendar
* feat: added dwd support for office365 video
* test: finish test for outlook dwd
* fix: create dialog bug
* chore: remove console logs
* fix: refreshToken bug
* bump version libraries
* refactor: fetch dwd credentials only in findQualifiedHosts
* fixup! refactor: fetch dwd credentials only in findQualifiedHosts
* fix: type err
* fix: type err
* fix: getUserDisplayName
* fix: unit test
* chore: bump platform lib
---------
Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Udit Takkar <udit222001@gmail.com>
Co-authored-by: Morgan Vernay <morgan@cal.com>
Co-authored-by: supalarry <laurisskraucis@gmail.com>
Co-authored-by: Somay Chauhan <somaychauhan98@gmail.com>
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
* feat: Don't allow unavailable slot's booking form to be visible - Send back to slots listing
* Improvements
* feat: Add env variables and strategies to prevent booking failures
- Added new environment variables for configuring slot reservation and availability checks
- Implemented strategies to handle concurrent bookings and slot availability
- Updated Booker component and related files to support new reservation and slot checking mechanisms
- Added README with detailed explanation of booking prevention strategies
- Configured dynamic intervals for slot and reservation queries
* docs: Update Booker README with detailed slot reservation and availability explanation
- Clarified slot reservation behavior when multiple users access the same booking page
- Added details about `getSchedule` refetching strategies and timing
- Explained how slot availability is detected and communicated to users
* Support for skip confirmation form flow
* feat: Enhance slot availability and reservation mechanism
- Refactored slot availability checking to support multiple slots
- Added tentative selected timeslots to improve booking UX
- Updated trpc handler to check availability for multiple slots
- Introduced new store methods for managing tentative slot selections
- Improved slot reservation and availability status tracking
* refactor: Improve slot availability quick check mechanism
- Renamed and restructured slot availability check parameters
- Extracted quick availability checks into a separate hook
- Updated type definitions for slot status and availability checks
- Simplified slot availability logic in Booker and related components
- Maintained cached state for quick availability checks
* Support minimu booking check too
* change data-testid
* Rneame
* Fix race condition with uid cookie not set
* fix tests
* Remove unsded variable
---------
Co-authored-by: Hariom Balhara <hariombalhara@gmgmail.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
* Partial push of new filters
* Let's always return the passed host array when a filter doesn't need to be applied
* fix: isFixed typing in same round robin host check
* Add main bulk of rewritten logic for routed fairness support
* Remove console.log
* Add getAttributeWithEnabledWeights to AttributeRepository
* Add OOO entry repository
* Use getOrderedListOfLuckyUsers in lead threshold filtering
* Shortfall already includes weight
* test against minShortfall
* first attempt to fix fallbacks
* Added testcase updates
* Partially fix filterHosts test
* Some test updates
* Removed email field from normalization
* fix no available users found error
* fix unit test
* remove fallback from same host reschedule return
* fixes and improvements for findQualifiedHosts
* include fallback logic in handleNewBooking
* use fallback in handleNewBooking
* fix for contact owner in handleNewBooking
* WIP - comment
* pass routingFormResponseId
* fix type error
* pass routingFormResponse
* fixes in treshold logic
* remove reason
* merge qualified and fallback availabilities
* fix type error
* add and fix tests
* clean up test file
* fix filterHostsBySameRoundRobinHost tests
* fix findQualifiedHosts.test.ts
* fix getRoutedUsers.test.ts
* fix tests
* fix isRerouting check
* fix start time for two weeks check
* fix fallback hosts
* fix test
* fallback hosts should also include qualified hosts
* fix type error
* fix typos
* add contact owner to fallbacks
* fix typo
* fix qualifiedRRUsers
* set fixed users when no hosts
* add tets + code clean up
* add test for reschedule with same host
* fix typo
* add more tests for findQualifiedHosts
* remove skip from test
* add comment
* remove unused code
* fix fallback users in loadAndValidateUsers
* improve naming for fallback
* rename missed fallback variable
* fix reschedule with same rr host in handleNewBooking
* fixes for fallback slots
* add more tests + small fixes for contact owner
* fix tests and type errors
* add logs for fallback
* add type:json to logger
* Fix small merge issue
* fix end time if two weeks are cut off
* add more tests for contact owner availability check
* add new logic for two weeks fallback
* fix reschedule same RR host test
---------
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com>
Found via `codespell -q 3 -S "*.svg,./apps/web/public/static/locales,./packages/app-store/stripepayment/lib/currencyOptions.ts,./packages/lib/freeEmailDomainCheck/freeEmailDomains.ts" -L afterall,atleast,datea,fo,incase,ist,nam,notin,optionel,perview,reccuring`
Closes#19193
* Add a case that crashes
* Add proper crash test case
---------
Co-authored-by: Hariom Balhara <hariombalhara@gmgmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* chore: app router - /reschedule pages (#18150)
* app router - /reschedule pages
* add to config.matcher
* generateMetdata is not needed
* include app directory in rewrites generation logic
* make it more readable
* make code more elegant
* fix
* fix
* fix
* fix
* test and refactor