* 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>
* remove members page
* refactor to server fetch
* same for /members
* use server fetches for all queires
* fix
* add skeletons
* refactor
* fix loading page
* fix
* fix type checks
* fix details
* refactor platform members page
* fix: ensure button text remains visible on hover in forgot password page
Before: Button text turned black on hover, blending with the dark background.
After: Added 'enabled:hover:text-white' to maintain readability.
* Re-update forgot-password-view.tsx
* Update globals.css brand-text
* Update globals.css --cal-brand-text: white
* Reverted globals.css update
* Update forgot-password-view.tsx , change brand-text color
change "--cal-brand-text":
white to Black
* fix: use actual event duration mins for templated names
* fix: use actual event duration mins for templated event name
* fix: use actual event duration for calendar links
* fix: use actual event duration for round robin reassignment
* chore: rm console logs
* fix: use actual event duration for emails and rr reassignment
* chore: remove unnecessary dayjs calls
---------
Co-authored-by: Tushar Bhatt <95581504+TusharBhatt1@users.noreply.github.com>
* Add credits section to billing
* create seperate router for credits
* add stripe checkout session
* schema changes + code improvements
* rename to creditBalance
* custom quantify input with error message
* add checkout session completed webhook endpoint
* fix typo
* UI fixes
* add payCredits handler
* add error toast message
* allow scheduling sms up as close to 15 minutes in the future
* schedule at most 2 hours in advance
* webhook to pay for sent sms
* continued work on twilio callback
* code clean up
* further implementation for credit handling
* add migration
* object as param for scheduleSMS
* object as param for sendSMS
* fix TrpcSessionUser imports
* fix imports
* add db changes
* add cron job for price setting
* twilio status callback to create expense log
* remove unused code
* set up low credit balance email
* fixes for buying credits
* fixes in api/twilio/webhook
* add test to save credits to credits balance
* fix typos
* add new helper function chargeCredits
* expand twilioProvider
* fix type errors
* adjust tests
* type errors
* clean up
* clean up
* fix subscription active check
* remove some user/org related code
* more changes to remove user/org support
* send emails seperatly to admins
* fixes for team billing page
* fix stripe success url
* fixes to creating expense log
* email imrovements and more
* get monthly team price from stripe
* fix import
* fix monthly credits calculation
* finsih low credit balance warning email
* credit balance limit reached email
* create CreditService
* cancel SMS and send as email instead
* add messageDispatcher
* fix type error
* fix type error
* fix type error
* fix import
* fix unit test
* clean up twilioProvider
* clean up chckSmsPrices/route
* add missing translations
* add skeleton loader
* add admin check to get handler
* code clean up + fixes
* improve scheduling with fallback
* fix type error
* add bookingUid to handleSendingSMS
* add unit tests for creditService
* add more tests to credit-service.test.ts
* add test for cancelScheduledMessagesAndScheduleEmails
* fix test and type error
* add back resolve
* fix empty resolve
* adjust limitReachedAt logic
* address mrge comment on styling
* add getAdminMembership to repository
* twilio/webhook clean up (feedback)
* feedback - clean up
* remove todo comment
* clean up twilio/webhook
* code clean up
* add use client
* add createOneTimeCheckout to stripe service
* refactor repository pattern
* small fixes + clean up
* fix type error
* add missing import
* fix hasAvailableCredits for user
* force-dynamic
* rename credits to creditBalance
* fix stripe import
* remove not needed code
* fix e2e tests
* improve low balance warning email
* dynamic-import CreditService
* index.ts
* add user logic checkSmsPrices endpoint
* fix e2e tests
* remove dynamic import CreditService
* Revert "remove dynamic import CreditService"
This reverts commit e272978a7ff3fc5a04139e656c9f8d2c84a40dda.
* no need to dynamic-import credit service
* Revert "no need to dynamic-import credit service"
This reverts commit ba5ae488d08979a65fb47b5d0722cda9f45d6ea0.
* fix twilio webhook
* add userId support in checkout.session.completed
* clean up code
* only select id in getAdminMembership
* revert billing/package.json
* fix type checks
* fix type checks
* adjust hasAvailableCredits function
* fixes for checkout sessioned completed
* add UI for user
* fix type errors
* adds requires credits badge
* remove team check from update.handler
* clean up inlcude statements
* fix credit-service tests
* add tests
* fix type errors
* fix type errors
* fix and add tests
* imrove badge
* code clean up
* add reminderScheduler test
* add additional credits as title
* fixes for warningSentAt and limitReachedAt
* mock stripe
---------
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: hbjORbj <sldisek783@gmail.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
* Add credits section to billing
* create seperate router for credits
* add stripe checkout session
* schema changes + code improvements
* rename to creditBalance
* custom quantify input with error message
* add checkout session completed webhook endpoint
* fix typo
* UI fixes
* add payCredits handler
* add error toast message
* allow scheduling sms up as close to 15 minutes in the future
* schedule at most 2 hours in advance
* webhook to pay for sent sms
* continued work on twilio callback
* code clean up
* further implementation for credit handling
* add migration
* object as param for scheduleSMS
* object as param for sendSMS
* fix TrpcSessionUser imports
* fix imports
* add db changes
* add cron job for price setting
* twilio status callback to create expense log
* remove unused code
* set up low credit balance email
* fixes for buying credits
* fixes in api/twilio/webhook
* add test to save credits to credits balance
* fix typos
* add new helper function chargeCredits
* expand twilioProvider
* fix type errors
* adjust tests
* type errors
* clean up
* clean up
* fix subscription active check
* remove some user/org related code
* more changes to remove user/org support
* send emails seperatly to admins
* fixes for team billing page
* fix stripe success url
* fixes to creating expense log
* email imrovements and more
* get monthly team price from stripe
* fix import
* fix monthly credits calculation
* finsih low credit balance warning email
* credit balance limit reached email
* create CreditService
* cancel SMS and send as email instead
* add messageDispatcher
* fix type error
* fix type error
* fix type error
* fix import
* fix unit test
* clean up twilioProvider
* clean up chckSmsPrices/route
* add missing translations
* add skeleton loader
* add admin check to get handler
* code clean up + fixes
* improve scheduling with fallback
* fix type error
* add bookingUid to handleSendingSMS
* add unit tests for creditService
* add more tests to credit-service.test.ts
* add test for cancelScheduledMessagesAndScheduleEmails
* fix test and type error
* add back resolve
* fix empty resolve
* adjust limitReachedAt logic
* address mrge comment on styling
* add getAdminMembership to repository
* twilio/webhook clean up (feedback)
* feedback - clean up
* remove todo comment
* clean up twilio/webhook
* code clean up
* add use client
* add createOneTimeCheckout to stripe service
* refactor repository pattern
* small fixes + clean up
* fix type error
* add missing import
* fix hasAvailableCredits for user
* force-dynamic
* rename credits to creditBalance
* fix stripe import
* remove not needed code
* fix e2e tests
* improve low balance warning email
* dynamic-import CreditService
* index.ts
* fix e2e tests
* remove dynamic import CreditService
* Revert "remove dynamic import CreditService"
This reverts commit e272978a7ff3fc5a04139e656c9f8d2c84a40dda.
* no need to dynamic-import credit service
* Revert "no need to dynamic-import credit service"
This reverts commit ba5ae488d08979a65fb47b5d0722cda9f45d6ea0.
* only select id in getAdminMembership
* revert billing/package.json
* fix type checks
* fix type checks
---------
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: hbjORbj <sldisek783@gmail.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>