* Automatically enable migration of a team that conflicts with Orgs slug
* Allow changing the orgs slug and name if user goes back and changes it
* avoid crashing on some scenarios
* Revert "Allow changing the orgs slug and name if user goes back and changes it"
This reverts commit f8872b0116868d59757ef911c4940df79f93c6e0.
* fix: handle unpublished teams gracefully in org migration
- Change 'No oldSlug for team' from error to warning for unpublished teams
- Keep 'No slug for team' as error since org onboarding ensures teams have names
- Add test for migrating unpublished teams without oldSlug
- Add clarifying comments about when each condition can occur
* Middleware only logic to add CSP header as Next.js App Router doesnt allow setting header in server component
* add tests
* Remove nonce from Page Router and fix ts issues
* Add checkly test
* refactor: event trends chart on /insights to use InsightsBookingService
* extract service instantiation
* remove unused code
* rename from eventsTimeline to eventTrends
* clean up
---------
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@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
* -_-
2025-07-24 19:54:44 +01:00
sean-brydonGitHubsean@cal.com <Sean@brydon.io>Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* feat: include record IDs in Salesforce assignment reason strings
- Add recordId parameter to assignmentReasonHandler function
- Include Contact ID, Lead ID, and Account ID in assignment reason strings
- Update entire call chain to pass record IDs from CRM service
- Maintain backward compatibility with optional recordId parameter
Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
* fix: resolve lint warnings in assignment reason handler implementation
- Change Record<string, any> to Record<string, unknown> in BookingHandlerInput type
- Remove unused eventTypeId variable in getAttributeRoutingConfig function
Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
* fix: revert to Record<string, any> with ESLint disable for BookingHandlerInput
- Revert from Record<string, unknown> to Record<string, any> to maintain type compatibility
- Add ESLint disable comment to suppress no-explicit-any warning
- Maintains consistency with handleNewRecurringBooking.ts pattern
Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
* feat: pass CRM record ID from booker state to handleNewBooking
- Add crmRecordId field to booker store interface and initialization
- Update mapBookingToMutationInput to include record ID from booker state
- Modify handleNewBooking to extract record ID from bookingData parameter
- Add crmRecordId to BookingCreateBody schema in Prisma layer
- Follow existing pattern for CRM fields (teamMemberEmail, crmOwnerRecordType, crmAppSlug)
- Ensures record ID flows: booker store → booking form → mapBookingToMutationInput → handleNewBooking
This replaces the previous backend CRM service extraction approach with
frontend booker state approach as requested by the user.
Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
* Pass crmRecordId as prop
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* fix: update styles of charts on /insights
* clean up
* clean up
* share the same styles with ChartCardItem
* margin for event trends
* fix type error
* feat: disable transcription setting in cal video
* feat: add enable automatic recording feature
* chore: only when organizer joins
* chore: update name of variable
* fix: improvements
* chore: improvements
* chore: add badge
* refactor: cal video premium
* tests: add tests for cal video
* fix: use isOrganizer
* Simplify type to remove 'as SessionUser' from new code
---------
Co-authored-by: Benny Joo <sldisek783@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* refactor: convert BookingRepository to use dependency injection pattern
- Add constructor injection for PrismaClient to BookingRepository
- Convert all static methods to instance methods using this.prismaClient
- Update all usage sites to use two-step instantiation pattern:
const bookingRepo = new BookingRepository(prisma); bookingRepo.method(...)
- Apply same dependency injection pattern as UserRepository, TeamRepository, and SelectedSlotsRepository
- Update test files to use correct prismaMock import paths
- Maintain all existing functionality and type safety
Files updated:
- BookingRepository class structure and all 15 static methods
- Video meeting pages and booking views
- Booking utilities and services (handleNewBooking, originalRescheduledBookingUtils)
- Round robin handlers and reassignment logic
- Interval limits and booking limits checking
- Test files with proper mocking setup
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* 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>
2025-07-10 18:06:57 +00:00
sean-brydonGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
* intro work
* update wixard form to have content callback to remove preset navigation
* more fixes to deployment
* fix calling static service
* fix save license key text
* ensure default steps work as expected
* fix conditional for rendering step
* skip step
* add on next step for free license
* refactor wizard form to use nuqs
* fix styles
* merge base param with step config
* fix next stepo text
* use deployment Signature token
* decrypt signature token
* fix: resolve type errors and test failures from wizard form refactor
- Fix signatureToken field name to signatureTokenEncrypted in deployment repository
- Add missing getSignatureToken method to verifyApiKey test mock
- Fix WizardForm import from default to named export in test file
- Add missing nextStep prop to Steps component in WizardForm
Resolves TypeScript type check errors and unit test failures without changing functionality.
Co-Authored-By: sean@cal.com <Sean@brydon.io>
* fix: add missing getDeploymentSignatureToken mock in LicenseKeyService test
Co-Authored-By: sean@cal.com <Sean@brydon.io>
* fix: add nuqs library mock for WizardForm test
Co-Authored-By: sean@cal.com <Sean@brydon.io>
* fix: add missing nav prop to AdminAppsList component with eslint disable
Co-Authored-By: sean@cal.com <Sean@brydon.io>
* Apply suggestions from code review
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
* Update apps/web/modules/auth/setup-view.tsx
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
* fix license schema changes
* revret schema generation
* fix eslint errors
* remove required nav type + add use client
* fix types
* Update packages/ui/components/form/wizard/useWizardState.ts
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
* fix controller issue
* add checks for deployment key being null - add more tests
* fix tests
* add deployment key tests
* fix: resolve crypto mock to handle empty encryption keys gracefully
- Updated symmetricDecrypt mock to return null instead of throwing 'Invalid key' error when encryption key is empty
- All getDeploymentKey tests now pass including the previously failing 'should return null when decryption fails due to missing encryption key' test
- Fixes mocking issues in PR 22102 self-hosted onboarding wizard form refactor
Co-Authored-By: sean@cal.com <Sean@brydon.io>
* fix label
* add i18n to error
* use enum for steps
* add as const
* fix test env issues
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
* feat: adds timezone indicator on insights informing user that user settings timezone is used instead of browser timezone
* added i18 helper for translation
* chore: use entities.decodeHTML instead of custom decoder
* feat(insights): align TimezoneBadge with new timeZone prop flow
* chore
* chore: smaller icon
* do not escape value
---------
Co-authored-by: Kartik Saini <41051387+kart1ka@users.noreply.github.com>
Co-authored-by: Eunjae Lee <hey@eunjae.dev>
* fix: Persist filters across tabs to improve user experience
* fixes unnecessary renders
---------
Co-authored-by: Kartik Saini <41051387+kart1ka@users.noreply.github.com>
2025-06-26 10:04:53 +00:00
Joe Au-YeungGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>joe@cal.com <joe@cal.com>Benny Joocubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>Hariom
* Restart form if admin is not org admin
* Show pricing is admin and hosted
* Only show billing specific fields when enabled
* Create user onboarding only if valid valid license when self hosting
* Reset store when org creation is completed
* Create schema for trpc input when creating an org
* Add `organization.createSelfHosted` trpc endpoint
* `createOrganizationFromOnboarding` do not require stripe data
* Create organization without billing if self-hosted admin
* Update organizationOnboarding record as completed
* Handle updating subscription for self hosters
* Refactor `isBillingEnabled` to store
* Type fix
* Fix admin org creation for hosted
* Hide UI from admin
* Add tests
* fix: Fix LicenseKeySingleton mocking in organization tests
- Add proper vi.mock() module-level mocking for LicenseKeySingleton
- Replace incorrect casting syntax with vi.mocked() approach
- Add LicenseKeySingleton mock to hosted tests in intentToCreateOrg.handler.test.ts
- Fix IS_SELF_HOSTED mocking for hosted vs self-hosted test scenarios
- All organization creation tests now pass locally
Co-Authored-By: joe@cal.com <joe@cal.com>
* Fix tests
* Fix tests
* Test fixes
* Type fix
* Type fix
* Type fix
* Update packages/features/ee/organizations/lib/server/createOrganizationFromOnboarding.test.ts
Fix typo
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
* fix: Add IS_SELF_HOSTED mocking for E2E organization creation tests
Co-Authored-By: joe@cal.com <joe@cal.com>
* Fix E2E test
* Address feedback
* Type fix
* Fix e2e tests
* Remove unused code
* Small fixes
* fix unit tests
* review fixes
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: joe@cal.com <joe@cal.com>
Co-authored-by: Benny Joo <sldisek783@gmail.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: Hariom <hariombalhara@gmail.com>
* add smsSegments to creditExpenseLog
* add download button
* download only data from selected month
* improvements
* improve design
* use repository function
* add tests for credit repository
* fix type error
* fix unit test
* fix type error
* fix unit test
* code clean up
* fix skeleton loader
* remove empty mt
* code clean up
* move csv headers out of function
---------
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: Benny Joo <sldisek783@gmail.com>
- Add utility function for cascading hideBranding logic
- Update all getServerSideProps files to check organization hideBranding as fallback
- Ensure team queries include parent hideBranding data
- Fix hideBranding not working for organization members and teams
Fixes the issue where organization-level branding settings were not
being applied to user and team event pages when the direct entity
didn't have hideBranding enabled.
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
* fix(email): hide organizer info on rescheduled events
* hide organizer email on bookings-single-view
* replace organizer email with name
* sanitize previous booking only
* clean up code
* fix dumb error
* move away from merging twice
* move to use loggedIn Router directly
* fix router outputs types
* fix mocks in create button with teasm tests
---------
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* Fix: 'Hide from profile' toggle background not sized correctly on mobile
* fix: changed padding back to original
---------
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
2025-05-26 18:15:29 -04:00
devin-ai-integration[bot]GitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>eunjae@cal.com <hey@eunjae.dev>